From APL Wiki
Jump to navigation Jump to search

APL-eusis is a game that allows participants to hone their skills in the APL programming language. It is inspired by existing games of inductive logic such as Eleusis (which has itself been the subject of APL study[1][2]) or Zendo.

Basic Play

The game may be played by any convenient number of participants. In each round, one participant is named Master, the others are Students.

The Master starts by composing a non-niladic (monadic, dyadic, or ambivalent) function and assigning it a name, which should not be meaningful. The code of the function is not revealed to the Students, nor is an explanation of what the function does.

The Master then announces whether the function is monadic, dyadic, or ambivalent, and provides up to five examples of valid arguments to the function, and the result of the function for each example.

Each student then may make one of three types of move:

  • An inquiry move provides arguments to the function, and the Master provides the result of the function. No points are awarded or deducted for an inquiry move.
  • A prediction move provides the arguments to the function, and the student’s prediction of what the result of the function will be. The Master provides either confirmation or denial of the student’s prediction, without providing the actual result. If the student’s prediction is correct, the student is awarded two points; if the prediction is incorrect, the student loses one point (scores are permitted to be negative)
  • A solution move provides the code for a function that the student believes will give the same results as the Master’s function (the code need not be identical; the inputs and results must be). The Master may analyze or test the function to confirm or deny that it produces the correct results, but if the Master believes that the function is not correct, arguments and results must be provided that demonstrate that the student’s solution is incorrect. If the solution is valid, the student is awarded five points and the round ends; if incorrect, five points are deducted from the student’s score and play continues.

All moves and their results are public (all students can see the moves and their results).


  • The Master may impose requirements or exclusions for solutions, if the desire is to focus on specific techniques or primitives. Any such requirements or restrictions should be announced when the function’s valence is announced.
  • If a student makes a prediction move (a value prediction), the other students may offer their own predictions of whether the student’s prediction is correct (a correctness prediction). A student may decline to make a correctness prediction. After all students who wish to have offered their correctness predictions, the Master indicates whether the original value prediction is in fact correct. If it is, each student that made a correct correctness prediction is awarded one point.
  • If a student makes a solution move, the other students may offer correctness predictions. A student may decline to make a correctness prediction. Any student that believes that the offered solution is incorrect should be prepared to provide arguments to the function(s) that will demonstrate that the solution is incorrect (as above). A student whose correctness prediction is in fact correct is awarded three points. Each student who correctly predicted that an offered solution is incorrect must provide their arguments to demonstrate the incorrectness; if the arguments do not in fact demonstrate that the prediction was incorrect (that is, the same result is returned by the student’s function and the Master’s function), the student loses one point.


Not all primitives are easily analyzed; it may be appropriate to restrict them. Examples of such primitives are ? (Roll or Deal, relying on random selection) and (Represent).

Functions should ideally not rely on specific values for system variables or functions like ⎕IO or ⎕RL (Index origin, Random link) or system-specific functions like (I-beam). If they do, the Master should announce the reliance when the valence is announced.

For sufficiently advanced Masters and students, consider allowing operators to be defined, as well as functions.


  1. Berry, Michael. "APL and the search for truth: A set of functions to play New Eleusis". APL81. doi:10.1145/390007.805334
  2. Berry, Michael. "A set of APL functions to play new Eleusis". IJCAI'81: Proceedings of the 7th international joint conference on Artificial intelligence. 1981-08. doi:10.5555/1623264.1623354