LW has often discussed the inductive logic game Zendo, as a possible way of training rationality. But I couldn't find any computer implementations of Zendo online.

So I built two (fairly similar) games inspired by Zendo; they generate rules and play as sensei. The code is on GitHub, along with some more explanation. To run the games you'll need to install Python 3, and Scikit-Learn for the second game; see the readme.

All bugfixes and improvements are welcome. For instance, more rule classes or features would improve the game and be pretty easy to code. Also, if anyone has a website and wants to host this playable online (with CGI, say), that would be awesome.

New Comment
6 comments, sorted by Click to highlight new comments since: Today at 3:18 PM

This is nice. A few suggestions:

  • Ignore upper and lower case. Use numbers for GOTIT and GIVEUP.
  • Include a file or in the readme what kind of rules can actually exist. For example, without looking at the source code I don't know whether there can be a rule like: "contains an even number of 'a'".
  • At the end, include an option to play again, or quit

IIRC Doug Orleans once made an ifMUD bot for a version of Zendo where a rule was a regular expression. This would give the user a way to express their guess of the rule instead of you having to test them on examples (regex equality is decidable).

Also I made a version over s-expressions and Lisp predicates -- it was single-player and never released. It would time-out long evaluations and treat them as failure. I wonder if I can dig up the code...

I have made a version of Zendo also. This one uses regular expressions (like what darius mentioned). It's just JS, so it doesn't have any special prerequisites to play.

https://codewiz.org/~scubed/rezendo/rezendo.html

Suggestions: use fewer lines in post-guess output so I can see more of my old guesses.

Also, a command to spit out the known classifications.

It'd be cool if the test at the end was guaranteed to have coverage of each of the subrules in a combination. I got the rule:

(starts with 'l') or (not (contains 'as'))

The "starts with 'l'" case was never tested for. You could test each of the subrules (at least in the case of disjunction) by having a test word that passes and fails each. Little more complicated for other kinds of combiner.

Greatly interested, and once I am free of my current activities (in a few weeks) I'll be able to delve in it.