Presentation is loading. Please wait.

Presentation is loading. Please wait.

EE4E,M.Sc. C++ Programming Assignment Introduction.

Similar presentations


Presentation on theme: "EE4E,M.Sc. C++ Programming Assignment Introduction."— Presentation transcript:

1 EE4E,M.Sc. C++ Programming Assignment Introduction

2 Aims/Objectives Aims/Objectives  To produce a C++ implementation of the ANT colony optimisation algorithm (ACO)  To apply to the travelling salesman problem

3 ANT algorithms

4 Ants are practically blind but they still manage to find their way to and from food. How do they do it? Ants are practically blind but they still manage to find their way to and from food. How do they do it? These observations inspired a new type of algorithm called ant algorithms (or ant systems) These observations inspired a new type of algorithm called ant algorithms (or ant systems) These algorithms are very new (Dorigo, 1996) and is still very much a research area These algorithms are very new (Dorigo, 1996) and is still very much a research area

5 ANT algorithms Ant systems are a population based approach. In this respect it is similar to genetic algorithms Ant systems are a population based approach. In this respect it is similar to genetic algorithms There is a population of ants, with each ant finding a solution and then communicating with the other ants There is a population of ants, with each ant finding a solution and then communicating with the other ants

6 ANT algorithms Real ants can find the shortest path to a food source by laying a pheromone trail Real ants can find the shortest path to a food source by laying a pheromone trail The ants which take the shortest path, lay the largest amount of pheromone per unit time The ants which take the shortest path, lay the largest amount of pheromone per unit time Positive feedback reinforces this behaviour and more ants take the shortest path resulting in more pheromone being laid Positive feedback reinforces this behaviour and more ants take the shortest path resulting in more pheromone being laid

7 Travelling Salesman Problem Classic discrete optimisation problem Classic discrete optimisation problem  Salesman needs to visit all cities just once and return back home

8 Travelling Salesman Problem N cities -> (N-1)! routes N cities -> (N-1)! routes Currently TSP’s involving 1000’s cities are being studied Currently TSP’s involving 1000’s cities are being studied You should restrict your algorithm to problems with <100 cities! You should restrict your algorithm to problems with <100 cities! The ACO algorithm has proved to be an effective approach with performances close to optimal The ACO algorithm has proved to be an effective approach with performances close to optimal

9 Travelling Salesman Problem Ants distribute an amount of pheremone on each part of its route in inverse proportion to the length of the route Ants distribute an amount of pheremone on each part of its route in inverse proportion to the length of the route  Doesn’t quite mimic the behaviour of real ants! Typically the number of ants ~number of cities Typically the number of ants ~number of cities After every iteration t (all ants complete their routes), the pheremone trails are updated and new ants are generated After every iteration t (all ants complete their routes), the pheremone trails are updated and new ants are generated

10 Travelling Salesman Problem In practice, applying ACO to TSP is a compromise between reinforcing previous ant behaviour and exploring new solutions In practice, applying ACO to TSP is a compromise between reinforcing previous ant behaviour and exploring new solutions  Probabilistic decisions  Pheromone evaporation

11 Implementation Use any convenient programming platform Use any convenient programming platform Think about presentation of results and user interfaces Think about presentation of results and user interfaces  Console based I/O ok but GUI’s more flexible and user friendly Important to separate out ANT-based classes and the problem domain (TSP) classes so that either can be used separately Important to separate out ANT-based classes and the problem domain (TSP) classes so that either can be used separately

12 Assessment Programming report (deadlines are on the handout) Programming report (deadlines are on the handout) Follow closely the marking pro-forma Follow closely the marking pro-forma The report should contain discussions about object orientation, code re-useability, object interaction, algorithm performance and comparisons (close to ‘optimal’?) The report should contain discussions about object orientation, code re-useability, object interaction, algorithm performance and comparisons (close to ‘optimal’?) A formal design discussion is not expected but informal class/object diagrams and pseudo-code should be used A formal design discussion is not expected but informal class/object diagrams and pseudo-code should be used

13 Assessment Include with your report your software with enough information to allow me to run it Include with your report your software with enough information to allow me to run it  Maybe include a user guide I will base the marks partly on the observed functionality I will base the marks partly on the observed functionality


Download ppt "EE4E,M.Sc. C++ Programming Assignment Introduction."

Similar presentations


Ads by Google