Comments (3)
Hello there,
Can you elaborate more on that? The loops at https://github.com/diogo-fernan/aco/blob/master/src/ACO.cpp#L288-L293 and https://github.com/diogo-fernan/aco/blob/master/src/ACO.cpp#L167-L169 respectively iterate through all pheromone values and edges.
from aco.
Hi,
The array ROUTE
is of length NUMCITIES
. So for example, Say we have 3 cities and an ant found route 1->2->3 as feasible route. ROUTE
will now be 1, 2, 3 https://github.com/diogo-fernan/aco/blob/master/src/ACO.cpp#L167 will iterate over indices 0 and 1 and add edge weight for edges 1->2 and 2->3 only. But afaik, we should also take the weight of edge 3->1 in consideration. Similarly, https://github.com/diogo-fernan/aco/blob/master/src/ACO.cpp#L281 will not update DELTAPHEROMONES
for 3->1. This will be 0. What do you think?
from aco.
As far as I remember the algorithm finds an iterative solution to the shortest path between a starting point and destination. So, in your example, 3->1 would not make sense as it is an inverse path and goes back to the origin. Please see "Computational Intelligence: An Introduction" (first edition from 2002) by Andries Engelbrecht for more information as it provides the theory for the algorithm.
from aco.
Related Issues (3)
- city function in ACO.cpp file HOT 1
- BETA is too low HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aco.