Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
COM1005 Machines and Intelligence
Semester 2: Experiments with AI Techniques
Version 1.1
This assignment carries 30% of the marks for COM1005
In this assignment you’ll experiment with search strategies for solving the Rambler’s problem.
The Problem
The problem is to work out the best walking route from a start point to a goal point, given
a terrain map for the walking area. A terrain map specifies the height of each point in the
area. Figures 1 shows an example of a realistic terrain map.
Figure 1: A realistic Terrain Map
A more simple terrain map is shown in Figure 2.
For a rambler, the best route is the one which involves the least climbing.
1
Figure 2: A simple Terrain Map. White is highest, black is lowest. This map is saved in
tmc.pgm
Representing Terrain Maps
We’ll store our terrain maps in Portable Grey Map (pgm1
) format.
In this format each cell is represented by an int from 0 to 255.
You can view and edit pgm files using irfanviewer - free download here: http://www.
irfanview.com or just a normal text editor as it is in fact just a normal text file.
In Figure 3 you can see a screenshot of the content of the tmc.pgm.
Figure 3: This is the content of the file tmc.pgm when viewed in a terminal window.
A pgm file contains a header followed by a matrix with the actual data. Figure 4 shows the
header information. Figure 5 shows the x- and y-axis definitions.