public:t-622-arti-12-1:lab_1_-_agents
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
public:t-622-arti-12-1:lab_1_-_agents [2012/01/19 12:33] – created stephan | public:t-622-arti-12-1:lab_1_-_agents [2024/04/29 13:33] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 15: | Line 15: | ||
===== Tasks ===== | ===== Tasks ===== | ||
- | - Develop a simple reflex vacuum cleaner agent. Is it rational? | + | - Develop a simple reflex vacuum cleaner agent. Is it rational? |
- Develop a model-based reflex agent that is able to clean every cell. Is it rational? | - Develop a model-based reflex agent that is able to clean every cell. Is it rational? | ||
+ | To make it a bit easier you can use the following assumptions: | ||
+ | * The room is rectangular. It has only 4 straight walls that meet at right angles. There are no obstacles in the room. That is, the strategy "Go until you bump into a wall then turn right and repeat" | ||
+ | * The room is fairly small, so that 100 actions are enough to visit every cell, suck all the dirt and return home given a halfway decent algorithm. | ||
+ | |||
+ | ===== Material ===== | ||
+ | * {{: | ||
+ | * {{: | ||
+ | |||
+ | The 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 an example environment (vacuumcleaner.gdl) 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" | ||
+ | - Setup the simulator as shown in this picture: | ||
+ | {{: | ||
+ | - Run the " | ||
+ | The output of the agent should say " | ||
+ | - Now push the " | ||
+ | |||
+ | You can see [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | ===== Hints ===== | ||
+ | For implementing your agent: | ||
+ | * Add a new class that implements the " | ||
+ | * You have to implement the method " | ||
+ | * Before you start programming a complicated strategy, think about it. The things your agent has to do are: | ||
+ | - execute TURN_ON | ||
+ | - visit every cell and suck up any dirt it finds on the way | ||
+ | - return to the initial location | ||
+ | - TURN_OFF | ||
+ | * For this your agent needs an internal model of the world. Figure out, what you need to remember about the current state of the world. Ideally, you create an object " | ||
+ | |||
+ | As a last and general hint: "Days of programming can save you minutes of thinking." | ||
/var/www/cadia.ru.is/wiki/data/attic/public/t-622-arti-12-1/lab_1_-_agents.1326976411.txt.gz · Last modified: 2024/04/29 13:32 (external edit)