I wanted to give proper credit for this online creation, so I contacted the site owner and he was kind enough to respond:
Brian writes:
You may credit to me, Brian Klug - thanks so much.It was written for AI class at UMD. Each move, it plays "what-if" by looking at each square as its next move. There are a bunch of heuristics. There are some obvious ones, like, "does moving here make 5-in-a-row", "does this block a winning move by player", the total points earned if you would assign points to total number of pieces in a row (i.e. it will favor a square that makes TWO lines of four squares, i.e. if it formed a cross.). Finally, it also prefers to play the center of the board.Cheers!
Even these simple rules are enough for the computer to play a decent game, and it beat me on my first try. A bit of thought and a better defense and I am able to beat it regularly. Like the simpler 3-by-3 version of Tic-tac-toe, moving first is an advantage, but it is not clear in the extended version if there is always a play-to-draw strategy for the second moving player. My intuition is that on the expanded board the number of possible moves to be blocked grows more quickly than than the opportunity to block them, and so playing to a draw is much more difficult.
No comments:
Post a Comment