C. elegans is a little nematodes that have been extensively studied by scientists - we know all their genes and their nervous system has been analysed many times.
So, in 2014, a collective called the OpenWorm project mapped all the connections between the worm's 302 neurons and managed to simulate them in software
https://www.sciencealert.com/scientists-put-worm-brain-in-lego-robot-openworm-connectome