Minimax algorithm implementation start