diff --git a/week3/material/agent_programs.py b/week3/material/agent_programs.py index e689ec26e38836082c6ecdb40141a645e8795ebb..bdb3690ccbd50f1db6c4fce01761956c34487030 100644 --- a/week3/material/agent_programs.py +++ b/week3/material/agent_programs.py @@ -10,26 +10,6 @@ from vacuum_agent import VacuumAgent DIRECTIONS = VacuumAgent.WHEELS_DIRECTIONS -""" -Agent implementing a search algorithm: -- The agent must first update the model of the world (a GridMap) with the following information: - 1. The current tile set as visited ('X') - 2. The location of the charging dock ('C') given by the sensor 'charging-dock-location-sensor' - 3. Any wall the agent crashed against ('W') - 4. The dirt in the adjacent cells ('D') -- The agent must start cleaning if it is not currently doing so and stop cleaning if -the whole environment has been cleaned -- The agent must activate the suction mechanism if there is dirt on the current tile -or deactivate it if there is not (to preserve the battery) -- Then, the agent must check the current battery level: - 1. If the battery level is below 50%, the agent must use a search algorithm to - head back to the charging dock before getting out of battery - 2. Otherwise, the agent must use a search algorithm to head to an unvisited - tile - In both cases, the agent will return an action to change the direction of the - wheels towards the goal state, based on the path found by the search algorithm -""" - # 1. We create a model of the environment using a GridMap # this step is similar to Week 2 workshop when implementing # the model based agents diff --git a/week3/solution/agent_programs.py b/week3/solution/agent_programs.py index 64892d160acb89f716c539001c411ce1c0b7e24c..08ca5504b67660432d12e119679aa76270b19a37 100644 --- a/week3/solution/agent_programs.py +++ b/week3/solution/agent_programs.py @@ -10,26 +10,6 @@ from vacuum_agent import VacuumAgent DIRECTIONS = VacuumAgent.WHEELS_DIRECTIONS -""" -Agent implementing a search algorithm: -- The agent must first update the model of the world (a GridMap) with the following information: - 1. The current tile set as visited ('X') - 2. The location of the charging dock ('C') given by the sensor 'charging-dock-location-sensor' - 3. Any wall the agent crashed against ('W') - 4. The dirt in the adjacent cells ('D') -- The agent must start cleaning if it is not currently doing so and stop cleaning if -the whole environment has been cleaned -- The agent must activate the suction mechanism if there is dirt on the current tile -or deactivate it if there is not (to preserve the battery) -- Then, the agent must check the current battery level: - 1. If the battery level is below 50%, the agent must use a search algorithm to - head back to the charging dock before getting out of battery - 2. Otherwise, the agent must use a search algorithm to head to an unvisited - tile - In both cases, the agent will return an action to change the direction of the - wheels towards the goal state, based on the path found by the search algorithm -""" - # 1. We create a model of the environment using a GridMap # this step is similar to Week 2 workshop when implementing # the model based agents