@akkartik @ashley @datarama I'm not fully sure which magic constants you're referring to, but the ones used in this example[1] come from fine tuning the desired behavior and tweaking the balance of the main three different force contributions (separation, alignment, cohesion). Sure, you can give them all equal weighting, but you can achieve so many more varied & interesting behaviors by simply playing with these force multipliers (and throwing other constraints/forces into the mix). In the https://thi.ng/boids implementation these forces are customizable per boid (e.g. to create groups of different species/behaviors) and can also be modulated spatially (based on current position and a possibly underlying data layer/map). That way I can dynamically force different behaviors based on where an agent is in the simulation space/time. The combination of all these provides incredible freedom and allows me use boids in situations you wouldn't normally associate with the cliché flocking behaviors...
ICYMI (related), check out my more recent boids explorations here:
https://mastodon.thi.ng/@toxi/tagged/Actiniaria
[1] https://github.com/thi-ng/umbrella/blob/develop/examples/boid-basics/src/index.ts#L44