An open API service indexing awesome lists of open source software.

https://github.com/redtachyon/antworld-0.0

A simple Python implementation of the pheromone-based ant model, adapted from https://practicingruby.com/articles/ant-colony-simulation
https://github.com/redtachyon/antworld-0.0

Last synced: over 1 year ago
JSON representation

A simple Python implementation of the pheromone-based ant model, adapted from https://practicingruby.com/articles/ant-colony-simulation

Awesome Lists containing this project

README

          

# Ant colony simulation

This is a Python adaptation of [this](https://practicingruby.com/articles/ant-colony-simulation)
Ruby implementation (which in turn is a port of [this](https://gist.github.com/michiakig/1093917) Clojure version)

I know, it's going pretty far in terms of adaptations, but it's still preserving the interesting properties.

The setup is pretty simple - install the packages with `pip install -r requirements.txt`

It's pretty barebones and I'm not sure if I will continue developing it (if I will, I'll likely rewrite it from scratch),
but you can run `python main.py` and generate your own ant colony!

Here's a taste of what can happen, visualized via matplotlib:

![This should be an ant gif](basic_animation.gif)