initial minimax algorithm implemented