Tuesday, August 21, 2007

AI Scripting for Wesnoth

It turns out that Battle for Wesnoth is just what I've been waiting for, a free strategy game with nice polish and an active developer community. It is modeled after Warsong, a Sega Genesis game Matt Yglesias likes. It is written in C++, but they've got a Python API for writing new AI's, which happens to be the part I'm interested in anyhow. This "Chesslike.py" AI is apparently better than the default and weighs in at under 300 lines of pretty simple Python. Seems like a good way to take some of the mystery out of game AI programming.

1 comment:

Gnuosphere said...

My son and I play Wesnoth. Perhaps too often. He's pretty good for someone not yet in kindergarten.

We like to call it "Chessnoth". It's a fun strategy game with some similar strategies to chess (e.g. many maps emphasize a battle for the center) mixed with a bit of chance.

I have also used the game in my classes to propagate racism. It's really a fine tool of indoctrination.