CSM-212: Exercise 2
First you should download and save the initial version of agenda_search
- Make modifications to the basic program as follows. You can use the
notes from lecture 5 to help if you like
- Provide code to parameterise start and goal nodes.
- Print out the names of nodes visited.
- Count the number of nodes visited.
- Add code to show the path used to reach the goal. There
are two obvious ways to do this.
- Maintain a parameter which accumulates the path so
far (you may have to reverse it at the end).
- Make each node into a structured object which
includes a field for its parent. The creation of
such objects will have to be done at the moment when
the parent is known.
- Add loop detection to prevent the algorithm from following
infinite paths.
Mike Rosner (webmaster@cs.um.edu.mt)
Last modified: Thu Feb 25 16:32:13 1999