In this assignment, you will design an implement an agent that participates in a competition, or evaluate an environment that can be used for such competitions.
Option 1: Competitions
For this option, you participate in a competition with other students by implementing and submitting an agent for one of the environments below.
Robocode Agent
The task for this option is to design and implement a simple reflex agent (without state information) using the Robocode agent toolkit.
The score will be determined by the quality of your design and implementation, the level of sophistication your agent achieves, and the performance of your agent in competition with other agents.
Agent Design
[5 points]
In this part, you need to describe the overall architecture of your agent. It consists of the following sections:
- a PEAS (or PAGE) description of the agent;
- a design overview, identifying the main components of the agent;
- a table with the percepts and corresponding actions that determine the behavior of the agent;
- a discussion of the expected capabilities and limitations of your agent.
Implementation
[5 points]
Here you need to discuss specific implementation aspects of your agent, e.g. how you decided to realize the "reflexes" of the agent. You may include relevant parts of your source code here, but make sure that it is explained and commented well.
Performance
[15 points]
Your agent should be able to compete with other Robocode agents. The performance of your agent will be evaluated in two stages:
- One-on-One [10 points]: Your agent will individually battle five of the default agents in the Robocode environment in competitions lasting ten rounds. The set of opponents will be determined in class. You will get one point for each win of a competition according to the standard Robocode scoring scheme.
- One-on-Many [5 points]: In this case, your agent has to fight multiple opponents in one or more competitions lasting ten rounds. All the agents submitted will be randomly assigned into pools of up to ten agents, and the number of points is determined by the ranking of your agent in the competition (e.g. rank 1 gets 10 points, rank 2 gets 9, etc.) If time permits, we will conduct this competition "live" during one of the lab sessions.
For the first part, you need to submit the agent design and implementation documents as specified above, together with the code for your individual agent. This agent will participate in the one-on-one competition with the following robots from the robocode environment: Tracker, myfirstrobot, corner, sitting duck, rambot.
Part 2: One-On-Many Competition
The final version of your agent is due for the second part. It will determine your score through the one-on-many competition. Depending on the number of submissions, your agent will battle agents submitted by other students from the two 480 sections, or the above agents from the RoboCode repository. We may also include a few agents from previous classes to achieve an equal number of agents for each group
Prisoner's Dilemma
In its "classical" form, the prisoner's dilemma (PD) is presented as follows: Two suspects are arrested by the police. The police have insufficient evidence for a conviction, and, having separated both prisoners, visit each of them to offer the same deal. If one testifies ("defects") for the prosecution against the other and the other remains silent, the betrayer goes free and the silent accomplice receives the full 10-year sentence. If both remain silent, both prisoners are sentenced to only six months in jail for a minor charge. If each betrays the other, each receives a five-year sentence. Each prisoner must choose to betray the other or to remain silent. Each one is assured that the other would not know about the betrayal before the end of the investigation. How should the prisoners act?
[from the Wikipedia entry for Prisoner's Dilemma]
Competitions based on this dilemma have been organized before (see http://www.prisoners-dilemma.com/ and http://www.wired.com/culture/lifestyle/news/2004/10/65317. One of the students in the F08 class, Greg Flanagan, has adapted a Scheme version of the environment to Java for this class. For more information, see the respective entry on the Blackboard discussion board.
Option 2: Environment Exploration
In this option, you select an environment of your choice, and evaluate it for its suitability as outlined above. The general idea for this homework is to explore the use of various environments that seem suitable for competitions related to Artificial Intelligence. If suitable, the environment or task may be used for homework assignments in future courses. The task and environment should meet most of the following objectives:
- relevance to AI topics discussed in the course (e.g. agents, search, knowledge representation, logic and reasoning, learning,
- suitable for multiple tasks and topics with a competitive aspect to at least one of the tasks
- low to moderate learning curve
- cross-platform availability (usually Windows, Mac OS, Linux
- low cost, ideally free
For the evaluation of the environment, consider such issues as:
- Is the task to be solved by the agent suitable for a simple reflex agent? Would it be unrealistic to expect decent performance? Would a model-based agent fare significantly better?
- Does the environment use and give the agent access to a map or coordinate system that allows the use of search algorithms?
- Could the agent use a reasonably simple knowledge representation method (e.g. an array of objects with properties), and can simple reasoning techniques be used with a decent chance for satisfactory performance?
- Is the task and environment suitable for the use of learning methods, such as inductive learning (e.g. via series prediction, decision tree learning, or neural networks)?
- Looking at available agents, do some of the interesting or successful ones use any of the above techniques?
- Can the environment be used for a competition among student agents? This could either be a direct competition, where agents "fight" with each other, or one that is based on performance, and the agent with the highest score wins.
Sample Environments
A few samples are listed below. They have been evaluated before, and have some limitations that make them less suitable for our purpose. If you’re interested in working on this option, you should start searching for possible candidates as early as possible.
CodeRuler Environment Exploration
http://alphaworks.ibm.com/tech/coderuler
CodeRallye Environment Exploration
http://www.alphaworks.ibm.com/tech/codeRally
Breve Environment Exploration
The Breve environment http://www.spiderland.org/ has been used quite successfully in several team projects in this and related classes. While it has several attractive features, it is not clear if it would be well suited for the implementation of search methods and similar tasks, or for competitions.
Administrative Aspects
Assignment Submission
This assignment must be submitted electronically via Blackboard through the "Lab and Assignment Submission" menu entry by the deadline specified above. Please submit the following material, preferably in an archive (.zip, .gz, .rar or .tar):
- observations about the behavior of your agents via a Web form (link will be provided later)
- a plain text file (not a MS Word document) named README.txt with your name, a brief explanation of your program, and instructions for running your program
- the Java source code for your agents
- screen shots for the "Evaluation Map" and the "Search Map"; the screen shots should show both the fairy and the agent view, and the final score; use names that indicate the respective map (e.g. fkurfess-Challenge-results.png)
- log files that capture the performance of your agent on the maps provided; please save them as plain text files, and use names that indicate the respective map (e.g. fkurfess-Challenge-results.txt)
- the Java executable (class file) for your agents
- optionally additional files that may be relevant for the grading (e.g. make files, log files, or special environments you used)
Please use your Cal Poly login as the first part of your agent's name. You can add a smart or descriptive expression as the second part. This will allow us to keep all agents in the Agents directory, without having to edit your files or moving files back and forth when we do the grading.
Collaboration
This is an individual assignment, and you need to write your own agent(s). You may use the example bots from the robocode environment as starting points, but you are not allowed to incorporate code from other agents, e.g. from Internet repositories, or from other students. You may employ strategies from other agents, but you need to write your own code to implement them. The use of Java libraries is allowed. Violations of this policy will result in lower scores for this assignment. In addition, the general Cal Poly policies on Academic Dishonesty: Cheating and Plagiarism apply.
Questions about the Assignment
Since this is an experimental homework, some aspects of the exact task definition and evaluation criteria will be discussed in class, and may be subject to some minor modifications.
If you have general questions or comments concerning the programming aspects of the homework, post them on the Blackboard Discussion Forum for the assignment. The grader and I will check that forum on a regular basis, and try to answer your questions. If you know the answer to a support or clarification question posted by somebody else, feel free to answer it; this will count as extra participation credit.