Ant Colony Pheromone Simulation

They leave pheromone trails to home and to food. You can click to add food. Suggestions and forks welcome! I would like to add collision detection, obstacles, and a pheromone pen and eraser. I was wondering why my ants were making zigzag paths instead of straight lines to the food, but then I remembered that they can travel faster diagonally (1,1) than straight (0,1)... so they _are_ making an optimal path in their pixel-constrained world. I'm so proud of the little buggers. Timelapse: http://www.youtube.com/watch?v=41fbig0tlPs
e.g., mouse, keyboard
e.g., visualization, fractal, mouse
Learn more about Creative Commons
Join Plus+ to change privacy settings
  • Ant.pde
  • AntColony.pde
  • Colony.pde
  • Food.pde
  • Map.pde
  • v1.6.6
  • v1.4.8
Processingjs is deprecated. Learn more
Select mode or a template
Centers sketch and matches the background color.
Prevents infinite loops that may freeze the sketch.
This will be the default layout for your sketches
Easy on the eyes
It will show up when there is an error or print() in code
Disabled: Only available on p5js sketches.
Closes parenthesis-like characters automatically as you type

Controls
Play
Ctrl+Enter
Code
Ctrl+Shift+Enter
Save
Ctrl+S
Interface
Fullscreen
Ctrl+Alt+F
Switch Layout
Ctrl+Alt+L
Settings
Ctrl+Alt+.
Editor
Tidy Code
Ctrl+B
Multiple Cursors
Ctrl+Click
Duplicate Line/Selection
Ctrl+Shift+D
Move Line
Alt+↑/↓
Select Multiple
Ctrl+D
Find in Code
Ctrl+F
Find Next
Ctrl+G
Find Previous
Ctrl+Shift+G

See More Shortcuts

Join Plus+ for private sketches, version history, 1GB space, custom embeds, and more!