Search the whole station

AI算法代写 AI algorithms代写 Python代写 Algorithms代写

COMP 424 Final Project Game: Colosseum Survival!

AI算法代写 1.Goal The main goal of the project for this course is to give you a chance to play around with some of the AI algorithms discussed in class,


The main goal of the project for this course is to give you a chance to play around with some of the AI algorithms discussed in class, in the context of a fun, large-scale problem. This year we will be working on a game called Colosseum Survival! ( Project-COMP424-2022-Winter). Koustuv Sinha and Shuhao Zheng are in charge of the project, and should be contacted directly about any bugs in the provided code. General questions should be posted in Ed. This is a group project, with two students per group.

2.Game Description and Rules AI算法代写

Colosseum Survival! is a 2-player turn-based strategy game in which two players move in an M × M chessboard and put barriers around them until they are separated in two closed zones. M can have a value between 6 and 12. Each player will try to maximize the number of blocks in its zone to win the game.

2.1 Setup

At first, players A and B are randomly positioned on the chessboard symmetrically. The two players will take turns to move in the chessboard and put barriers. In each turn, one player will move at most K steps and must put a barrier in one of the 4 directions around


2.2 Objective

The game ends when two players are separated into two closed zones by barriers and borders. The final score of each player is the number of blocks in its zone in the endgame. The player with the higher score will win the game, and will be awarded 1 point. If there is a tie, both players will be awarded 0.5 points. An example gameplay is shown in Figure 2.

2.3 Playing the game

For each step, the move consists of providing an (x,y) co-ordinate of the board where the player wants to go, and a direction (up/right/down/left) the player wants to put a wall. The number of steps taken to go to position (x,y) will be automatically computed by the game engine using a breadth-first-search algorithm, and if the steps are more than K then errors will be shown.

2.4 Evaluation AI算法代写

In the first round of the evaluation, we will hold a competition where every submitted program will be playing one match against a random subset of all submissions. Due to the deterministic nature of the game board, each match will consist of N games, giving both programs equal opportunity to play first (typically N > 1000). For the second round, the 10 percent highest scoring agents from the first game will play against each other in the playoff round where each agent is paired against all other agents to find the highest scoring agents. The evaluation phase will require a lot of matches so please be mindful of your program’s runtime. We will perform a screening process by pairing your agent with a random agent to ensure the runtimes matches the expectations (check the Tournament Constraints in Section 5.1.1).

3.Assignment Details AI算法代写

In this final project, your task is to develop an agent to play the Colosseum Survival game. We have developed a minimalistic game engine in Python, which you will extend to add your own agents.

3.1 Pre-requirements

This project you will need to implement agent that playes Colosseum Survival using Python. Specifically, we strongly recommend to brush up Python 3 fundamentals before writing your code. We would also require you to know git fundamentals to work with the version control system, and have an account in Github.


Figure 2: A sample game between two agents (A and B) on a 4×4 chessboard, thus having max allowable steps K = 2. The board is initialized (Step 0) with random (symmetrical) wall placements. A then moves to position (1, 1) and places a wall on the top (Step 1). B remains in the same position (2, 1) and places a wall on the right (Step 2). A then wins the game by staying in the same position (1, 1) and placing a wall on down, thus having control of 9 blocks in the board (Step 3).

3.2 Working with Github Classrooms

For the purposes of this project, we will be using Github Classrooms. Github Classrooms allow us to easily share the template repository and create private repositories for students.

To start working in your assignment:

  • Accept this invitation ( to be added to our COMP 424 Github Classroom.
  • Choose or create your team. Teams can be formed only with two members.
  • Once you accept the assignment, your code repository will be setup using the starter code.
  • In your repository, a Pull Request (PR) would be automatically created, which would serve as a way to communicate with the TAs about specific, privateconcerns regarding your code or to get feedback. Alternatively, you can contact the TAs involved in this project directly.
  • Clone your assigned repository to start working on the assignment1.
  • Navigate to the cloned directory and install the dependencies : pip install -r requirements.txt
  • To test that everything runs on your machine as required, run the following command in the cloned directory: pytest

¹ Check the detailed description of the files in the repository in Section

3.3 Implementing your own agent AI算法代写

You need to write your own agent and submit it for the class project. Detailed instructions of various parts of the game is available in the file. Follow the steps to implement and test your own agent:

  • Modify the student file in agents/ directory, which extends the agents.Agent (in agents/ class.
  • Implement the step function with your game logic
  • Register your agent using the decorator register agent. The StudentAgent class is already decorated with the name “student agent”, feel free to change it or keep it the same.
  • Import your agent in the init .py file in agents/ directory. This step is already done for StudentAgent.
  • Run and test your agent using script.

Important: You should not modify any other files apart from student and any helper file you need should also be created within agents/ directory. In the event of any update to the game code, the TAs will announce the necessary steps in Ed to pull the starter code.

3.4 Play with your agent AI算法代写

You can use the script to run an interactive session with your agent! A Human agent (yourself) is defined in agents/ directory, along with a random walk agent.

You can first visualize the game happening between the two agents as follows:

python \
--player_1 human_agent \
--player_2 random_agent \

You can play with your agent likewise by using the name you registered your agent with (e.g. “student agent”). To quickly play the game without displaying the UI, remove the –display flag.

3.5 Testing and Autoplay AI算法代写

Since the game setup is non-deterministic, your submitted agent will be evaluated on multiple runs by playing them against the random agent or other student submissions. This is achieved by the autoplay mode, enabled by –autoplay flag in Thus, it is crucial that you test your agent against the random agent before submitting your work. You can play with the flag –autoplay runs to set the number of simulations. In autoplay mode, the starting agent is swapped every other run, so as to remove the disadvantage of starting first in the game.

During autoplay, if your agent does not adhere to the boundary conditions of the board, or attempts to make an invalid move (more than K steps), the game engine will automatically run a random walk on behalf of your agent. This may adversely affect your agents performance during evaluation. You should test your agent thoroughly for these edge cases.

3.6 Submission

First, fill your and your team members details in authors.yaml file in the repository. You should periodically commit your code and push it to the repository assigned to you. Your code will be automatically deemed submitted post the deadline date. You can continue to make changes in the Github Classroom repository before the deadline. Any changes post the deadline will not be used for the final evaluation.

4.Report AI算法代写

You are required to write a report with a detailed explanation of your approach and reasoning. The report must be a typed PDF file, and should be free of spelling and grammar errors. The suggested length is between 4 and 8 pages, but the most important constraint is that the report be clear and concise. You should use the source of this document2 as a template to write your report in LATEX. The report must include the following required components:

  • An explanation of how your program works, and a motivation for your approach.
  • A brief description of the theoretical basis of the approach (about a half-page in most cases); references to the text of other documents, such as the textbook, are appropriate but not absolutely necessary. If you use algorithms from other sources, briefly describe the algorithm and be sure to cite your source.
  • A summary of the advantages and disadvantages of your approach, expected failure modes, or weaknesses of your program.
  • If you tried other approaches during the course of the project, summarize them briefly and discuss how they compared to your final approach.
  • A brief description (max. half page) of how you would go about improving your player (e.g. by introducing other AI techniques, changing internal representation etc.)

² You can find the source of this document in Overleaf here:

You would need to create an Overleaf account. Copy this project and create a new project to write your report. Replace the author information with your own group information.

4.1 Submission

To submit your report, you should also add the report PDF directly in the repository in the report folder, rename it to report.pdf, and commit and push your report alongside with your code.

5.Grading Scheme AI算法代写

50% of the project grade will be allotted for performance in the tournament, and the other 50% will be based on your report.

5.1 Tournament Grading Scheme

The top scoring agent will receive full marks for the tournament. The remaining agents will receive marks according to a linear interpolation scheme based on the number of wins/losses they achieve. To get a passing grade on the tournament portion, your agent must beat the random player.

5.1.1 Tournament Constraints

During the tournament, we will use the following additional rules:

Execution Environment.

We will run the tournament on Linux environment (CentOS 7), Python 3.9 and install libraries as defined in requirements.txt. However, you are not allowed to use external libraries. This means built-in libraries for computation are allowed but libraries made specifically for machine learning or AI are not. If you think you would require some external libraries not specified in requirements.txt and which is not a AI/ML specific library, please post a question in Ed to get an approval from the TAs.

Turn Timeouts. AI算法代写

During each game, your agent will be given no more than 30 seconds to choose its First move, and no more than 2 seconds to choose each subsequent move. The initial 30 second period should be used to perform any setup required by your agent (e.g. any pre-processing step). If your player does not choose a move within the allotted time, a random move will be chosen instead. If your agent exceeds the time limit drastically (for example, if it gets stuck in an infinite loop) then you will suffer an automatic game loss.

Illegal moves.

In the game, if your agent attempts to move to positions which are illegal, i.e. which requires more number of steps than K, then we will run a random walk over the game board. If your code fails during execution, then the game will also continue with a random move.

Multi-threading. AI算法代写

Your agent will be allowed to use multiple threads. However, your agent will be confined to a single processor, so the threads will not run in parallel. Also, you are required to halt your threads at the end of your turn (so you cannot be computing while your opponent is choosing their move).

File IO.

Your player will not be allowed to read and write files : all file IO is prohibited. In particular, you are not allowed to write files, so your agent will not be able to do any learning from game to game.

Memory Usage.

Your agent will run in its own process and will not be allowed to exceed 500 mb of RAM. Exceeding the RAM limits will result in a game loss.

You are free to implement any method of choosing moves as long as your program runs within these constraints and is well documented in both the write-up and the code. Documentation is an important part of software development, so we expect well-commented code. All implementation must be your own.

5.2 Report Grading Scheme AI算法代写

The marks for the write-up will be awarded as follows:

  • Technical Approach: 20/50
  • Motivation for Technical Approach: 10/50
  • Pros/cons of Chosen Approach: 5/50
  • Future Improvements: 5/50
  • Language and Writing: 5/50
  • Organization: 5/50

6.Academic Integrity

This is a group project. The exchange of ideas regarding the game is encouraged, but sharing of code and reports is forbidden and will be treated as cheating. We will be using document and code comparison tools to verify that the submitted materials are the work of the authors only.

7.Detailed description of the repository AI算法代写

The starter code can be viewable here: Project-COMP424- 2022-Winter. The following describes the usage of each component of this code:

|           # Storing agents for decorator
| # Main Game engine code
|-requirements.txt # Specify external libraries to be installed used pip
|-test # Unit test files
| |
| | # Test case for AI agents
| | # Test case for game engine
| # UI Engine files
|-authors.yaml # Students should fill out author information
| # Handy constants for the game
|-agents # Directory containing all agents
| | # Agent that takes random walk
| | # All agents should be imported here
| | # Human agent using which you can play interactively
| | # Base agent class
| | # Implement your AI here
| # Some utilities for the game
| # Main entry point for running the game
|-report # Upload your report in this directory
| |


更多代写:CS北美网课作业代写  线上考试怎么防止作弊  英国代写机构收费  北美文科论文作业代写  代写案例 澳洲paper代写

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

The prev: The next:

Related recommendations