- Parent Category: Programming Assignments' Solutions
We Helped With This Python Programming Homework: Have A Similar One?
|More Info||Python Online Help|
CS 3600: Assignment 1
Due January 29, 2017 by 11:59PM UTC-12 (Anywhere on Earth)
You will write game playing agents for a game called Team Isolation.
1. The Game
The rules of Team Isolation are simple. In our version, two players take turn placing their own game pieces on different squares of a 7by-7 grid. Each player has 2 game pieces which they can move on the board. At the beginning of the game, the players, in turn, place each of their two pieces on any unoccupied square. The players must use their first two turns to place their two pieces. From that point on, the pieces move like a Queen in chess (any number of squares vertically, horizontally, or diagonally but not past an occupied or blocked square). Each time a player moves their piece, the square that they were previously occupying is blocked and cannot be moved for remainder of the game. The queens can’t move through each other or through the blocked portion. The first player who is unable to move loses.
2. Your Assignment
Your task is to create an AI that can play and win a game of Team Isolation. Your AI will be tested against several pre-baked AIs as well as your peers’ AI systems. You will implement your AI in Python (from a provided iPython notebook), using our provided code as a starting point.
The assignment is available at: assignment_1. Read the README for instructions on how to utilize the repository. See the attached iPython notebook for full details of the useful methods you might need.
In this repository, we provide:
• A class for representing the game state
• A function for printing the game board
• A function for generating legal game states
• A class for running unit tests
• A random AI (baseline test)
Your goal is to implement the following parts of the AI in the class CustomPlayer:
• Evaluation functions (OpenMoveEvalFn() and CustomEvalFn())
• The minimax algorithm (minimax())
• Alpha-beta pruning (alphabeta())
Your agent will have a limited amount of time to act each turn (5 seconds). We will call these functions directly so don’t modify the function names or the parameters.
Note that we only check time each turn, but if your agent takes more than a few minutes at construction time, for example because you’re loading the entire set of possible board states from memory, you will be penalized. We will be ending the submission after 75 mins time window after you submit your assignment.
These are the bare minimum requirements for your AI, and the rest is up to you. You will be scored according to how well your AI performs against some baseline AIs that we provide (see “Grading”). If you want to improve over the base performance, here are a few suggestions:
• Storing the evaluation scores for past moves.
• Modifying your evaluation function to account for “killer moves”.
• Ordering nodes to maximize pruning.
The grade you receive for the assignment will be determined as follows:
You write an evaluation function that scores based on the maximum number of moves that the AI can make minus maximum number of moves opponent can make, and your evaluation function performs correctly on some sample boards we provide.
Your AI defeats a random player >= 60% of the time.
Your AI defeats an agent using OpenMoveEvalFn that is depth limited to level 3 >= 60% of the time. Due to the high branching factor of Team Isolation, we reserve the ability to have our test player move randomly in the beginning of the game.
Your AI defeats an agent using OpenMoveEvalFn that uses iterative deepening and alphabeta pruning >= 60% of the time.
Your AI defeats an AI that uses Thad’s secret evaluation function, iterative deepening, and alpha-beta pruning (a.k.a.
Thad 2.0) >= 60% of the time.
Your AI defeats Thad 2.0 >= 90% of the time.
Submission policy: 1 submission per hour and last submission score.
In addition to the basic assignment, you will have the option to compete against your peers for the glory of being the Spring 2017 AIGame-Playing champ. We’ll set up a system to pit your AI against others, and we’ll be giving out prizes for the top players. May the odds be ever in your favor.
If you wish to compete in the tournament, simply include a plaintext file with a description of your agent, titled ‘AI.txt’, and your CustomPlayer instance will be enlisted.
If you compete in the AI tournament and earn 1st, 2nd or 3rd place, you will receive a bonus:
• 1st place: 3 bonus points on your final course grade.
• 2nd place: 2 bonus points on your final course grade.
• 3rd place: 1 bonus point on your final course grade.
5. Due date
The assignment is due January 29th, 2017 by 11:59PM UTC-12 (Anywhere on Earth time) on Bonnie (https://bonnie.udacity.com/, see Section 6 for details) and on on T-Square [How to change your TSquare time zone] as a zip file.
The deliverables for the assignment are:
• A completed player_submission.py file with code copied from the relevant sections of player_notebook.ipynb
• A brief plaintext description of the inner workings of your agent, if you are competing in the tournament (AI.txt).
Udacity has been kind enough to set up test servers for us at https:// bonnie.udacity.com/. Log in with your GT username and password to access this service.
The instructions in the README detail the process for submitting your assignment for grading. We are going to limit you to 1 submission within any 1 hour window and the last submission that you make will be used to evaluate your grade. When you submit, you will be asked to acknowledge both the honor pledge and the assignment late policy. After that, your agent will run against our suite of tests and your grade will be output to the console. This output will be a truncated version of the full output. To view the full game logs, log into bonnie and navigate to assignment_1. You will have access to the logs in JSON format from this portal.
Once you submit your assignment, you can close your command line interface if you want to and check your results back on bonnie but your results will also show up in command line.
7. Tips and Notes
• There are various tests we will be running on your agent. You should not change the signatures of any method provided in the notebook.
• You can use the ‘time_left’ argument passed to the move() function to get the amount of time remaining if you are using depth limited search or iterative deepening. It gives the time remaining in milliseconds. This is a function, so to get the time you will need to call it as time_left().
Links for installing Python on your computer:
• OSX (http://docs.python-guide.org/en/latest/starting/install/ osx/ )
• Windows (http://docs.python-guide.org/en/latest/starting/install/ win/ )
• Linux (http://docs.python-guide.org/en/latest/starting/install/ linux/ )
Installing IPython notebook (we recommend using pip):
• http://ipython.org/install.html (get version 3 or above)
• You might need to install the notebook using ‘pip install notebook’
Getting started with git
Ask your friendly neighbourhood TA if all else fails