Advertisement

board game

Started by October 27, 2005 12:29 AM
3 comments, last by alvaro 19 years, 1 month ago
Hi I am doing 5 in a row Tic Tac Toe for different board sizes like 5*5, 10*10, 15*15, for 3 different levels(easy, medium, hard) Can anyone tell me how to start of with? As i am new to AI, how to differentiate btn levels in AI n the algorithm to be used? Can any one tell me a simple algo other than MinMax? regards roopa
If you uses minimax with some heuristic then you could implement the different levels with different heuristics. E.g. easy level could use the number of crosses in a row as a heuristic.

A simpler algorithm than Minimax? Minimax is about as simple as you get for two-player games. You could just do a simple search of the state space using some simple heuristic.
Advertisement
Another way to tweak difficulty with minimax is to have different search depths. Example: perhaps 'easy' will only be able to look 5 moves ahead, while 'hard' can look 20.
Quote: Original post by Kuladus
If you uses minimax with some heuristic then you could implement the different levels with different heuristics. E.g. easy level could use the number of crosses in a row as a heuristic.

That is what I would have done. But a good deal of thought must go into these heuristics, so as to ensure that they 'really' are different, and that the player can differentiate one difficulty level from another.

You can just do your best job in implementing a good "hard" level, and then dumb it down by seraching for less time (or depth, which is about the same) and/or adding randomness to the evaluation function.

This topic is closed to new replies.

Advertisement