Assignment Chef icon Assignment Chef

[Solved] CSE 231 Honors Project #1

5.0 1 customer review Digital download

Digital download

$25.00

Availability
In stock
Checkout
One item

Need a hand?

Message us on WhatsApp for payment or download support.

WhatsApp QR code Open WhatsApp

Assignment Overview

Overview

Write a program that plays the game dots-and-boxes: https://en.wikipedia.org/wiki/Dots_and_Boxes and record some statistics about using a player who plays randomly i.e., a player who has no strategy except random play (to be described below). This version will focus on scoring play and getting RandomPlayer to play the game. The game should work for any dimensions (hint hint).

Play

The scoring is pretty well explained in the link above, but lets review: o If drawing a line results in a box, that is a square is produced in the grid, then that player adds one to their score and can play again

More details on play

The grid will be represented by ASCII characters on the terminal. A typical look below: Some details:

Data Structures

Come up with your own data structures. Things you will likely need:

Functions or Classes

I dont want to restrict you too much, but I do want readable code! You should be using functions or classes or you may not get credit. Some good functions (as suggestions):

Random player

We are not going for automated strategy here nor are we going for human interaction. In the second round we are going to be making players that play the game well, but for now we are going to make a random player function called random_play

Main Program

You are going to use your random_play function to play dots-and-boxes. Your main program will operate in two modes:

More detail

multiple_play.txt. The statistics to include are:

Deliverables

The deliverable for this assignment is the following files: honors1.py the source code for your Python program single_play.txt the text file reporting each individual play multiple_play.txt the text file reporting the statistics of all the rounds Be sure to use the specified file names and to submit it via the Mimir system before the project deadline. No automatic tests will be posted in Mimir. The grading will be done manually. Requirements Your code must adhere to the entire Coding Standard.

Notes

o if it takes minutes to do that, you need to rethink it.