#### Archived

This topic is now archived and is closed to further replies.

# AI for puzzle games

This topic is 6935 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, anyone could tell me which is the best method to do a computer opponent in a tetris game or any other puzzle game, I mean which method is the used in games like Bust-A-Move, Puyo-Puyo, etc. thanks! Best Regards! Oscar

##### Share on other sites
In a turn based puzzle game where CPU time isn''t a worry and the computer can spend a few seconds calculating it''s next move then I''d suggest a heuristic state space search.
Basically work out a heuristic for each aspect of the game, in Chess this would could be 1 point for a pawn, 5 points for a castle 10 points for the queen etc. and calculate all possible moves from the current position (or world state) then calculate all the possible moves from each of those world states and all of the possible moves from those world states and so on. You could have a cut of for the depth of the search or you could only expand the best five world states from any node in the search to speed things up.
Then find the best move to make based on what could happen in the future. The best move could be decided to be the best average score from all the potential world states possible from making that move or it could be the move which has the highest, lowest possible score i.e. for each potential move find the lowest heuristic score that can occur from this move and make the move which can potentially cause the least damage presuming the human opponent makes the best moves on their turn.

That''s basically the best method where CPU time is not a problem (IMHO).

Mike

##### Share on other sites
Hi, and thanks it seem to be a MIN/MAX algorithm, thanks

Best Regards!,

Oscar

##### Share on other sites
Hi, and thanks it seem to be a MIN/MAX algorithm, thanks

Best Regards!,

Oscar

• 10
• 13
• 52
• 11
• 15