Your task is to make this tttab
Ask Expert

Be Prepared For The Toughest Questions

Practice Problems

Your task is to make this tttab

Tic-Tac-Toe game with prolog

Reference: https://www.cpp.edu/~jrfisher/www/prolog_tutorial/5_3.html

To work this ttt game with prolog and Java GUI - you may do this assignment by yourself or in a team of 2 persons. Your task is to make this tttab (Dr. Fisher's ttt with minimax alpha-beta) game to be a bit more challenging and generalized. 

You may let prolog program to do all (including ttt output and playing with two computer-players), to do away with Java program. If you are comfortable with Javascript (with HTML and/or CSS, without Java program) then this would be an option for you or your team.

Part1. Task #1. 
To make ttt 3x3 game to be computer against computer. 
You may use the same prolog program to be duplicated (one for computer1 and the other for computer2 to play each other) as they both use minimax alpha-beta strategy. That is, very tough contender to each other. (The Java program calls each player to get the move one after the other.)
Note. Create a folder named: ttt1 (to place all the programs and the output file (log of program run), etc. here to be uploaded in a zip file (with other folders or files for this assignment).
Name your program: ttt1 (to run, and name the program source file name to be: ttt1.pl, ttt1ab.pl, ttt1.java, ttt1-out.txt, etc.).
Part1. Task #2. 
To make ttt2 game (computer by computer) to be run M times where M would be 1, 10, 100, 1000. Also provide a timer to take each move in S seconds (a pause time for a human to observe the game play) where S can be 0.1 to 1 second. If S is 0 then it runs as fast as it can. 
Note. Create a folder named: ttt2 (to place all the programs and the output file (log of program run), etc. here to be uploaded in a zip file (with other folders or files for this assignment).
Name your program: ttt2 (to run, and name the program source file name to be: ttt2.pl, ttt2ab.pl, ttt2.java, ttt2-out.txt, etc.).
Provide the summary of each game: who wins how many times (and in per cent). 
Hint for Part1 #1.
Note that the Java program runs Player1 (human) and GUI where Prolog program runs Player2 (computer) being called by Java program for the next move. Essentially the Prolog program for Player1 should be same (or almost same) as the code for Player2. That is, you may simply copy the Prolog program to be Player1 to called by Java program for Player1. One thing to change is the port number so that Java starts both Player1 and Player2 prolog programs as clients to be connected to Java program (a server listening to two ports – one for Player1 and the other for Player2). Otherwise, your code will confuse the Java program on which player is which player.  Also note that the prolog code has minimax alpha-beta code that you need to review and understand.  
Part2. Task #1. 
To make ttt game to be NxN ttt game where N is 4. A player who gets first its 3 tokens in a line (row, column, diagonal) wins the game. 
Note. Create a folder named: ttt4x4 (to place all the programs and the output file (log of program run), etc. here to be uploaded in a zip file (with other folders or files for this assignment).
Name your program: ttt4x4 (to run, and name the program source file name to be: ttt4x4.pl, ttt4x4ab.pl, ttt4x4.java, ttt4x4-out.txt, etc.). 
Part2. Task #2. 
To make ttt game to be NxN ttt game where N is 3 to 6. A player who gets first its 3 tokens in a line (row, column, diagonal) wins the game. For GUI, please provide a button (option-button or radial-button to select the size N of ttt board) or similar to facilitate this extension.  
Note. Create a folder named: tttNxN (to place all the programs and the output file (log of program run), etc. here to be uploaded in a zip file (with other folders or files for this assignment).
Name your program: tttNxN (to run, and name the program source file name to be: tttNxN.pl, tttNxNab.pl, tttNxN.java, tttNxN-out.txt, etc.).  
Part3. Task #1. 
To make ttt 3x3 game to be computer against computer, with a block.
The board will place a block (where you may use the "*" or "+" to mark the cell) on the board to show up on a cell, preventing one's move for this cell for one player ready to select one's choice of cell. This is one-time blocking and to be cleared out for next player. That is, the cell is blocked for this player for this move/time only. Then the block will be cleared for the next player and the board will select a cell to be blocked for the next player. A block will prevent the selected cell to be selected as a choice. After the move of the player, the block disappears. The board will select one cell for a block from one of the cells (or choices) of the player to get any cell which could result in three in a line for the player. 
The board will find and select one of the best cells for the blocking (for example, using alpha-beta pruning). Further the board will decide to block this player or not using a fair coin (with a chance of 0.5) to block this player or not for this time.
Note. Create a folder named: ttt3 (to place all the programs and the output file (log of program run), etc. here to be uploaded in a zip file (with other folders or files for this assignment).
Name your program: ttt3 (to run, and name the program source file name to be: ttt3.pl, ttt3ab.pl, ttt3.java, ttt3-out.txt, etc.).
Part3. Task #2. 
To make ttt3 game (computer by computer) to be run M times where M would be 1, 10, 100, 1000. Also provide a timer to take each move in S seconds (a pause time for a human to observe the game play) where S can be 0.1 to 1 second. If S is 0 then it runs as fast as it can.  
If running more than one-time, then your output is the summary of all the runs (for example, who wins and how many times, etc.).
Note. Create a folder named: ttt3M (to place all the programs and the output file (log of program run), etc. here to be uploaded in a zip file (with other folders or files for this assignment).
Name your program: ttt3M (to run, and name the program source file name to be: ttt2M.pl, ttt3Mab.pl, ttt3M.java, ttt3M-out.txt, etc.).
Provide the summary of each game: who wins how many times (and in per cent).  
Part4. 
To make ttt game (computer by computer) to integrate what you have done in Part1-3.
That is, ttt can play: NxN board, M times with blocking one cell by the board (one-time block). 
Provide Java GUI to have the needed buttons to select each option to be tried.
Note. Create a folder named: ttt4 (to place all the programs and the output file (log of program run), etc. here to be uploaded in a zip file (with other folders or files for this assignment).
Name your program: ttt4 (to run, and name the program source file name to be: ttt4.pl, ttt4ab.pl, ttt4.java, ttt4-out.txt, etc.).
Provide the summary of each game: who wins how many times (and in per cent). 
Part5 
To make ttt game (computer by computer of Part4 Task#1) to have non-zero sum game. 
Each player has initially N*N*10 tokens where N is the size of the board NxN.
For each game, each player bets 10 tokens. For each move, each player adds 1 tokens to continue. At the end of the game, the winner takes all the tokens at stake for this case. One player in the middle of a game may yield (give up to declare one's loss) to terminate a game and the other player is the winner to get all the tokens at stake for this game case. 
Provide Java GUI to provide any initial setting and/or the display of game results (for example, each player's tokens and tokens in the betting pot of the current game). 
Note. Create a folder named: ttt5 (to place all the programs and the output file (log of program run), etc. here to be uploaded in a zip file (with other folders or files for this assignment).
Name your program: ttt5 (to run, and name the program source file name to be: ttt5.pl, ttt5ab.pl, ttt5.java, ttt5-out.txt, etc.).
Provide GUI (e.g., the summary of each game: who wins how many times and in per cent).  
Part6. Project Documentation
Finally prepare for this game project in word document (template will be provided) to be submitted: (1) project document, (2) technical document, and (3) a zip file containing all the program related work (source code, run-log, screen-shots, etc.).
Note. Create a folder named: ttt6doc (to place all the programs and the output file (log of program run), etc. here to be uploaded in a zip file (with other folders or files for this assignment).
Bonus. Part7 
To make ttt game to have X players (X more than 2) for NxN board with M times run. You may represent Player1 with "1" for a cell (and Player 2 with "2", etc.). 
Note. Create a folder named: ttt7 (to place all the programs and the output file (log of program run), etc. here to be uploaded in a zip file (with other folders or files for this assignment).
Name your program: ttt7 (to run, and name the program source file name to be: ttt7.pl, ttt7ab.pl, ttt7.java, ttt7-out.txt, etc.).
Provide GUI (e.g., the summary of each game: who wins how many times and in per cent). 
Hint
ManagementJavaScript is a language used in programming for website development. It was developed initially to add dynamics as well as interactive elements to websites. It is characterized by being a first-class function, having curly-bracket syntax, prototype-based object orientation, and dynamic typing....

Know the process

Students succeed in their courses by connecting and communicating with
an expert until they receive help on their questions

1
img

Submit Question

Post project within your desired price and deadline.

2
img

Tutor Is Assigned

A quality expert with the ability to solve your project will be assigned.

3
img

Receive Help

Check order history for updates. An email as a notification will be sent.

img
Unable to find what you’re looking for?

Consult our trusted tutors.

Developed by Versioning Solutions.