Question: This is for a Tic Tac Toe game on a 6x7 board. Start with a very simple version of the program, for example, a version

This is for a Tic Tac Toe game on a 6x7 board.
Start with a very simple version of the program, for example, a version that only allows two human players to compete. For that purpose, you would just need a method that checks whether a move is possible or not (column already full?) and another method that checks whether the game is over and what the result is. The next step could be the random-style computer player; just use the random number generator instead of the user input. Detail functions:
1. Finish the method to print the board
2. Write a method humanMove() that allows the program to take a move from the user.
Your method should be able to validate users input until the user enters a valid move.
For example, if the user enters -1 which is not a valid move, then prompt the user to enter his/her move again
3. Write a method checkPossible() that checks a move is possible or not. If a column is already full, return false; else, return true;
4. Write a method checkWin() that checks whether the game is over and what the result is.
5. Write a method computerMove() that uses the random number generator to generate a
random move (a number between 1 and 7) for the computer.
6. Finish the Human-Human play part in main method ( or a separated method called
humanHumanPlay()).
7. Finish the Computer-Human play part in main method ( or a separated method called
computerHumanPlay()).
Week 2 (Mar. 6 Mar. 10):
Develop and implement a suitable static evaluation function () that yields high values if a game configuration is advantageous for Player 1 and low values if the configuration favors Players 2. Test the function on the given situations. Detail steps:
1. Develop the function
2. Implement the function e(p) in a method.
3. Try to implement the minimax procedure with just 1-move look-ahead. Then try to
implement the minimax procedure using recursively method.
Week 3 (Mar. 20 Mar. 24):
Implement the alpha-beta procedure.
1. Revise your minimax method to adapt with the alpha-beta procedure.
2. Write a smartComputerMove() method that call the minimax method to generate a
smart move. Your method should be able to promote the user enter the number of step
does he/she would like the computer to look ahead.
3. Finish the SmartComputer-Human play part in main method ( or a separated method
called smartComputerHumanPlay()).
4. Test your program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!