Here is some psuedocode for one who wishes to implement this search strategy.

minimax(input board, output actual_score, output actual_move)
best_score = -infinity; for each possible move (call it current_move): copy board into temp_board simulate current_move on temp_board //recursively find each subsequent 'best move' minimax(board, the_score,the_move) if the_score is greater than best_score best_score = the_score best_move = current_move end if end for actual_move = best_move if there are no possible moves (leaf node) actual_score = evaluated value of board end if else actual_score = best_score end else end function