About Hanitu


The logic behind Hanitu...

Animals frequently face environmental challenges which need to be overcome by integrating different functions including sensory, association and motor in the nervous systems. However, in typical computational neuroscience courses, different components of nervous systems are introduced in separate topics and therefore the students hardly appreciate how these components work together to achieve the ultimate goal of an animal – to survive in a challenging environment. To address this issue, we developed a simulation environment, Hanitu, for graduate and undergraduate courses in computational neuroscience.
In Hanitu, the students design nervous systems from scratch for virtual worms so that they can perceive sensory stimuli, make decisions, initiate movements and forage for foods in a competing virtual world. Students encounter challenges along the way and have to think deeply about several fundamental issues including: 1) how to handle the sensory input that may vary by several orders of magnitude, 2) how to make accurate perceptual decisions, and 3) how to produce flexibility behavior under various environmental conditions? Students are free to design the circuits with their creativity and to further compare their designs with existing models or known natural solutions. The design process can stimulate the students to think beyond textbooks and to develop a broader perspective about computational neuroscience.

The basic design of Hanitu

  • The virtual world
  • Hanitu hosts a two dimensional virtual world. Each worm is centered at one grid point in the space and can move from one grid point to one of the four nearest points. There are one or more food sources as well as optional toxicant sources located at arbitrary locations in the virtual world. The odorant molecules of the foods or the toxicants propagate in the space through the diffusion process.

  • The virtual worm
  • Each virtual worm has a circular shape with olfactory sensory neurons and motor neurons located on the body wall at the locations corresponding to the four possible moving directions.
    The olfactory sensory neurons respond to the odorant molecules with a sigmoidal function of the molecule concentration.
    A worm moves to one of the four nearest grid point if a motor neuron at the corresponding direction fires one action potential.
    Each worm starts with 100% of energy level and dies when the energy level drops to 0. The energy consumption consists of two configurable components: 1) the basal component: the energy level decreases constantly with time, and 2) The movement component: the energy level decreases when the worm makes a movement. The worms can “refill” their energy by making a contact with foods. Neurons in the worms are simulated by the leaky integrate-and-fire model and the synapses are conductance based.

    The structure of Hanitu

    Hanitu v.1.3 (and above) is composed of three core components: GUI, Hanitu(the virtual world) and Flysim(the neural network simulator). GUI is designed for users to edit worm circuits more easily. Users don’t need to deal with configuration files of worm circuits and virtual world (default file names: circuit.ccg and world_config.wcg ) directly. Hanitu is responsible for : (1)maintaining the virtual world (e.g. diffusion of food and toxicant molecules) (2)handling the interaction between worms or worms to the world (3)determining worms motion based on the results of simulation. Flysim simulates the neural network of worms by the data which Hanitu sends to it.
    In the first step, users can set virtual worm circuits and virtual world through user friendly GUI. Next, Hanitu reads two configuration files for arranging the virtual world and settling worms in the virtual world. Hanitu sends network.conf (configuration file of worm circuit) and network.pro (record of stimulus to neurons) to Flysim by TCP/IP at every timestep in the virtual world (1ms). After that, Hanitu waits for receiving results of neural network simulation from Flysim. Hanitu adjusts life levels and locations of worms through analysis of data receiving from Flysim. Meanwhile, Hanitu outputs two files: Locations and Spikes. The former describes locations and life levels of worms and the latter records spikes time of neurons in worms. GUI presents animation of worms according to Locations file.

    The energy homeostasis mechanism – NPY system

    Energy homeostasis plays an important role in modulating the behavior of an animal, which has an internal drive to maintain its energy at a certain level. When the energy level is low, the animal feels hungry and will take certain actions to acquire food. However, if the energy level is high, the animal is likely to take a rest or to conduct other activity.
    Ghrelin plays a major role in these delicate mechanisms and is an unexpected discovery during serial experiments about growth hormones (Kojima et al. 1999). “Ghre” is an Indo-European root that means “to grow”. Ghrelin is mainly produced and released by the empty stomach and activates the neuropeptide Y (NPY) neuron in arcuate nucleus of hypothalamus for synthesis and secretion of NPY. Then NPY binds to Y1 receptors (Y1R), which lead to the increase of feeding behavior.

    In the Hanitu system, the secretion of Ghrelin activates the activities of NPY neuron and the NPY neuron activates the downstream neurons. The amount of Ghrelin secretion (as represented by the spike input to the NPY neuron) is linearly, but negatively, correlated with the energy level of the worm. The slop and intercept can be adjusted by the users in the same way as how food and toxicant stimuli are adjusted.


  • Twyman, R.M., 2009. Hormonal Signaling to the Brain for the Control of Feeding/Energy Balance, in: Squire, L.R. (Ed.), Encyclopedia of Neuroscience. Academic Press, Oxford, pp. 1201–1206.
  • Nakazato, M., Murakami, N., Date, Y., Kojima, M., Matsuo, H., Kangawa, K., Matsukura, S., 2001. A role for ghrelin in the central regulation of feeding: Article: Nature. Nature 409, 194–198. doi:10.1038/35051587
  • Peeters, T.L., 2005. Ghrelin: a new player in the control of gastrointestinal functions. Gut 54, 1638–1649. doi:10.1136/gut.2004.062604