Coders Packet

Ant Eating Simulation in C++

By Tushar Takshak

This Project predicts Ant movements and other features that are affected by the food near them coded in C++

Ants are the most interesting insects. Their movement is as much interesting. Therefore the following project determines the movement as follows:

 

Basic theory:: 

Primary Ant moves towards the food leaving markers from home to the destination(where food is present) so that other ants can follow as described in the following diagram.

 

Simulation::

Now other ants from home will start collecting food and returning to home leaving the markers as it is.

ant4" alt="" />

After a little while, we will observe that a large number of ants will be connected to the green area which is the destination area.

When the food will start finishing the ants will again start scattering as follows:

after  food is finally finished they all scatter:

 

Download project

Reviews Report

Submitted by Tushar Takshak (trixtun)

Download packets of source code on Coders Packet