- Open Access
Lagrangian formulation to optimize interactions in virtual environments
Phys. Rev. E 113, 014310 – Published 16 January, 2026
DOI: https://doi.org/10.1103/b2t1-hrmx
Abstract
We study the dynamics of user-agent interactions in virtual environments through mathematical models derived in a Lagrangian formalism. The goal is to optimize the number of agents required to solve a generic predefined task while minimizing the computational cost to achieve it. Specifically, we derived Euler-Lagrange equations of motion to describe the different ways in which agents may interact with users. The main advantage of this approach lies in its peculiarity to derive a scaling law for any interaction rule one wishes to design, ensuring that the system scales while optimizing the global impact of the interactions. By specifying an action functional over interaction trajectories and enforcing its minimization, the optimal way to allocate agents emerges naturally as Euler–Lagrange equations, embedding the entire optimization strategy directly into the formalism. This intrinsic coupling of dynamics and cost yields a universal procedure to compute the scaling laws for arbitrary interaction rules, ensuring that agent populations and computational expense grow according with environmental complexity. We illustrate the methodology with two specific example. These results also offer a foundation for further research into multi-agent dynamics and their applications in virtual environments.
Physics Subject Headings (PhySH)
Article Text
References (21)
- C. M. Topaz and A. L. Bertozzi, SIAM J. Appl. Math. 65, 152 (2004).
- J. Toner, Y. Tu, and S. Ramaswamy, Ann. Phys. 318, 170 (2005).
- W. Bialek, A. Cavagna, I. Giardina, T. Mora, E. Silvestri, M. Viale, and A. M. Walczak, Proc. Natl. Acad. Sci. USA 109, 4786 (2012).
- G. K. Sar and D. Ghosh, Chaos 33, 123126 (2023).
- T. Vicsek, A. Czirók, E. Ben-Jacob, I. Cohen, and O. Shochet, Phys. Rev. Lett. 75, 1226 (1995).
- Y. Chen and T. Kolokolnikov, J. R. Soc. Interface 11, 20131208 (2014).
- M. Zheng, Y. Kashimori, O. Hoshino, K. Fujita, and T. Kambara, J. Theor. Biol. 235, 153 (2005).
- J. M. Jeschke and R. Tollrian, Anim. Behav. 74, 387 (2007).
- I. D. Couzin, J. Krause, N. R. Franks, and S. A. Levin, Nature (London) 433, 513 (2005).
- G. Wang, T. V. Phan, S. Li, M. Wombacher, J. Qu, Y. Peng, G. Chen, D. I. Goldman, S. A. Levin, R. H. Austin, et al., Phys. Rev. Lett. 126, 108002 (2021).
- S. Bolouki and R. P. Malhamé, IFAC Proc. Vol. 44, 8819 (2011).
- M. Durve, F. Peruani, and A. Celani, Phys. Rev. E 102, 012601 (2020).
- F. Lu, M. Zhong, S. Tang, and M. Maggioni, Proc. Natl. Acad. Sci. USA 116, 14424 (2019).
- A.-L. Barabási and R. Albert, Science 286, 509 (1999).
- R. D. Beer, Artif. Intell. 72, 173 (1995).
- D. Helbing and P. Molnar, Phys. Rev. E 51, 4282 (1995).
- F. Palombi, S. Ferriani, and S. Toti, Eur. Phys. J. B 93, 194 (2020).
- M. Brouillet and G. Y. Georgiev, Processes 12, 2937 (2024).
- J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (IEEE, Piscataway, 2016), pp. 779–788.
- https://thenemesis.io/.
- https://decentraland.org/.