Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
COMP2001 Project 2025
Problem Description
Problem description: Given a set of n sight-seeing locations, S, a relation, L, which maps all points-of-interest to physical locations by x and y coordinates, and a location for the airport, A, with location, (Sx, Sy) where your journey begins and ends, the problem is to find an ordering of all sight-seeing locations which minimises the total distance travelled starting from your hotel, visiting all locations, and then arriving at the airport.
The distance between any two locations is given by the following formula – note the ceiling operator:
Tasks and Requirements
This coursework has two parts. First you will need to implement a HyFlex compatible version of the SSP problem and then design and implement a learning-based selection hyper-heuristic which can be used to solve any given instance of the SSP problem. The second part is an in-lab practical exam; see the Moodle page for further details. Note that during the in-lab practical exam, you will be asked to run your hyper-heuristic for 5 nominal minutes on an unseen problem instance so consider this carefully when designing your hyper-heuristic.
HyFlex Compatible SSP Implementation
You should implement a full suite of components to read, encode, modify, and solve instances of the SSP problem. You should refer to the HyFlex API to ensure that your implementation is HyFlex compatible. As a starting point, a zip archive of some skeleton code is provided on Moodle. Your implementation should have at a minimum the features and components explained below.
There is an issue with the Java timer used in the original HyFlex and certain modern computing devices/operating systems which causes timer drift. This matters because your hyper-heuristic will run for some non-deterministic amount of time longer than the time limit which means your results are invalid, and when asked during a timed exam to run your hyper-heuristic, this could take longer than the exam itself meaning you get no result to answer that/those question(s). There is a TimerTest.jar file on Moodle which you should run from the command line via java -jar TimerTest.jar which will tell you if the timer significantly deviates from real time. To run this test, restart your computer, wait for everything to load, and close any programs/apps that may automatically start. Then, run the Java jar file via the command line and wait at least 30 seconds. We believe that the problem is limited to Windows 11 laptops when ran on battery power or when the power plan is set to an equivalent of power saver, but this may evolve to other configurations/operating systems/devices over time.
If the timer does not deviate significantly, you should use the HyFlex_1.0.0_ThreadTimer.jar which is the original CHeSC 2011/HyFlex library implementation, otherwise you should use the HyFlex_1.0.1_WallTimer.jar library which only uses the wall clock time (ensure you close as many background processes as possible when running timed experiments to maximise your computational power during the time limit).
Problem Domain
loadInstance(int instanceId)
Instance Loader
The format of a SSP problem instance is as follows, noting that underscores are used here to denote whitespaces.
1. A single line starting “NAME_:_” and followed by the name of the problem instance.
2. A single line starting "COMMENT_:_” and followed by a comment.
3. A single line reading “HOTEL_LOCATION” to denote the following line contains coordinates of the hotel location.
4. Immediately following the previous line are two integers separated by a whitespace. The first integer is the x-coordinate and the second integer the y-coordinate of the location of the hotel.
5. A single line reading “AIRPORT_LOCATION” to denote the following line contains coordinates of the airport location.
6. Immediately following the previous line are two integers separated by a whitespace. The first integer is the x-coordinate and the second integer the y-coordinate of the location of the airport.
8. A list of locations encoded in the same way as (4.) where each new line is a new and unique enclosure.
9. A terminating line “EOF” to denote the end of the file.
Solution
Instance
RANDOM: In this mode the initial solution should be generated randomly.
CONSTRUCTIVE: In this mode, you should implement the nearest neighbour greedy algorithm where the first sight-seeing location visited after leaving the hotel in chosen as the one that is closest to the hotel, and all subsequent locations are those closest to the current location.
Low-level Heuristics
AdjacentSwap
|
Intensity of mutation range |
Number of internal swaps |
|
iom ∈ [0.0, 0.2) |
1 |
|
iom ∈ [0.2, 0.4) |
2 |
|
iom ∈ [0.4, 0.6) |
4 |
|
iom ∈ [0.6, 0.8) |
8 |
|
iom ∈ [0.8, 1.0) |
16 |
|
iom == 1 |
32 |
Reinsertion
|
Intensity of mutation range |
Number of internal reinsertions |
|
iom ∈ [0.0, 0.2) |
1 |
|
iom ∈ [0.2, 0.4) |
2 |
|
iom ∈ [0.4, 0.6) |
3 |
|
iom ∈ [0.6, 0.8) |
4 |
|
iom ∈ [0.8,1.0] |
5 |
NextDescent
|
Depth of search range |
Number of internal iterations |
|
dos ∈ [0.0, 0.2) |
1 |
|
dos ∈ [0.2, 0.4) |
2 |
|
dos ∈ [0.4, 0.6) |
3 |
|
dos ∈ [0.6, 0.8) |
4 |
|
dos ∈ [0.8,1.0] |
5 |
DavissHillClimbing
|
Depth of search range |
Number of internal iterations |
|
dos ∈ [0.0, 0.2) |
1 |
|
dos ∈ [0.2, 0.4) |
2 |
|
dos ∈ [0.4, 0.6) |
3 |
|
dos ∈ [0.6, 0.8) |
4 |
|
dos ∈ [0.8,1.0] |
5 |
Order Crossover (OX)
Additional Note(s)
Learning-based Selection Hyper-heuristic
Submission and Format of Assessment
The second part of the coursework involves a Moodle quiz-based practical exam, similar in style to the quizzes from the lab exercises, where you will need to use (make small modifications and run) the project that you submitted from the first part. In addition, you will be asked to explain certain elements of your implementation, hyperheuristic design, and of the problem itself. It is not enough to just attend the in-lab practical exam without having understood the problem description, implemented the domain, or implemented a selection hyper-heuristic. You should aim to have a working implementation of both the problem domain, and hyper-heuristic solution method as during the exam we may ask you to:
It is therefore essential that your SSP domain implementation conforms to the HyFlex `ProblemDomain` interface and the `InLabPracticalExamInterface`, and your selection hyper-heuristic to the `HyperHeuristic` interface.
The in-lab practical exam will take place on Friday 9th May within the timetabled lab hours - further details on allocated rooms/time slots to be released closer to the date of the exam.
Use of AI Tools and Collaboration
During the in-lab practical exam however, these tools are strictly forbidden and must be closed, disabled, or removed prior to starting the exam. (For example, see the following to disable AI assistant in IntelliJ: https://www.jetbrains.com/help/idea/disable-ai assistant.html).