An amusing AI diversion...
Hi! If you liked "C-Robots" or "Core Wars," you might enjoy this too. I'm teaching a class on Game Programming at CMU, and we recently handed out our AI assignment: write an AI to control a tank-bot. The assignment includes code to render little tanks and a maze, and it also includes four plug-in AI's that you can use to control the tanks. You can easily write your own AI - a simple one would take less than a page of python code. The students seem to be having fun with it, so I thought I'd post it here as well, in case any of you want an amusing little programming problem to kill an hour or two. Here's how you run the game: 1. download Panda3D (a free 3D engine) from http://panda3d.etc.cmu.edu 2. download the tank-bot code from: http://www-2.cs.cmu.edu/afs/cs.cmu.edu/user/jkh/www/video_games/josh-lecture-ai.zip That zip-file also has my lecture notes, but you can ignore those. Just change into the "tanks" subdirectory. 3. run the assignment by typing a command like this: ppython tank.py 1 maze2 ai-searcher ai-wander Or something like that. You specify which two AIs should do battle against each other, and which maze they should fight in. The "1" means "graphics on". If you use "0" it turns the graphics off, which causes the battle to go much faster. Sorry the graphics are so primitive (I'm not much of an artist), but I had fun writing the AIs, and I think you might enjoy dinking around with it as well. Hope you can get a little snowy-day enjoyment out of it. :)
- Josh Yelon-- Distribution Maintainer, Panda3D Engine
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement