% Option Explicit %> <% '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' Main ' ' Purpose: ' ' Directs the action. ' ' Revisions: ' ' [TDB 12.Mar.2003] Code written. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub Main() Call WriteStandardHeader("Tic-Tac-Toe in Java with AI using " & _ "Minimax " & _ "with Alpha-Beta Pruning", _ "Java version of Tic Tac Toe (commandline only) that includes " & _ "an AI that uses Minimax with alpha-beta pruning to play " & _ "a perfect game", _ "tic-tac-toe, AI, minimax, alpha-beta pruning, noughts and crosses") %>
There are lots of resources on the web about Minimax with Alpha-Beta pruning (the algorithm that forms the basis of most chess, draughts and other game-playing AIs). What I found missing when trying to implement it was a solid practical example. Hopefully this Java version of Noughts and Crosses (Tic-Tac-Toe) is one.
The classes for those interested in minimax with alpha-beta pruning are AI and Node