Question: Create a bot that will play 4x4 tic-tac-toe using PYTHON. 4x4 but any 3 squares in a row (vertical, horizontal, diagonal) can be counted as
Create a bot that will play 4x4 tic-tac-toe using PYTHON.
4x4 but any 3 squares in a row (vertical, horizontal, diagonal) can be counted as a win.
Can play Computer vs Computer or Computer vs Human, but should have the ability to do both.
Analyze the state space - How big is the space to search? How many boards can you fit into 8GB of memory? Assume no optimizations (i.e. symmetry.) If it turns out that 4x4 is trivial, use a 5x5 board.
Write the gameplay - Create a UI/GUI that allows a human to play your bot. For now, have your bot pick a random move. You need to determine when the game has been won. You should handily beat your bot. Also allow your bot to play itself and watch the game via your UI/GUI. Include an option to output a game to a file. Also include an option to playback a saved game.
Add a minimax search - Instead of a random move, use minimax to determine the optimal move. Research and create an evaluation function. Include a way to count the number of boards you have processed during the search.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
