Skip to content

ppsp-team/PyHKBs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyHKBs

This repository contains the code for simulating embodied neural agents controlled by the Haken-Kelso-Bunz (HKB) equations. The code uses Pytorch to enable parallelized solving of differential equations.

Script functionalities

Agent design

alt text

Our agent design (named 'Guido' for 'guided oscillator' in agent_RL.py) consists of four oscillators, corresponding to the sensory system (1 and 2) and motor system (3 and 4). The grey boxes represent the two eyes (or sensors). The left eye feeds the change in stimulus intensity to oscillator 1; the right eye to oscillator 2. The agent's orientation in space changes according to the phase difference between the two motor oscillators. The agent travels at a uniform speed. Both the simulations with individual agents and the multi-agent simulations in the main paper are run with four-oscillator agents. The agent_RL.py also contains a 'SocialGuido' class with an additional 5th oscillator that represents a 'socially sensitive' oscillator that is directly sensitive to the phases of other agents. This class has not been used in the main paper.

Note on training possibilities

The environment classes in environment.py and the agent classes in agent_RL.py are made with a similar structure as standard reinforcement learning approaches. The different layers of the agent classes in agent_RL.py are all differentiable using Autograd to ensure that they can possibly be trained using policy gradient methods in Pytorch.

Cite as

Coucke, N., Heinrich, M. K., Cleeremans, A., Dorigo, M. & Dumas, G. (2023). Collective decision making with embodied neural agents (in prep).

References

Aguilera, M., Bedia, M. G., Santos, B. A., & Barandiaran, X. E. (2013). The situated HKB model: how sensorimotor spatial coupling can alter oscillatory brain dynamics. Frontiers in computational neuroscience, 7, 117. doi:10.3389/fncom.2013.00117

Frank, T. D., Daffertshofer, A., Peper, C. E., Beek, P. J., & Haken, H. (2000). Towards a comprehensive theory of brain activity:: Coupled oscillator systems under external forces. Physica D: Nonlinear Phenomena, 144(1-2), 62-86. doi:10.1016/S0167-2789(00)00071-3

Haken, H., Kelso, J. S., & Bunz, H. (1985). A theoretical model of phase transitions in human hand movements. Biological cybernetics, 51(5), 347-356. doi:10.1007/BF00336922

Ramsauer, H., Schäfl, B., Lehner, J., Seidl, P., Widrich, M., Adler, T., ... & Hochreiter, S. (2020). Hopfield networks is all you need. arXiv preprint arXiv:2008.02217. doi:10.48550/arXiv.2008.02217

Zhang, M., Beetle, C., Kelso, J. S., & Tognoli, E. (2019). Connecting empirical phenomena and theoretical models of biological coordination across scales. Journal of the Royal Society Interface, 16(157), 20190360. doi:10.1098/rsif.2019.0360

Releases

No releases published

Packages

No packages published