AI schmay-i

Thursday 24 November, 2011 at 10:43 am Scott 0

Last week I started designing the computer opponent for the game. Whooboy. To say I was intimidated by the thought would be, well, correct. What should the software objects look like? How long will it take to get something useable? Will the result be any good?

After about a day and a half of trial and error I settled on something I think will work.  And here we are a week later and the itty bitty widdle AI took its first steps.  The computer is able to take actions by moving its pieces around (somewhat) intelligently.  Of course calling it smart would be premature at this point, but at least it’s more than choosing moves at random.

In the game, a player’s turn consists of four phases.  The code I added is able to handle one of them – the most involved of the four by far.  With that somewhat working I also added preliminary support for a second phase.  Two down, two to go.

I’ll post again with more details once I get the remaining phases implemented and I can play a full turn against the computer.



Leave a Reply

You must be logged in to post a comment.