FJK Home | CPE/CSC 480 | Syllabus | Schedule | Lecture Notes | Assignments | Labs | Project | Other Links |
Name: | |
Status | revised (deadline) |
Points: | 25 |
Deadline: | Thu, Nov. 2, midnight (23:59:59) |
In the second assignment, you will explore various aspects of search methods. Your task is to program an agent that systematically investigates its environment by using some of the search methods discussed in class.
The emphasis in this assignment lies on the search methods, and not on the programming of the environment. You will use the Bot Environment that was also used in previous lab exercises. Make sure to check Blackboard for updates or other information on the environment.
In this assignment, you have to implement the following search methods:
The task of the agent is defined as follows: It starts from its initial position (default is the tile in the upper left corner) and has to reach a certain tile identified as the goal position. On its path to the goal, it may have to clean tiles, and the amount of dirt on a tile affects the path cost of the agent. For some of the search methods, the agent needs additional information to estimate the cost from the current node to the goal node. In this case, the agent can ask the field manager for a hint. The manager may provide some hints, such as:
These hints, however, incur additional costs for the agent. Usually the costs are higher for more valuable hints. Especially for environments with a known geometry (such as a grid), the agent can often also calculate such hints on its own.
In an artificial environment, it is frequently easy to perform an off-line search by first examining the search space, determining the best (or a "good enough") solution, and then executing the respective actions.
In a real-world setting, the agent might have to perform an on-line search, interleaving the computations to expand the search space with the execution of the corresponding steps in the real world.
In this assignment, you implement an off-line search. After the agent has identified the goal, it should determine the best possible solution among the ones it explored, perform the actions to achieve the goal, and print it to the display and the log file.
This approach has an important consequence for the agent. When an off-line agent encounters a dead end during its investigation (i.e. there are no uninspected reachable squares from the current square), it can continue its investigation with another square on the fringe easily by "mentally" jumping to that square. An on-line agent, however, has to back up and retrace its steps in order to reach the next square on the fringe, thus increasing the path cost considerably. When you calculate the cost, make sure to differentiate between the search cost and the path cost.
The agents must keep track of the tiles it has already examined, and for some search methods, it must be able to backtrack (retrace its steps). The agent should build a data structure that tracks the path it has taken so far, allowing it to retrace its steps. The agent can also construct its own internal map, which may make navigation considerably easier. Again, please note that the agent does not know all relevant aspects of the environment in advance, such as the dimension of the playground, or the placement of obstacles.
We will use MediumMap.sbm as the main reference for the evaluation of your programs. You should test your agent on other maps as well, however, and we may also use other maps for evaluation purposes.
The search and movement costs for the agent can be obtained via the getMovementCost() and getSearchCost() methods in Bot and BotSearch, respectively. You also need to include the costs for hints that you obtain from the environment.
For the path cost and search calculations, the following numbers are used:
Your program must provide the following information:
This information should be displayed for every step, and written into a log file for later analysis. Also add the configuration of the field (size and name of the map) and the search method used at the top of your log file.
The author of the BotEnvironment (a former 480 student and grader) and I are working on possible refinements and extensions for the next version of the environment. This could also be an opportunity for extra credit, e.g. using different graphics, or adding functionality. If you have any ideas, let us know. We will also post more information on Blackboard.
This assignment must be submitted electronically via the handin program on hornet. Please make sure that you have a functioning account on hornet. Follow this link for directions. You need to submit the following items:
To encourage early submission, you can get a bonus of 10% for every business day that you submit the assignment early. And to discourage late submission, the equivalent late policy of a 10% penalty for every late (business) day will be strictly enforced. Since the deadline is Thursday night, this means that you get penalized only 20% if you submit it by Monday night.
Please use your Cal Poly login as the first part of your agent's name, and an indication of the search method as the second. For example, my greedy agent would be something like fkurfess-greedy. 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.
If you have gneral 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. Your contributions (both questions and answers) will also be used when I finalize the grades for this class, and may give you a little boost if you're very close to the next higher grade.
FJK Home | CPE/CSC 480 | Syllabus | Schedule | Lecture Notes | Assignments | Labs | Project | Other Links |
Franz Kurfess |