Basics of Minimax algorithm