Advertisement

Building a Puzzle Game

Started by February 06, 2006 06:49 AM
2 comments, last by RanmaruX 18 years, 9 months ago
Ok at the moment I've been designing a puzzle game I wanna build and *roughly* specifying the classes I want to include and how they will be used.. The implmentation I have so far seems to be pretty solid (seems like it will work) except I'm not too sure how to code my AI.. The problem is the game is a board game (similar to chess in that respect and in the respect that it is strategic, but in no other way) and so i'm trying to figure out how I should design the AI's thought/descision processes.. It would be easy to put together an AI that could play any old way, but I want to be able to put together an AI that can use specific strategies in certain situations to outsmart the player AND build it so it can be scaleable in difficulty.. From the thought's I have of the structure of the AI overall it seems like its gonna be quite a hefty task to undertake.. So I was wondering if anyone had maybe built an AI that plays chess or another strategic board game, of which I could draw inspiration from your design processes..?
I'm going to move you to the AI forum, I'm sure the friendly folks there will be able to point you in the direction of some techniques you could look in to. [wink]

- Jason Astle-Adams

Advertisement
I did some AI, if you want to call it that, for a battleship clone I made. Maybe this helps your thoughts of scalable difficulty:

I had 3 levels. In the first level the AI would just guess a field to fire upon. In the next level it would guess until it hit a ship. It would then guess any of the 4 possible directions until another hit was accomplished. Then it would go and go all the way until the ship was either destroyed or it came upon water. If latter was the case it would return to the first hit and "travel" in the opposite direction until the ship was destroyed. In the third level it would also check where remaining ships could be hiding. If for instance the aircraft carrier (5 fields) was the only ship left it would not try to fire at a row of 2 empty fields.

I distinguished the different algorithms by the difficulty level chosen. (Well I hardcoded it actually in that thing :P)

So you might want to check for the set difficulty level and according to that you may or may not distinguish between special tactical situations and how your AI acts.

Hope that helps a bit. I'm not that much experienced in AI actually, that was my first approach back then.
These might be useful :)

http://www.gamedev.net/reference/list.asp?categoryid=18

In "Subcategory: Gaming" there's a series of articles on chess AI.

This topic is closed to new replies.

Advertisement