Giter Club home page Giter Club logo

antz's Introduction

Antz : A simulation of ants behaviour in Processing

The goal of "Antz" is to show that from a very simple set of rules, repeated by many agents (here virtual ants!), a complex task can be executed.

For "Antz" the basic rules are:

when not carrying food:

  • search randomly (e.g. Gaussian randomness) ; they start from the nest.
  • if some food is found then pick it up
  • else if a 'strong enough' pheromone trail is found then try to follow it

when carrying food:

  • go back to the nest in the shortest possible way
  • leave a pheromone trail behind
  • if the nest is reached, put the food down.

The pheromone trail fades away as the time goes by. I would make the trail not a single pixel wide line, but instead a few pixels wide with a gradient from the ant actual path. The pheromones from several ants accumulate. A food source disappears when empty (several sources are generated when starting).

Furthermore some obstacles are added to show that the ants "choose" the shortest way around an obstacle, due to the fact that the short path has a more dense pheromone trail than the longest which eventually gets discarded. (This principle is studied in the data routing/networking field).

To be honest it's not quite there yet to show that last point in the current version.

antz's People

Contributors

fphenix avatar

Stargazers

 avatar

Watchers

 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.