Once in a terminal state, the AI will assign an arbitrary positive score (+10) for a win, a negative score (-10) for a loss, or a neutral score (0) for a tie.Īt the same time, the algorithm evaluates the moves that lead to a terminal state based on the players’ turn. It keeps playing ahead until it reaches a terminal arrangement of the board ( terminal state) resulting in a tie, a win, or a loss. Like a professional chess player, this algorithm sees a few steps ahead and puts itself in the shoes of its opponent. So if you are going through a similar journey, I would like to introduce you to the Minimax algorithm. I struggled for hours scrolling through tutorials, watching videos, and banging my head on the desk trying to build an unbeatable Tic Tac Toe game with a reliable Artificial Intelligence.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |