Exercise 1: Reactive Agent

For this first project, you will implement a simple stimulus-response agent that attempts to ‘follow its nose’ in the MÆDEN environment. Do not wait until the last minute to start on the project; you may suffer in many ways if you do. 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.

A stimulus-response agent behaves entirely in reaction to the environmental situation in which it finds itself. More generally, a reactive agent acts according to its situated control rules. The key restriction that we are imposing here is the lack of internal state information. That is, the ‘cognitive’ state of the agent consists of the information available to it through its sensory channels, only.


Write an agent that attempts to solve problems in the MÆDEN environment. Your agent will only be asked to solve problems known to have solutions and that involve only wall obstacles. The following sub-tasks are intended to provide a reasonable suggested development path of increasing complexity and capability.

  1. Stimulus-Response agent. Create a primitive agent that merely follows its nose toward the food. This agent should be able to solve any world without obstacles.
  2. Add situated-control rules. Technically, the first S-R agent already had situated control rules, but these focused on the sense of smell. Add rules that access the visual field and attempt to avoid obstacles that may be between the agent and the goal.
  3. Try other ideas. Try other approaches as long as they do not involve maintaining internal state. Note, agents have a sensory input reporting the status (either ‘ok’ or ‘fail’) of the immediately prior action. Technically, this can be thought of as an internal state value; however, it is delivered via the sensory input and so you may use it (if you wish).
  4. Write a README file. You should write a README file that includes: your acknowledgments, instructions for running your agent, and a description of the ‘other ideas’ that you tried. This description should provide enough detail so the reader could replicate your attempt; it should also report the benefit (if any) that the implemented feature had on your agent's performance. Your README should be a plain text file but you should organize it in a reasonable/readable format.

That's almost it! You only need submit your final best agent -- not a progression of increasingly sophisticated agents. Your code should be documented thoroughly. You may use a language of your choice as long as it supports standard sockets; 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 describe the problem or focus, the approach that you employed, and an indication 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.) Your affiliation should be just “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 a gzipped tar file that when extracted will create a folder named with your Westmont email user-name (no spaces) followed by "SRAgent". For example, someone named Eva Bailey might create a folder called "ebaileyP1A". Make sure that inside that folder you have both your code and the required README file. Submit the archive for project 1 on Eureka.