four-in- -rowa "connect fourclone the game --connect four|has board where the players take turns dropping tokens from the top of the board the tokens will fall from the top of each column and come to rest on the bottom of the board or on top of the topmost token in that column player wins when four of their tokens line up in row either horizontallyverticallyor diagonally the ai for this game is pretty good it simulates every possible move it can makethen simulates every possible move the human player can make in response to each of those movesand then simulates every possible move it can make in response to thatand then simulates every possible move the human player could make in response to each of those movesafter all that thinkingthe computer determines which move is most likely to lead to it winning so the computer is kind of tough to beat usually lose to it since there are seven possible moves you can make on your turn (unless some columns are full)and seven possible moves the opponent could makeand seven moves in response to thatand seven moves in response to thatthat means that on each turn the computer is considering , possible moves you can make the computer consider the game even further by setting the difficulty constant to higher numberbut when set to value larger than the computer takes long time to calculate its turn you can also make the computer easier by setting difficulty to then the computer only considers each of its moves and the player' possible responses to those moves if you set the difficulty to then the computer loses all intelligence and simply makes random moves source code for four-in- -row this source code can be downloaded from