Python-ECS759P

ECS759P Artificial Intelligence: Coursework 1
Due date: 16 Nov 2022 at 10.00 am
If you have any questions, you are encouraged to ask any question and discuss via Student Forum
on the module QMPlus page. You can also come to the online drop-in session1 (Wednesday 2 Novem-
ber 2022 at 2-3pm) or email Dr. Huy Phan at h.phan@qmul.ac.uk but using forum for discussion is
preferable.
1 Introduction
The coursework is composed of two parts, involving coding exercises:
Agenda-based search: 60% + 2% extra
Genetic algorithm: 40%
The total mark will be capped to 100%.
2 Agenda-based Search
This part of the coursework is intended to help you understand how the agenda-based search works
and to give you practice in its implementation.
You task is to build an AI route finder using agenda-based search mechanism. You are given a data file
(tubedata.csv) in CSV format with the London Tube map (which is not necessarily to be up-to-date
and complete). The Tube map is defined in terms of a logical relation Tube “step”. If you open the
data file with any text editor, you will see the content of the file as:
“Harrow & Wealdstone”, “Kenton”, “Bakerloo”, 3, “5”, “0”
“Kenton”, “South Kenton”, “Bakerloo”, 2, “4”, “0”
· · ·
“Bank/Monument”, “Waterloo”, “Waterloo & City”, 4, “1”, “0”
Each row in the CSV file represents a Tube “step” and is in the following format:
[StartingStation], [EndingStation], [TubeLine], [AverageTimeTaken], [MainZone], [SecondaryZone]
where:
StartingStation: a starting station
EndingStation: a directly connected ending station
TubeLine: the tube line connecting the stations above
AverageTimeTaken: the average time, in minutes, taken between the named stations
MainZone: the main zone of the starting station
SecondaryZone: the secondary zone of the starting station, which is “0” if the station is in only
one zone. Note: to define the zone for the ending station use the main zone if the secondary
zone is “0” otherwise use the secondary zone.
Throughout this coursework, you may find it helpful to refer to the London Tube map at