logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Shalu KashyapComputer science
(5/5)

648 Answers

Hire Me
expert
Dushaynat KapoorData mining
(5/5)

850 Answers

Hire Me
expert
Venktesh PrasaadMarketing
(5/5)

886 Answers

Hire Me
expert
Rubina KhatoonFinance
(5/5)

859 Answers

Hire Me
Operations Research
(5/5)

you will code your AI bots in Python for playing the game called ‘Dots And Boxes’

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Assignment 2

1.    Introduction

In this assignment, you will code your AI bots in Python for playing the game called ‘Dots And Boxes’. This game is played on a rectangular grid of dots. Players alternate drawing a horizontal or a vertical line between adjacent dots - if they complete a box then they score 1 point (per box) and get another turn. The player with the most points once all of the boxes have been completed wins.

1.1  Sign up an Account and View Game Details

1)  Go to the webpage https://www.aigaming.com/ and click on the REGISTER button in the upper right corner to sign up an account.

Then follow the instructions to sign up an account. The account username that you sign up should have the format 4386_20B_XXXX, meaning that it should have the prefix 4386_20B_ and followed by XXXX which are the last 4 digits of your student ID

(e.g., if your student ID is 56781234, then your username should be 4386_20B_1234). Please remember your username and password.

2)  After login, click on GAMES à Dots And Boxes.

Then you will get the information of this game. You can watch the game video (left), and check the leaderboard of this game (right). If you click on VIEW ALL, you will see all the battle history or the whole leaderboard.

Scroll down the page, you can get the documentation and rules of this game.

By clicking on DOCUMENTATION, you can get the detailed game rules, game strategy and programmers’ reference (how to make a move, gamestate, etc.). You should read the information carefully, which is very helpful for you to design your own bot.

If you are familiar with this game or website, you can click on ‘Really Quick Start’ (left column) to get the bare minimum instructions.

1.2  Getting started by online editor

After we know the above information, we can start coding using online editor. You can click on Click here (in the upper corner of every page) to enter the editor.

The editor looks like this:

1.3  How to modify the starter bot? 

The starter bot gives the easiest way to find a move. In the calculate_move() function, we can see that, in each turn, the starter bot randomly chooses a legal move x and then return it.

To write your own bot, you need to change the following line:

x=random.randint(0,len(legal_moves)-1) to your own AI codes.

Please note that timeout for each turn is 5000 ms. Hence you must make a move within 5000 ms.

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme