|
|
Putting it all together
Basically to calculate a move we run a search.
We use the move generator to generate the list of moves avaiable for the current game state of play. We apply each move using the move applier ready for the next level of search. The value of a position is calculated for the search for each position using the rating algorithm. Once the next level of search is finished, we undo the move. Once the search has completely finished, we return the best move found to the user interface.
The human player then makes their move using the user interface, we apply it to the state of play and then it's the computer's turn again.
|
|