NodeBox

Create visual output with Python programming code
Home Download Reference Tutorial Library Gallery About

ants.Ant.forage()

Syntax

ant.forage(speed=2)

Description

An ant's main decision loop. Each time forage() is called, the ant checks whether it is going to wander randomly, follow a trail or harvest food.

An ant has useful properties which you can check to see what the ant is doing: