Skip to content

lopis/ants

Repository files navigation

Ant Space

Basic algorithm

  • If the pixel 2 steps ahead is > 50% a trail, go forward
  • If the pixel 2 steps to the right is a trail, turn a little to the right
  • If the pixel 2 steps to the left is a trail, turn a little to the left
  • Otherwise, go forward with a chance of turning left of right a small angle