Swarm Sandbox
Mix four steering rules and move the goal to see how a flock balances chasing it and staying together.
mean dist to goal —
What you are looking at
- Agents
- The swarm members following the same four weighted rules.
- Obstacles
- Objects the agents steer around.
- Goal
- The target you can move around the field.
Try this
- Raise goal-seek and lower cohesion and alignment to see a looser sprint toward the target.
- Raise cohesion and lower goal-seek to see the swarm clump without approaching the goal.
- Press Move goal or tap the canvas to see the swarm give chase in a new direction.
Key idea
Separation, alignment, cohesion, and goal-seeking can pull a swarm in different directions. Changing their weights changes the group’s motion.