Inspiration

The video by Real Science link The video by Sebastian Lague link

What it does

It's similar to the standard Ant Colony Optimization Algorithm, but instead of traversing a graph of nodes representing food and edges being the straight line path, these ants truly pathfind in a 2D space. In future post-hackathon versions this true 2D space traversal would allow for it to account for terrain and other two-dimensional factors

How we built it

The coding was mostly done in VS but for collaborative parts it was ported onto replit, but mostly worked on in VS due to resource constraints.

Challenges we ran into

My computer is very weak and old making prototyping more resource intensive changes a challenge and my partner was very busy for the project duration. As well, this is the first iterative optimization algorithm we've written so I'm not exactly sure what kind of tuning you're supposed to do. As well there was recurring problems with the fact that attempting to normalize a

np.array([0,0])

vector would throw an error and that trying to find the mean of an empty list of matrices would also throw an error. As well, this is the first program we've written utilizing numpy so we had to learn numpy during the hackathon

Accomplishments that we're proud of

The food can be placed by the user and the ants strike a relatively good mix between exploitation and exploration. Partly a daughter of the necessity arising from my aforementioned weak computer, the program is quite resource efficient, able to run a generation about 10 ants among a couple thousand pheromones in 30% of my 2 decade old computer in a few seconds. This was mostly achieved by splitting the grid into cells so that only pheromones' in the cells around are searched and considered, and using some

What we learned

Optimization algorithms are EXTREMELY sensitive to the parameters under which they are ran, especially if the algorithm itself is not the best designed for resource reasons. Dynamic parameter adjustment is under consideration.

What's next for Ant pathfinding simulator

Changing the way ants are influenced by pheromones' to searching a cone in front of them instead of taking all the nearby pheromones' in the same halfplane as direction the ant is heading and averaging them. This stops the current affect that farther pheromones' have significantly more effect than closer ones. This more nuanced pheremone algorithm will be more resource intensive so some optimizations will have to be made.

Built With

Share this project:

Updates