Machine learning program using Minimax algorithm