User Tools

Site Tools


public:t-622-arti-12-1:prog2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:t-622-arti-12-1:prog2 [2012/02/16 11:00] – [Material] stephanpublic:t-622-arti-12-1:prog2 [2024/04/29 13:33] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Programming Assignment 2 - Adversarial Search ====== ====== Programming Assignment 2 - Adversarial Search ======
  
-**Use the [[http://ruclasses.proboards.com/index.cgi?board=arti2012&action=display&thread=104|forum]] or email me, if you have any questions or problems with the assignment. Start early, so you still have time to ask in case of problems!**+**Use the [[http://ruclasses.proboards.com/index.cgi?action=display&board=arti2012&thread=105|forum]] or email me, if you have any questions or problems with the assignment. Start early, so you still have time to ask in case of problems!**
  
 ===== Problem Description ===== ===== Problem Description =====
Line 22: Line 22:
 ===== Material ===== ===== Material =====
   * {{:public:t-622-arti-12-1:connect4_agent.zip|java project for the agent development}}   * {{:public:t-622-arti-12-1:connect4_agent.zip|java project for the agent development}}
-  * {{:public:t-622-arti-12-1:connect4_baseline_agent.zip|baseline connect4 player}}+  * {{:public:t-622-arti-12-1:kiosk.zip|java program for playing Connect-4 against your agent}} (unzip and then start by executing kiosk.jar)
  
-The files in the archive are similar to those in the first programming assignment.+The files in the first archive are similar to those in the first programming assignment. The archive contains code for implementing an agent in the src directory. The agent is actually a server process which listens on some port and waits for the real robot or a simulator to send a message. It will then reply with the next action the agent wants to execute.
  
-The first file contains code for implementing an agent in the src directory. The agent is actually a server process which listens on some port and waits for the real robot or a simulator to send a message. It will then reply with the next action the robot is supposed to execute. +The zip file also contains the description of the environment (connect4.gdl) and a simulator (gamecontroller-gui.jar). To test your agent:
- +
-The zip file also contains the description of some example environment (connect4.gdl) and a simulator (gamecontroller-gui.jar). To test your agent:+
   - Start the simulator (execute gamecontroller-gui.jar with either double-click or using the command "java -jar gamecontroller-gui.jar" on the command line).   - Start the simulator (execute gamecontroller-gui.jar with either double-click or using the command "java -jar gamecontroller-gui.jar" on the command line).
   - Setup the simulator as shown in this picture:   - Setup the simulator as shown in this picture:
Line 34: Line 32:
   - You can use your player as both the first and the second role of the game, just not at the same time.   - You can use your player as both the first and the second role of the game, just not at the same time.
   - Run the "Main" class in the project. If you added your own agent class, make sure that it is used in the main method of Main.java. You can also execute the "ant run" on the command line, if you have [[http://ant.apache.org/|Ant]] installed. The output of the agent should say "NanoHTTPD is listening on port 4001", which indicates that your agent is ready and waiting for messages to arrive on the specified port.   - Run the "Main" class in the project. If you added your own agent class, make sure that it is used in the main method of Main.java. You can also execute the "ant run" on the command line, if you have [[http://ant.apache.org/|Ant]] installed. The output of the agent should say "NanoHTTPD is listening on port 4001", which indicates that your agent is ready and waiting for messages to arrive on the specified port.
-  - Now push the "Start" button in the simulator and your agent should get some messages and reply with the actions it wants to execute. At the end, the output of the simulator tells you how many points your agent got: "Game over! results: 0". Those points correspond more or less with negated costs. That ismore points means the solution had lower costs.+  - Now push the "Start" button in the simulator and your agent should get some messages and reply with the actions it wants to execute. At the end, the output of the simulator tells you how many points both players got: "Game over! results: 0 100", the first number is for white and the second for red.
   -  If the output of the simulator contains any line starting with "SEVERE", something is wrong. The two most common problems are the network connection (e.g., due to a firewall) between the simulator and the agent or the agent sending illegal moves.   -  If the output of the simulator contains any line starting with "SEVERE", something is wrong. The two most common problems are the network connection (e.g., due to a firewall) between the simulator and the agent or the agent sending illegal moves.
  
Line 40: Line 38:
 For implementing your agent: For implementing your agent:
   * Add a new class that implements the "Agent" interface. Look at RandomAgent.java to see how this is done.   * Add a new class that implements the "Agent" interface. Look at RandomAgent.java to see how this is done.
-  * You have to implement the methods "init" and "nextAction". "init" will be called once at the start and should be used to initialize the agent. You will get the information, which role your agent is playing (white or red) and how much time the agent has for computing each move. "nextAction" gets the previous moves of both players as input and has to return the next action the agent is supposed to execute within the given time limit. "nextAction" is called for every step of the game. If it is not your players turn return "NOOP".+  * You have to implement the methods "init" and "nextAction". "init" will be called once at the start and should be used to initialize the agent. You will get the information, which role your agent is playing (white or red) and how much time the agent has for computing each move. "nextAction" gets the previous move as input and has to return the next action the agent is supposed to execute within the given time limit. "nextAction" is called for every step of the game. If it is not your players turn return "NOOP".
   * You can make sure to be on time by regularly checking whether there is time left during the search process and stopping the search just before you run out of time.   * You can make sure to be on time by regularly checking whether there is time left during the search process and stopping the search just before you run out of time.
-  *  
  
 ===== Handing In ===== ===== Handing In =====
Line 51: Line 48:
 To create the zip file you just edit the "student" property in the build.xml and call the "zip" target using ant (execute "ant zip" in the directory containing the build.xml). To create the zip file you just edit the "student" property in the build.xml and call the "zip" target using ant (execute "ant zip" in the directory containing the build.xml).
  
-The deadline is Tuesday, 28.02.2012. We will have a competition between your agents in the lab on Thursday, 01.03.2012. Extra points for the winner!+The deadline is Tuesday, 28.02.2012. We will have a competition between your agents in the lab on Thursday, 01.03.2012. Extra points for the winner! You can watch the competition [[http://130.208.241.192/ggpserver/public/view_tournament.jsp?tournamentID=ru-ai2012-connect4|here]]. 
 + 
 +As with the first programming assignment, you can still hand in after the deadline (by email), but your grade will be lowered by 0.5 for each day your submission is late. Also, you can't get the extra points for winning the competition.
  
/var/www/cadia.ru.is/wiki/data/attic/public/t-622-arti-12-1/prog2.1329390012.txt.gz · Last modified: 2024/04/29 13:32 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki