Skip to content

Commit 13bebff

Browse files
committed
🐜 Initial commit
0 parents  commit 13bebff

9 files changed

+1002
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.map

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# 🐜 ACO-TS
2+
Ant colony optimization algorithm wrote in typescript. You can see the demo in action [here](https://ultimatedoge5.github.io/ACO-TS/).
3+
4+
## About
5+
ACO (Ant colony optimization) algorithm was invented to search for the (probabilistic) optimal path on a weighted graph and to solve the [travelling salesman problem](https://en.wikipedia.org/wiki/Travelling_salesman_problem).
6+
7+
## Algorithm
8+
There are multiple [extensions](https://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms#Common_extensions) of the ant system, but I decided to implement the first and original one. This algorithm is heuristic which means that it will most likely give a better solution with more iterations.
9+
10+
### Control variables
11+
In the ACO algorithm, we need five variables to control the behaviour of our ants:
12+
* Alpha - states how much impact the pheromones have on the final score of an edge
13+
* Beta - determines how much influence the distance has on the final score of an edge
14+
* Pher - initial value of pheromones
15+
* Pho - defines the rate at which pheromones will evaporate
16+
* Q - indicates the number of pheromones
17+
18+
Using other values than the default will change the behaviour of ants and their ability to determine paths.
19+
20+
## Sources
21+
[Ant colony optimization](https://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms)

build/classes.js

+255
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/index.js

+69
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)