mean dist to goal —

Swarm Sandbox

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

  1. Raise goal-seek and lower cohesion and alignment to see a looser sprint toward the target.
  2. Raise cohesion and lower goal-seek to see the swarm clump without approaching the goal.
  3. 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.

Copy link