views:

383

answers:

2

Hi I am working on a online TIc-Tac-Toe game using the miniclip algorithm to calculate the best move.I found few examples but i really don't understand the miniclips logic.Some example would be great.

Thanks!

+1  A: 

For a game with such a small number of possible states as Tic-Tac-Toe, it's quite feasible to just build a tree of all possible game states and have your AI only take branches that don't end in a loss.

Beyond that, I think what you're looking for is called minimax, and there's an article here that explains a variation of it in the context of Tic-Tac-Toe.

Bill the Lizard
Yeah - I think Miniclip.com is the Flash games site my kid spend all their time on. Not me, though. Well, not often.I think he should look into alpha-beta pruning (http://en.wikipedia.org/wiki/Alpha-beta_pruning) as well, to improve that Tic-Tac-Toe performance.
Mike Woodhouse
Yeah, I came across that site in my search. Bookmarked for later. Alpha-beta pruning is a good idea from an academic standpoint, but not really necessary for tic-tac-toe. AB pruning is also definitely needed for more complex games like checkers.
Bill the Lizard
A: 

I guess Decision tree or more like game tree is what you're looking for

Can Erten