Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

Design AI for Playing Gomoku
desciption and figure from wikipedia (https://en.uikipedia.org/uiki/Gomoku)

Gomoku: Gomoku, also called Five in a Row, is an abstract strategy board game. It is traditionally played with Go pieces (black and white stones) on a Go board. It is played using a 15x15 board while in the past a 19x19 board was standard. Because pieces are typically not moved or removed from the board, gomoku may also be played as a paper-and-pencil game. The game is known in several countries under different names.
several countries under different names.
Rule: Players alternate turns placing a stone of their color on an empty intersection.Black plays first. The winner is the first player to form an unbroken chain of five stones horizontally, vertically, or diagonally.Placing so that a line of more than five stones of the same color is created does not result in a win. These are called overlines.
Task: Your task is to implement the following functions in C/C++:
1. int checkBoardStatus(intboard[15][15]):return 0 if no one wins;
return 1 if black wins; return 2 if white wins.
2. void play(int board[15] [15],int color, int position[2]):play
a pebble with color at the board (position[0],position[1]). Let's as- sume that black-1 and white-2 for consistency.Let's further assume board[i][j]=0 if position (i, j) is available for playing a pebble; board[i][j]=1 if position (i, j) has a black pebble; board[i][j]-2 if position (i,j) has a white pebble.
3. void search(intboard[15] [15],int color, int position[2]): search
the best position for the given color and return it in the position array. You are recommended to use the Monte Carlo Tree Search algorithm to find the best possible position.
4.void display(int board[15][15]):display the current status of the
board.
5. int main(): main function which takes human input from keyboard and
play with the AIyou designed.

Expert Solution
Check Mark
Still need help?
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Please provide answers to the following questions based on the previous code(JAVASCRIPT):

  1. What are the weaknesses or limitations of the current implementation?

  2. Does the current implementation utilize the Monte Carlo Tree Search (MCTS) algorithm? If not, please describe the algorithm used for the implementation.

  3. What are the expectations or objectives of the current implementation in terms of performance and functionality?

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Question

Please I want to the same code to be implemented in javascript. Please make sure its encoding is UTF-8 and the input and output  should be in JSON

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Please provide answers to the following questions based on the previous code(JAVASCRIPT):

  1. What are the weaknesses or limitations of the current implementation?

  2. Does the current implementation utilize the Monte Carlo Tree Search (MCTS) algorithm? If not, please describe the algorithm used for the implementation.

  3. What are the expectations or objectives of the current implementation in terms of performance and functionality?

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Follow-up Question

Please I want to the same code to be implemented in javascript. Please make sure its encoding is UTF-8 and the input and output  should be in JSON

Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education