The screen is divided into 48px cells, and each agent checks only its own cell and the 8 adjacent ones — even with 1000 agents, the flock forms without an exhaustive 1,000×1,000 comparison
The screen is divided into 48px cells, and each agent checks only its own cell and the 8 adjacent ones — even with 1000 agents, the flock forms without an exhaustive 1,000×1,000 comparison