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
Alpha-Beta Game Tree Search Demo - Tic-Tac-Toe
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Alpha-Beta Game Tree Search Demo - Tic-Tac-Toe
- Attachments
-
- alphabeta_tutorial.html.zip
- (4.37 KiB) Downloaded 19 times
-
- Alpha-Beta Algorithm Demo.livecode.zip
- (5.54 KiB) Downloaded 18 times