Coder Social home page Coder Social logo

ants-mesa's Introduction

Ants Model

Summary

This is an agent-based simulation of ants exploring for food and communicating through pheromones.

Ants will either be foraging for food or homing in on the home location. If a foraging ant finds food, they eat it and begin returning home, otherwise they wander either randomly or following the pheromone gradient. If an ant returns home, they deposit their food and return to foraging behavior, otherwise they drop pheromone and take one step closer to home.

Ant Simulation GIF

Installation

To install the dependencies use pip and the requirements.txt in this directory. e.g.

    $ pip install -r requirements.txt

How to Run

To run the model interactively, run mesa runserver in this directory. e.g.

    $ mesa runserver

Then open your browser to http://127.0.0.1:8521/ and press Start.

Model Parameters

There are many parameters that can be adjusted to explore different behaviors.

  • Evaporation Rate: the percentage of pheromone that disappears each step.
  • Diffusion Rate: the percentage of pheromone that is disbursed to surrounding cells each step.
  • Initial Drop: the amount of pheromone the ants use at the start of the homing behavior.
  • Random Move Probability: the chance that a foraging ant will make a random move instead of following the pheromone gradient.
  • Drop Decay Rate: the exponential decay of the pheromone being dropped by the ants, such that they leave less pheromone the further away they are from the food source.

Further Reading

The original NetLogo model:

Wilensky, U. (1997). NetLogo Ants model. http://ccl.northwestern.edu/netlogo/models/Ants. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

ants-mesa's People

Contributors

mgoadric avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.