Updated from an original post on 14 Apr 2026.
I recently integrated a Pull Request from OldCrow on our Web Shepherd web application. They have made substantial improvements to scalability, replacing the original O(n²)-complex interaction loop with spatial indexing and other techniques. This extends the practical range from a few hundred agents to a few thousand agents while maintaining smooth real-time performance in most Web browsers.
To learn more:
- The full interactive demo has been updated
- A slimmer version for website integration still uses the old technique, but will be updated shortly
- Code and Documentation has been updated on GitHub
References
Van Havermaet, S., Simoens, P., Landgraf, T., & Khaluf, Y. (2023). Steering herds away from dangers in dynamic environments. Royal Society Open Science, 10(5), 230015.
Interface inspired by the work of Nick Frosst.