2

Possible Duplicate:
What Algorithm for a Tic-Tac-Toe Game Can I Use To Determine the “Best Move” for the AI?

I want to develop a tic tac toe (5x7) game in which there are two players one is computer and one is human. the player who makes 4 in a row or 4 in diagonal first wins. If i do using brute force technique it takes long time for computer to decide next move. Can anyone suggest an algorithm with less time complexity ? thanks in advance..

Community
  • 1
  • 1
appdroid
  • 573
  • 7
  • 18

1 Answers1

0

Alpha-Beta prunning is a good algorithm for searching for the best next turn.

Juraj Blaho
  • 13,301
  • 7
  • 50
  • 96