MiniMaxQ : calculation of V
MiniMaxQ : wrote outer cycle (run())