![]() The root of the tree represents the current state of the game.This assists with calculating if the game is over yet and if so then either the AI wins or if its a tie."X" is represented as "1" on the board, "O" is represented as "-1" (or otherwise) and empty is a "0".The board itself is represented as an array of 9 length, first three spots represents the first row where index 0 is top left corner, 1 is top middle corner and so on.The Minimax is a decision tree based heuristic algorithm, The game is abstracted into the following with specific implementations by myself: ![]() This project will focus on the Minimax implementation as a solution. There are a couple of solutions that can be used, either Machine Learning or the Minimax heuristic algorithm. Consequently the outcome for each player is proportionally inversed to the other, if one goes up the other comes down. If player A wins (+1) then player B (-1) losses (and their sum is -1+1=0, hence the name Zero Sum Game) if neither of them wins then its a tie (0). It is a Zero Sum game, meaning there are only three possible outcomes - Win, Tie and Lose. The game is played by two opposing players. The game was built using Unity - a game development platform, from the grounds up using C# as the scripting language for the logic and AI, deployable to web browsers with ease in a few buttons click. Aritifical Intelligence for a Tic Tac Toe game
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |