sequences the minimax algorithm the dummyxand classes all have an eval method that returns either for computer movea - for human moveor for no move yet the values for these moves are used in an algorithm called minimax the minimax algorithm is recursive algorithm that is used in two person game playing where one player is the computer and each player has choice of some number of moves that can be made while taking turns the minimax algorithm is simple the idea is that when it is the computer' turn it should pick the move that will be best for the computer each possible move is analyzed to find the value that would be best for the computer we'll let represent the best move for the computer the worst move the computer could make will be represented by - move values can range between and - when it is the computer' turn it will pick the move that results in the maximum move value that' the max portion of minimax to find the best movethe computer will play out the gamealternating between the best move it could make and the best move the human could make best move for human would be - when it is the human' turnthe computer will assume that the human will make the best move he/she can make this is the min part of minimax the minimax function is given two argumentsthe player (either - for human or for computerand the board for the game the base case for this recursive function checks to see if one of three things has occurred the current board is win for the computer in that case minimax returns for computer win the current board is win for the human in that case minimax returns - for human win the current board is full in that casesince neither human or computer wonminimax returns the recursive part of the minimax function examines the player argument if the player is the computerthen the function tries each possible move in the board by making computer move it places computer move in that spot in copy of the board and calls minimax with the human as the next player on that board the algorithm uses the guess and check pattern to find the maximum of all possible values that come back from the recursive calls to minimax the minimax function then returns that maximum value when minimax is called with the human as the next player to make moveit does the same thing as when the computer is called as the player it makes human move in copy of the board and recursively calls minimax on the copy of the board with the computer as the next player to play the algorithm uses the guess and check pattern to find the minimum of all possible values that come back from calling minimax recursively there is one little tricky part to minimax the minimax algorithm is called with board and the next player to make move it returns number somewhere between - and indicating how likely it is that the computer or the human will win given this copy belongs to 'acha