Exercise 2: Search Agent

For this exercise, you will again be implementing an agent that solves problems in the MÆDEN environment. As the focus of this assignment, your agent may have internal state and will use search to find paths to locations in the environment.

Requirements

Write an agent controller, SearchAgent, that solves problems in the MÆDEN environment. Problems will involve not only wall obstacles but also removable obstacles and tools that remove those obstacles. Problems will be guaranteed to have solutions. These sub-tasks are intended to provide a reasonable development path of increasing complexity and capability; you should only submit your final agent controller. You may build upon your reactive agent if you wish, or you may start with a blank slate.

  1. Search within the visual field. Suppose your agent wants to move forward but is facing a wall blocking its progress. If there is a viable path through the visual field to a spot beyond the obstacle, your search method should find the optimal (least number of moves) path to that spot. Your method should search for a path from the agent's current location to any given location in the visual field.
  2. Subgoal generation. Given the ability to find a path to an arbitrary location in the visual field, your agent will need to generate its own subgoals (e.g., when it encounters obstacles). Once your agent establishes a new subgoal, finds a path to solve it, and successfully follows that path, it should continue with its original goal (e.g., getting to the food). Your agent should start off with its goal as getting to and consuming the food. But if encountering a removable obstacle that must be removed in order to reach the food, the agent should create a subgoal to remove the obstacle (i.e., using the appropriate tool), which may require a subgoal of obtaining the tool, which may require a subgoal of finding such a tool, and so on. This version of your agent is not expected to solve every conceivable problem although a solution will always exist.
  3. Searching through mental maps. As your agent moves about (following its nose for example), it encounters more and more of the world. Sometimes, an agent must rely on a memory of where it has previously been in order to solve more challenging problems. For example, perhaps the agent cannot get around an obstacle using search through the visual field. You should augment your agent with the ability to construct a mental map of the places it has observed. Once the agent is constructing maps of the explored portion of the environment, either generalize your search method from above or provide an additional search method so that the agent can find paths to arbitrary locations by searching within the mental map. Having found such a path, your agent should follow it and then continue with what it was doing (e.g., following its nose).
  4. Putting everything together. A recommended approach is for your agent to use a reactive problem-solving strategy (e.g., following its nose) until it encounters an obstacle. At that point, it tries to find a path through the visual field. If that fails, it resorts to searching through the mental map constructed so far. Finally (if searching through the mental map will not traverse unknown territory), the agent should move in an exploratory mode in the hopes that an expanded mental map will yield progress.

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. If using Java and extending AbstractAgentController, your code must conform to the given package naming convention and directory layout. If you need assistance connecting to MÆDEN via the socket layer, ask me for help. Your code should be documented thoroughly and include the author's name in each source file that is added. (You should not modify the given MÆDEN code in any manner.)

The Report

You should write a one-page extended abstract describing your activities and findings associated with this assignment. Your report should serve as a stand-alone document; thus, it should (briefly) describe the problem or focus, the approach that you employed, and an description of how well it performed. You are welcome to include figures if you think they contribute to the report; however, make sure your picture really is worth a thousand words.

I am providing a modified template file that you should use to format your one-page report; this template works with LibreOffice. (If you would rather use LaTeX, you may use the style file from the ACM but compare to the template I provide and remove extraneous elements as needed.) Be sure to use the prescribed formatting. When you have completed your report and its formatting, generate a pdf document to be included as part of your final submission. Remember, you are limited to a single page; submit only a pdf version of your document.

Submission instructions:

Submit a zip or tar archive only. Make sure that when unpacked your archive creates a folder with your user ID (without the “@westmont.edu”). Make sure that directly inside that folder you have the following:

  1. thoroughly documented source file(s) for your agent; if you are using Java and extending from org.maeden.controller.AbstractAgentController.java, the directory tree starting with “org” must start here; you should also include required source files alongside your SearchAgent.java file; your source/executable controller should be called SearchAgent; that is, you must include everything necessary to compile your agent;
  2. README, containing the manifest for your archive, instructions for loading and running your agent, and any acknowledgments that are appropriate;
  3. your Report in pdf
Do not include git or other version control management files. Finally, submit the archive containing these on Canvas by the due date given there.