Alpha-Beta Game Tree Search Demo - Tic-Tac-Toe
Posted: Fri Aug 08, 2025 7:24 pm
Hi,
I was browsing through some old issues of MacUser Magazine and found an interesting article on a game tree search algorithm. Attached is the demo and a tutorial file I included. The demo is the use of the algorithm in a simple Tic-Tac-Toe game.
I could have put the game button scripts in a behavior or used a "target" strategy and case statements but didn't in this version so check the mouseUp scripts attached to each game board button.
One little annoyance was trying to initialize the game board button labels to be empty. I had to use a "-" character because trying to use "empty" or "" to set the label didn't work. Kind of surprising I haven't run across this before. Am I missing something?
- Mike
I was browsing through some old issues of MacUser Magazine and found an interesting article on a game tree search algorithm. Attached is the demo and a tutorial file I included. The demo is the use of the algorithm in a simple Tic-Tac-Toe game.
I could have put the game button scripts in a behavior or used a "target" strategy and case statements but didn't in this version so check the mouseUp scripts attached to each game board button.
One little annoyance was trying to initialize the game board button labels to be empty. I had to use a "-" character because trying to use "empty" or "" to set the label didn't work. Kind of surprising I haven't run across this before. Am I missing something?
- Mike