Grasshopper

algorithmic modeling for Rhino

I would like to simulate the foraging ants movement with hoopsnake. Foraging ants create shortest path from the food to their mould by following the level of pheromone.

Ants leave pheromone to the place they have been. The ants which come later will follow the route with the highest level of pheromone.

The above is my concept and I would like to simulate it in grasshopper  I set up a grid 

and let 4 points(ants) walking randomly on the canvas. When ants walk pass a cell on the grid, the pheromone level of the cell rises. Ant will detect the pheromone level of the environment to decide the direction they go next.

My pheromone detection problem:

my way is not  clever.

Every step the ant took are recorded and the points are compared to the grid. Therefore i have a list of points which under the each cell. (pheromone)

 I first find the cell number where the ant is ant. and find the cell number surrounding the cell. For example, ant is at cell number 152, number 131,132,133,151,153,171,172,173 cell will come up. By comparing the pheromone level ( number of point), it will determine the final direction.


The problem is , when i tried to extend the 'perception' of the ant, from one cell surrounding to two cells ..(from pink to purple in the second picture)
everything go soar because it is too much information.

Is there a better way ???

are there any relative topic that is helpful?

Views: 538

Attachments:

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service