Question: 4 : 3 8 . 1 1 5 5 1 of 2 BIRZEIT UNIVERSITY Design and Analysis of Algorithms ( COM 3 3 6 )
:
of
BIRZEIT UNIVERSITY
Design and Analysis of Algorithms COM
Fall Semester
Final Project
Due Date Proj# Final Project: JAN
TicTacToe AI Algorithm
Let us combine what we have learnt so far about minimax and evaluation function to write a proper TicTacToe that plays a perfect game. This game will consider all possible scenarios and makes the most optimal move.
let's build some TicTacToe that all conform to a consistent interface, and see for ourselves why interfaces are so helpful.
We're going to write several different TicTacToe scenarios, each of which will choose their moves using different strategies of varying degrees of complexity. We also want to be able to challenge your friends and family to a duel.
Game scenarios:
Scenario that makes random moves
We're going to start by writing one of the simplest ways. This option will look at the board, find all the legal moves, and return one of them at random. We'll write a function called randomoption that conforms to our interface. This means that it accepts arguments a TicTacToe board and the current player and returns the coordinates of a move.
Two human players to play against each other.
Tictactoe unbeatable Minimax algorithm
ritaj.birzeit.edu
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
