that board howeverit does not tell you which move is the best to make to deal with this we can have the code that executes the computer' turn do little of the work for the computer turn code to find the best move it makes move in copy of the boardcalls minimax with the human as the next player to make moveand then records the value that comes back from the call to minimax the computer turn code uses the guess and check pattern to find the maximum value for all possible moves and the associated move which resulted in that value after finding the best movethe computer' turn ends by the computer making that move in the board and returning so the human can make their next move the tic tac toe codewhich can be found on the text' accompanying website or in sect contains the outline for the game the minimax function and the computerturn code are left as an exercise for the reader minimax can be used in many two person games of perfect information such as checkers and connect four the term perfect information means that both players can see the whole state of the game [ poker is game of imperfect information so would not be suitable for the minimax algorithm it should be noted that tic tac toe has small enough search space that the computer can solve the game that means it will never lose most games however are not solvableat least with the average computer for instanceconnect four has much larger search space and can' be completely solved heuristics are applied to games like connect four to estimate how good or bad board is after the minimax algorithm has searched as deep as it can given its time constraints games like these are often studied in the field of artificial intelligence [ artificial intelligence includes the study of search algorithms that may be used even when the search space is too large to use an exhaustive search in this textchap covers few heuristic search algorithms along with heuristic applied to the minimax algorithm for the game of connect four linked lists sequences can be organized in several different ways the pylist sequence was randomly accessible list this means that we can access any element of the list in ( time to either store or retrieve value appending an item was possible in ( time using amortized complexity analysisbut inserting an item took (ntime where was the number of items after the location where the new item was being inserted if programmer wants to insert large number of items towards the beginning of lista different organization for sequence might be better suited to their needs linked list is an organization of list where each item in the list is in separate node linked lists look like the links in chain each link is attached to the next link by reference that points to the next link in the chain when working with linked listeach link in the chain is called node each node consists of two pieces of informationan itemwhich is the data associated with the nodeand link to the next node in the linked listoften called next the code in sect defines the node class that can be used to create the nodes in linked list this copy belongs to 'acha