[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] "Cubeland" Demo



I was talking with some people (the Yahoo group "Robitron") about what would be a better version of the Turing Test, and they seemed to want something along the lines of the old AI program "SHRDLU," where a crane picks up blocks.

So, I built a simple AI testbed that does something like that. The input format is weird, since it's meant to be interfaced with by outside programs. I think of it as a game board rather than a game in itself.

Windows EXE: <http://kschnee.xepher.net/code/070523cubeland.zip>
Source code: <http://kschnee.xepher.net/code/cubeland.py.txt>
Screenshot: <http://kschnee.xepher.net/pics/070523cubeland.jpg>

Try running the program, then experimenting by clicking with the left
and/or right mouse buttons to place/remove crates. (More than one crate
can exist in one spot, but you'll only see one.)

Now make a text file called "to_world.txt" (somewhere else), containing
the text:
move 0 2

Copy and paste the file into the program's directory. The program will
read the file, delete it, and react by moving the player/robot/cursor
thing, a green square. Its response is logged and also written to a text file called "from_world.txt". You can use "grab" and "drop" to move crates, and "look" to get a raw description of the scene. (The format is that the contents of tile (x,y) are at index (y*8)+x.)

Thoughts? If the Robitron group likes the idea, this program could become a sort of puzzle game.

Kris