Artificial Intelligence II
CSE 5361 Section 001 Spring 2006
Due: March 23, 2006 (midnight).
No late submissions accepted.
For this homework you will implement a search-based agent that is capable
of computing a path from the agent's starting location to the goal
location, and then follow this path to the goal. The specific
requirements are enumerated below.
We will be using the same version of the Urban Combat Testbed (UCT)
you already have (v0.5). I have updated the agent program to provide a
template for a search-based agent. You can download this agent and
supporting files from here. See the README.txt
file included in this package for details about the contents.
We will be using the same type of goals as the previous homework; namely,
getting your agent to a specific x,y,z location. However, now this task
will be accomplished by searching for a path to the goal, rather than
making more local decisions about the next action to take.
- The search-based agent program is currently a template that defines a
graph structure, reads in an XML description of the uct_apartments world
(same as uct_rekjavik) which describes the open areas of the world and
their interconnections, and then continuously tries to find a sequence of
connecting areas starting from the area where the agent currently resides
and ending at the area containing the goal location. Your job is to
complete the program by implementing the following procedures:
- createGraphFromXMLInfo() - fills in the worldGraph data
structure with the information read in from the XML file
data/uct_apartments/uct_apartments-ssps.xml. See the procedure
printXMLAreaInfo for an example on how to access the XML data.
- findArea(x,y,z) - returns the area containing the point
(x,y,z). Each area is defined by the vertices of a three-dimensional
polygon, so you will need to implement an algorithm for iterating over the
areas and finding the one that encompasses the point.
- findNextAreaOnPath(a1,a2) - computes a sequence of connected
areas from area a1 to area a2 and returns the area right after a1 as the
next area on the path. You will need to implement some auxiliary procedures
here that search the graph for the path and set the predecessor fields of
the graph structure along the way to remember the path. A standard
shortest-path algorithm will suffice here. In the event no such path
exists, the agent will revert to a simple refelx agent. You can use the
reflex agent included (same as the one provided for HW1), or introduce your
improved reflex strategy from HW2.
- computeGoal(area,goal) - sets the x,y,z of the goal structure
to an appropriate location within the given area (e.g., centroid). This
procedure is used to choose a specific location to move towards within the
desired area, which is next in the path toward the final goal location.
- Since we only have XML data for the uct_reykjavik world (now called
uct_apartments), your agent will only be tested in this world. As before,
you should assume that the agent can start at any position and that the
goal location can be any reachable position in the map. You may assume a
tolerance of 10. Your agent will be evaluated according to its speed and
success at reaching various x,y,z locations from various starting x,y,z
locations. So, you should test your agent accordingly to be sure it is
robust for these types of tasks.
- Document the design of your agent, including the original elements of
the search-based agent and those added by you for this homework, in a
separate document (MSWord, PDF or text). You should also describe the
strengths and weaknesses of your agent in regards to the navigation task
- Submit all source code and design document files in one zip file to me
(email@example.com) by the above
deadline. Also include in your submission a README file that describes
what files are in your submission and any special instructions for building
and running your agent. Most likely, you will submit an agent.cc file,
design document, and README, and the agent.cc file can be compiled in
the agent directory just as the original one. In addition to correct
functionality and satisfaction of the above constraints, your submission will
be graded based on good programming style and documentation.