60 likes | 199 Vues
The Project . And the few things I did Jacobus Harding. Core. The entire core of the project revolves around the minimax function. Two separate methods for clarity, pass back and forth to each other. Helper function, availableMoves (finds all open squares)
E N D
The Project And the few things I did Jacobus Harding
Core • The entire core of the project revolves around the minimax function. • Two separate methods for clarity, pass back and forth to each other. • Helper function, availableMoves(finds all open squares) • Does well due to simplicity and speed through which I can traverse the minimax tree.
Evaluate • Simple evaluation function • Checks nodes of minimax tree to see which are wins, which are losses. • Assigns very high, very low values for wins and losses respectively.
Hueristics • At time of submission only one developed, working hueristic. • ForcedBlock • If a node contains an opponent setup with K-1 length(diagonal, horizontal, vertical) immediately stop minimax and block.
IDFS • AI runs extremely slow without IDFS • After one or two moves, times out and error is thrown • Start at certain depth and work your way down if you have enough time • Keep track of time at highest level, before you get lost in the minimax tree so that you can break out simply.
Further Improvements • More heuristics which generally evaluate the board state in each node. • Will decrease time spent on each node since pruning can take place, allowing for a longer DFS.