Exercise 4: Planning Agent

For this fourth exercise, you will again be implementing an agent that solves problems in the MÆDEN environment. The goal for this assignment is intentionally under-specified. You have two main objectives: (i) using one or more of the techniques we have encountered for representing knowledge, logical reasoning, and/or planning, implement an agent that can solve arbitrary worlds involving non-permanent obstacles and tools to remove them; and (ii) describe your implementation in terms of those techniques. This is an individual project. As always, I encourage you to talk to your peers about ideas or to me and to ask questions. But the code you submit must be your own code.

Requirements

Write an agent that solves problems in the MÆDEN environment. In addition to impassible wall obstacles, problems will involve removeable obstacles that can be defeated by specific tools. These sub-tasks are intended to provide a reasonable development path of increasing complexity and capability. You may build upon your search agent if you wish, or you may start with a blank slate.

  1. Flexible representation of obstacle-tool interactions. You should implement a general representation for obstacles and their corresponding tools. This representation should allow your implementation to overcome newly added obstacles simply by adding the knowledge about the two characters representing them. For example, if you are told the character ‘%’ represents an obstacle and the character ‘L’ represents its corresponding tool, I should be able to add this information in one location and thereby enable your agent to reason about and overcome such obstacles. You will need to document in your README file how this change should be made.
  2. Overcome obstacles with tools. When your agent wants to get past an obstacle such as a rock, it should search for a hammer and then return to the rock, using the found hammer to remove the rock. Likewise for any other removeable obstacle. Note: for this assignment, the agent's carrying capacity is a single tool. That is, the inventory may not hold more than one thing. Because you may want to accumulate items in a single location, be reminded that the agent can pick up one specific item of possibly many in the current location by following the grab command with the desired item character as an argument. If you want your local version of MÆDEN to correspond to the one I will use for evaluation, change line 353 of GOBAgent.java from if ( myGrid.cellHasTool(pos.x, pos.y, tool) ){ to if ( myGrid.cellHasTool(pos.x, pos.y, tool) && inventory.size() < 1 ){.
  3. Subgoal generation and planning. You need not implement any specific planning method but your agent should have some planning method. Describe it in your report.

Your code should be documented thoroughly. Do not neglect to include an acknowledgments header within your submission. You may use a language of your choice. However, I must be able to run your system without an IDE or installing any specialized libraries. FYI, I have Racket, Common Lisp, Ruby, Python, Java, and C++ on my machine. If you want to use something else, talk to me before investing effort on the above tasks. If you need assistance connecting to MÆDEN via the socket layer, ask me for help.

The Report

You should write a one-page report of your activities and findings associated with this assignment. Your report should serve as a stand-alone document; thus, it should state the problem or focus, the approach that you employed, and an indication of how well it performed. In particular, I will be looking for descriptions of your knowledge representation and planning process; these would make plausible subsection headings. For this report, you should focus more on the description of your implementation than on the results. It will be sufficient to briefly describe or to characterize how successfully your agent solved the collection of worlds. However, you are welcome to include figures if you think they contribute to the report; just make sure your picture really is worth a thousand words.

As before, you should format your report using a template (either LaTeX or Word) found at the ACM SIG Proceedings Templates page. I will be providing an updated link to a modified Word template that may save you some time. Your affiliation should be “Westmont”; Whether you use LaTeX or Word, you should use the template with only the following modifications:

When you have completed your report and its formatting, generate a pdf document to be included in your final submission.

Submission instructions:

Submit only gzipped tar files. Name your gzipped tar file with your Westmont emailname and “P4” (no spaces); for example, someone named Eva Bailey might create a folder called “evabaileyP4” or “ebaileyP4”. Make sure that inside that folder you have the following:

  1. documented source file(s) for your agent;
  2. instructions for loading and running your agent, and especially for adding new obstacle/tool information; this would be a logical location to provide any acknowledgments that are appropriate;
  3. a one-page pdf report describing your work on this assignment.
Finally, submit the archive containing these on Eureka.