Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
MEC304 – Optimization 2024-2025 Semester 1
Department of Mechatronics and Robotics, Xi’ an Jiaotong-Liverpool University
Key Information
Deadline: |
15 December 2024, 6 PM |
Where: |
Learning Mall |
Assessment: |
50% of Final Marks |
Outcomes Assessed: |
A. Optimization methods for system analysis and modelling
B. Apply optimization methods to practical problems
C. Use optimization algorithm development to achieve engineering optimization solution.
D. Resolve the basic engineering optimization problems using a variety of programming, design and simulation tools
|
1 Section A (50%):
1.1 Background:
underly real-world application areas such as natural language processing, computer vision, and robotics.
The aims of this project are to improve your understanding of the Ant Colony Optimization (ACO) algorithms [1] and to experience how to derive heuristics, using the Berkely Pac Man framework 1. Through studying and understanding of the animal-inspired optimization methods, use of the methods to model the gaming system, implementation of the methods in Python, this demonstrates a real-case scenario of applying optimization methods in resolving practical problems. All the learning outcomes will be assessed through this exemplary application.
1.2 Environment Set Up
If you are running macOS High Sierra (10.13.6) or higher version, mac OS contains a Python 2 . x by default, you don’t have to install any additional software. Alternatively, you can download and install python 2.7.18 from here.4
Windows
1.3 Task
Test
Run following command
Note that python subversion may vary, but ensure your python version is OVER 2.7 and NOT 3.x. Now you may navigate to project folder using ’cd’ command and try
python pacman.py
Pacman lives in a shiny blue world of twisting corridors and tasty round treats. Navigating this world efficiently will be Pacman’s first step in mastering his domain.
Task 1 (10%)
By default, we implemented a simple AI which moves completely random using AntAgent class. Your task is based on AntAgent and try to implement your algorithms under AntAgent class. Many useful methods (equivalent to functions) you may use in this project have been described in pacmanAgents.py. You should not change any files other than pac- manAgents. py. You should not import any additional libraries into your code, excepting numpy if needed.
Your first task is implementing basic ACO algorithm to compute a shortest path to find one food under easy mode. The general ACO algorithm can be described as follows:
1. start from yourpacman location cp and plan a path to good cf
(a) Key feature 1: the ant tends to move to the next node with higher probability, but the node with lower probability should also have chance(b) Key feature 2: the ant leaves pheromone when it goes through a path and the pheromone is decaying with time.
More details, such as equations and calculations, of ACO can be found in [1]. To run your AntAgent in pacman game under easy mode,
The command above tells the computer to use AntAgent as its search agent, which is implemented in pacmanAgents.py.
To get the full mark, you should consider how duplicated simulations can be avoided. Highlight and write a simple description in your implementation.
Task 2 (10%)
Python pacman. py - p AntAgent -l medium
The implementation should be compatible with Task 1.
Task 3: Challenge Task(10%)
The implementation should be compatible with Task 1 and Task 2.
Task 3 will be tested 10 times to calculate the probability, though it is not large testing number.
Report (20%)
2 Section B: (50%):
2.1 Traveling Salesman Problem using Ant Colony Optimization
2.2 Task
Write code for implementing the ACO algorithm using Matlab to find the best route.(Assume there are 10 cities and you can design the coordinates of the cities by yourselves) (20%).
Provide a report including problem statement, methodology, results, analysis, conclusions and references (30%).
2.3 Requirements
- Write and implement algorithm in Matlab
- Find solution for the optimization problem
- Draft a report with more than 2 pages in main body
- Your report should include all the required sections
- Your report should be based on your own understanding
- Reference any sources you use with the IEEE Referencing system
3 Marking Criteria for Implementation
The marks are broken down as follows:
Section # and description |
Marks |
Section A(task 1): eat food |
5 |
Section A(task 1): optimal solution (shortest path) |
5 |
Section A(task 2): eat multiple foods |
5 |
Section A(task 2): optimal solution (shortest paths) |
5 |
Section A(task 3): eat multiple foods |
5 |
Section A(task 3): optimal solution (shortest paths) |
5 |
Section A:report |
20 |
Section B: algorithm |
20 |
Section B: report |
30 |
Academic Misconduct
The subject staff take academic misconduct seriously. In the past, we have prosecuted several students that have breached the university policy. Often this results in receiving 0 marks for the assessment, and in some cases, has resulted in failure of the subject.
Important: As part of marking, we run all submissions via a code similarity comparison tool. These tools are quite sophisticated and are not easily fooled by attempts to make code look different. In short, if you copy code from classmates or from online sources, you risk facing academic misconduct charges.