The Virtual Ant Farm: A Biological Simulator



















How to use this program:


         This program is not fully functional but the foundational of a much more powerful platform have been laid in the version that you see before you. the image on the right is the starting place that the program will always take. In this mode the user is looking straight down upon the simulation grid. Here one can place colonies and food sources on the grid. Future implementations will have make use of a three dimensional grip work to simulate the affects of topography upon ant movement and foraging. The image on the left is an example of the simualtion aspect of the program. Once colonies have been place... (right now that is all you can place). Then ants will emerge from the colony nodes and begin to forage for food. All ant movement is based upon the grid and moves are made in turns for each ant. This allows for an easy process of steps for the animation.
         To get started with the program simply set the number of ant in the colony you are about to create by adjusting the "Population" slider near the bottom of the screen. You may also specify the food reserves with the slider labeled "Resources." Once a colony has been placed simply hit the animate button and you will be switched over into animation mode where you may rotate the view by dragging on the screen. Ants will begin to forage.


My algorithms:

          The structure that ant colonies proved itself to be far more complex than I had originally estimated. My data structure is laid out as follows. Each large green sphere is an instance of class colony. Each instance of this class keeps a record of all ants under its control, their current location as well as all of the food sources that members of its colony have found. FoodSources are stored within a global list that records each source's size, favorability as food and number of ants currently pursuing this food source. Ants forage upon three major action methods. The first
  1. Kinesis: (or random movement) This is a seemingly random movement characteristic of many foraging insects. It is classified as undirected movement in direct response to the intensity of an undirected stimulus. In this case the stimulus is the hunger level of the colony, a normalized value between 0 and 1 determined by the ratio of ants in the colony to the number of ants that the colony's current food reserves could supply for about 100 turns.
  2. Anemotaxis: (or directed motion towards wind) this feature is partially implemented. As I mentioned above, every food source has a scent associated with it. This scent is carried by the wind and picked up on by passing ants who then use bresenham's straight line algorithm to locate the food source.
  3. Chemotaxis: (or oriented motion toward a chemical stimulus). This one might be mistaken for the scent trail described above for anemotaxis but it differs primarily in the source of the chemical being sought out by the foraging ants. In this case the chemical being sought is the phermone trail laid by other ants. These trails decay with time. Ants place a small weight of pheremone onto each square in the graph as it passes over, and each turn these weights are incrementally decreased. These paths can be used to locate food or rival nests. Well, that's about it, I wish I had been able to implement the full functionallity of this program for this assignment but time is a cruel mistress. I hope that you enjoy what I have created here!

Ant Algorithms in Machine Learning:

         The behavior of Eusocial insects, particularly those within the family Formicidae (Ants), have long been the subject of algorithmic analysis. It is fascinating to observe how several independent agents, realtively autonomous to one another, can efficiently navigate a problem space in order to locate food, nesting sites and also to wage war. This unique ability of ants to cooperate while exploiting information gathered from their environment provides an interesting example for the simulation of learning processes in machines. Here the reader will find a paper entitled "A Reinforcement Learning Exploration Strategy based on Ant Foraging Mechanisms." This paper discusses ant foraging algorithms that have been adapted into a maze solution algorithm for robots. All observations of ant behavior used in this study were performed by direct observation of the ant species Lasius niger in its native habitat.
         This paper is a particularly good example of ant based algorithms applied to machine learning applications. If you wish a more in depth treatment of the subject I would recommend that you start your search at www.google.com by typing in the search phrase "ant foraging algorithms."