CSCI 373 Project 2: A Simple Goal-Based Agent

Due: April 6

Overview: The wumpus world agent in the first assignment is unable to search into the future and see the effects of a sequence of actions. In this project you will implement a variant of the Simple-Problem-Solving-Agent in Figure 3.1 of your text. You will use one of the search strategies implemented in the AIsearch library written by Peter Bouthoorn. That library is available in the course directory: /usr/local/csci/373/AIsearch.

As depicted in Figure 3.1 of your text, the process() function in your new goal-based agent should be modified to:

To support this new version of the process() function you will need to add the following functions to your goal-based player:

  1. formulate_goal() to formulate and return a goal, call it "currentGoal", using the information in the current state.
  2. formulate_problem(currentGoal) to formulate and return a search problem, call it "currentProblem", given the desired goal and the current state. In other words, to formulate a search problem by creating a start state from the current state and a goal state from the desired goal.
  3. search(problem) to perform a search using one of the search strategies implemented in AIsearch. The purpose of the search is to identify a sequence of actions leading to the goal state formulated in step 2 above. The search will only have access to the information stored in the agent's current internal state. This function returns a sequence of actions leading from the start state to the goal state, or NULL if the goal state can not be reached.

  4. recommendation() to select the next action that the Agent should perform based on the information in the current state and the sequence of actions formulated in step 3 above. An acceptable implementation of the function recommendation() would simply return the next action in the action sequence formulated in step 3 above.

The AIsearch library offers a large number of search classes that you can use to develop the search() function described in step 3 above. To use this library, you need to define two derived classes: a Node class, and a Search class.

The Node class should be similar to the State class in that it contains information about the wumpus world and how it changes at each step of the search. The Node class will be a derived class that must contain the implementation of three virtual functions: