Answered step by step
Verified Expert Solution
Question
1 Approved Answer
you will develop a zero sum ( adversarial ) tic - tac - toe game ( noughts and crosses ) by implementing Minimax and its
you will develop a zero sum adversarial tictactoe game noughts and crosses by implementing Minimax and its variation called Negamax algorithm which will consist of a MAX human and MIN a computer players. The human player MAX will play against the machine on a larger tictactoe board where it will move first, and then the MIN player takes turns moving until the game is over. At the end of the game, points are awarded to the winning player and penalties are given to the loser. You will use the extensively studied elements to formulate your game scenario: S: The initial state, which specifies how the game is set up at the start. TOMOVEs: The player whose turn it is to move in state s ACTIONSs: The set of legal moves in state s RESULTsa: The transition model, which defines the state resulting from taking action a in state s ISTERMINALs: A terminal test, which is true when the game is over and false otherwise. States where the game ended are called terminal states. UTILITYsp: A utility function also called an objective function or payoff function which defines the final numeric value to player p when the game ends in terminal state s In chess, the outcome is a win, loss, or draw, with values or Some games have a wider range of possible outcomesfor example, the payoffs in backgammon range from to Your solution should work for the board of any configuration from times board size times or even larger size if your machine permits In a typical tictactoe board game of size times the smart opponent utilizing Minimax tries for a draw ie the value of the root to be which means at the end of the game no triplet cells in any of the horizontal, vertical, or diagonal direction have the connecting symbol chosen by a human player. In this game, you can either choose a nought or a cross X as your human player symbol. However, in a larger board, the end goal changes where the win is for the player who has the larger number of triplets with matching symbols. For example, in this sketch of a times board on the right, both players still draw the game with the score of each.
Provide code and comments for the functions in the screenshot
def getnegamaxscoresself terminal:
def getscoresself terminal:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started