5x5 tic tac toe problem using backtracking on trees to make the computer's move (using C)
Posted on 2003-11-04
I want to use the method of backtracking and assigning a (1=winning move, 0=draw move, -1=losing move) to a series of trees. I am also intrested in pruning the trees so I don't have to do an exhaustive search.
I have a made another user function that will provide me with a board structure and the users last move. My computer move function I am going to define like:
board *play_turn_computer(board *b,type t,char *player_last_move)
I dont know exactly how to make a tree of boards with every possible move and search it for which move will be most likely to win. I have never tried backtracking before, but everyone I've asked personally says that will be the best way to implement an AI computer player.
Any examples to get me started would be great!!!