Section: Neuroscience
Topic: Neuroscience

The Switchmaze: an open-design device for measuring motivation and drive switching in mice

10.24072/pcjournal.416 - Peer Community Journal, Volume 4 (2024), article no. e48.

Get full text PDF Peer reviewed and recommended by PCI
article image

Animals need to switch between motivated behaviours, like drinking, feeding or social interaction, to meet environmental availability, internal needs and more complex ethological needs such as hiding future actions from competitors. Inflexible, repetitive behaviours are a hallmark of many neuropsychiatric disorders. However, how the brain orchestrates switching between the neural mechanisms controlling motivated behaviours, or drives, is unknown. This is partly due to a lack of appropriate measurement systems. We designed an automated extended home-cage, the Switchmaze, using open-source hardware and software. In this study, we use it to establish a behavioural assay of motivational switching in mice. Individual animals access the Switchmaze from the home-cage and choose between entering one of two chambers containing different goal objects or returning to the home-cage. Motivational switching is measured as a ratio of switching between chambers and continuous exploitation of one chamber. Behavioural transition analysis is used to further dissect altered motivational switching. As proof-of-concept, we show environmental manipulation, and targeted brain manipulation experiments which altered motivational switching without effect on traditional behavioural parameters. Chemogenetic inhibition of the prefrontal-hypothalamic axis increased the rate of motivation switching, highlighting the involvement of this pathway in drive switching. This work demonstrates the utility of open-design in understanding animal behaviour and its neural correlates.

Published online:
DOI: 10.24072/pcjournal.416
Type: Research article
Keywords: innate behavior, mouse behavior, open-design, automated behavior, behavioral switching, motivation, feeding, drinking, prefrontal cortex, hypothalamus

Hartmann, Clara 1; Mahajan, Ambika 1; Borges, Vinicius 1; Razenberg, Lotte 1; Thönnes, Yves 1; Karnani, Mahesh Miikael 1, 2

1 Department of Integrative Neurophysiology, Center for Neurogenomics and Cognitive Research, Vrije Universiteit Amsterdam, De Boelelaan 1085, 1081 HV Amsterdam, The Netherlands
2 Institute for Neuroscience and Cardiovascular Research, Centre for Discovery Brain Sciences, University of Edinburgh, 1 George Square, Edinburgh EH8 9JZ, UK
License: CC-BY 4.0
Copyrights: The authors retain unrestricted copyrights and publishing rights
     author = {Hartmann, Clara and Mahajan, Ambika and Borges, Vinicius and Razenberg, Lotte and Th\"onnes, Yves and Karnani, Mahesh Miikael},
     title = {The {Switchmaze:} an open-design device for measuring motivation and drive switching in mice},
     journal = {Peer Community Journal},
     eid = {e48},
     publisher = {Peer Community In},
     volume = {4},
     year = {2024},
     doi = {10.24072/pcjournal.416},
     language = {en},
     url = {}
AU  - Hartmann, Clara
AU  - Mahajan, Ambika
AU  - Borges, Vinicius
AU  - Razenberg, Lotte
AU  - Thönnes, Yves
AU  - Karnani, Mahesh Miikael
TI  - The Switchmaze: an open-design device for measuring motivation and drive switching in mice
JO  - Peer Community Journal
PY  - 2024
VL  - 4
PB  - Peer Community In
UR  -
DO  - 10.24072/pcjournal.416
LA  - en
ID  - 10_24072_pcjournal_416
ER  - 
%0 Journal Article
%A Hartmann, Clara
%A Mahajan, Ambika
%A Borges, Vinicius
%A Razenberg, Lotte
%A Thönnes, Yves
%A Karnani, Mahesh Miikael
%T The Switchmaze: an open-design device for measuring motivation and drive switching in mice
%J Peer Community Journal
%D 2024
%V 4
%I Peer Community In
%R 10.24072/pcjournal.416
%G en
%F 10_24072_pcjournal_416
Hartmann, Clara; Mahajan, Ambika; Borges, Vinicius; Razenberg, Lotte; Thönnes, Yves; Karnani, Mahesh Miikael. The Switchmaze: an open-design device for measuring motivation and drive switching in mice. Peer Community Journal, Volume 4 (2024), article  no. e48. doi : 10.24072/pcjournal.416.

PCI peer reviews and recommendation, and links to data, scripts, code and supplementary information: 10.24072/pci.neuro.100180

Conflict of interest of the recommender and peer reviewers:
The recommender in charge of the evaluation of the article and the reviewers declared that they have no conflict of interest (as defined in the code of conduct of PCI) with the authors or with the content of the article.

[1] Akam, T.; Lustig, A.; Rowland, J. M.; Kapanaiah, S. K.; Esteve-Agraz, J.; Panniello, M.; Márquez, C.; Kohl, M. M.; Kätzel, D.; Costa, R. M.; Walton, M. E. Open-source, Python-based, hardware and software for controlling behavioural neuroscience experiments, eLife, Volume 11 (2022) | DOI

[2] Alexander, G. M.; Rogan, S. C.; Abbas, A. I.; Armbruster, B. N.; Pei, Y.; Allen, J. A.; Nonneman, R. J.; Hartmann, J.; Moy, S. S.; Nicolelis, M. A.; McNamara, J. O.; Roth, B. L. Remote Control of Neuronal Activity in Transgenic Mice Expressing Evolved G Protein-Coupled Receptors, Neuron, Volume 63 (2009) no. 1, pp. 27-39 | DOI

[3] American Psychiatric Association Diagnostic and Statistical Manual of Mental Disorders, American Psychiatric Association, 2013 | DOI

[4] Berridge, K. C. Motivation concepts in behavioral neuroscience, Physiology & Behavior, Volume 81 (2004) no. 2, pp. 179-209 | DOI

[5] Berridge, K. C. Evolving Concepts of Emotion and Motivation, Frontiers in Psychology, Volume 9 (2018) | DOI

[6] Berry, R. The natural history of the house mouse, Field Study, Volume 3 (1970), pp. 219-262

[7] Biro, L.; Sipos, E.; Bruzsik, B.; Farkas, I.; Zelena, D.; Balazsfi, D.; Toth, M.; Haller, J. Task Division within the Prefrontal Cortex: Distinct Neuron Populations Selectively Control Different Aspects of Aggressive Behavior via the Hypothalamus, The Journal of Neuroscience, Volume 38 (2018) no. 17, pp. 4065-4075 | DOI

[8] Birtalan, E.; Bánhidi, A.; Sanders, J. I.; Balázsfi, D.; Hangya, B. Efficient training of mice on the 5-choice serial reaction time task in an automated rodent training system, Scientific Reports, Volume 10 (2020) no. 1 | DOI

[9] Bolaños, F.; LeDue, J. M.; Murphy, T. H. Cost effective raspberry pi-based radio frequency identification tagging of mice suitable for automated in vivo imaging, Journal of Neuroscience Methods, Volume 276 (2017), pp. 79-83 | DOI

[10] Bonnavion, P.; Mickelsen, L. E.; Fujita, A.; de Lecea, L.; Jackson, A. C. Hubs and spokes of the lateral hypothalamus: cell types, circuits and behaviour, The Journal of Physiology, Volume 594 (2016) no. 22, pp. 6443-6462 | DOI

[11] Cano-Ferrer, X.; Tran-Van-Minh, A.; Rancz, E. RPM: An open-source Rotation Platform for open- and closed-loop vestibular stimulation in head-fixed Mice, Journal of Neuroscience Methods, Volume 401 (2024) | DOI

[12] Choi, E. A.; Husić, M.; Millan, E. Z.; Gilchrist, S.; Power, J. M.; Jean-Richard dit Bressel, P.; McNally, G. P. A Corticothalamic Circuit Trades off Speed for Safety during Decision-Making under Motivational Conflict, The Journal of Neuroscience, Volume 42 (2022) no. 16, pp. 3473-3483 | DOI

[13] Clarke, R. E.; Voigt, K.; Reichenbach, A.; Stark, R.; Bharania, U.; Dempsey, H.; Lockie, S. H.; Mequinion, M.; Lemus, M.; Wei, B.; Reed, F.; Rawlinson, S.; Nunez-Iglesias, J.; Foldi, C. J.; Kravitz, A. V.; Verdejo-Garcia, A.; Andrews, Z. B. Identification of a Stress-Sensitive Anorexigenic Neurocircuit From Medial Prefrontal Cortex to Lateral Hypothalamus, Biological Psychiatry, Volume 93 (2023) no. 4, pp. 309-321 | DOI

[14] Craig, W. Appetites and Aversions as Constituents of Instincts, Proceedings of the National Academy of Sciences, Volume 3 (1917) no. 12, pp. 685-688 | DOI

[15] Dell’Omo, G.; Ricceri, L.; Wolfer, D. P.; Poletaeva, I. I.; Lipp, H.-P. Temporal and spatial adaptation to food restriction in mice under naturalistic conditions, Behavioural Brain Research, Volume 115 (2000) no. 1, pp. 1-8 | DOI

[16] Eiselt, A.-K.; Chen, S.; Chen, J.; Arnold, J.; Kim, T.; Pachitariu, M.; Sternson, S. M. Hunger or thirst state uncertainty is resolved by outcome evaluation in medial prefrontal cortex to guide decision-making, Nature Neuroscience, Volume 24 (2021) no. 7, pp. 907-912 | DOI

[17] Erskine, A.; Bus, T.; Herb, J. T.; Schaefer, A. T. AutonoMouse: High throughput operant conditioning reveals progressive impairment with graded olfactory bulb lesions, PLOS ONE, Volume 14 (2019) no. 3 | DOI

[18] Fernandez-Leon, J. A.; Engelke, D. S.; Aquino-Miranda, G.; Goodson, A.; Rasheed, M. N.; Do Monte, F. H. Neural correlates and determinants of approach–avoidance conflict in the prelimbic prefrontal cortex, eLife, Volume 10 (2021) | DOI

[19] Ghoniem, A.; van Dillen, L. F.; Hofmann, W. Choice architecture meets motivation science: How stimulus availability interacts with internal factors in shaping the desire for food, Appetite, Volume 155 (2020) | DOI

[20] Goulding, E. H.; Schenk, A. K.; Juneja, P.; MacKay, A. W.; Wade, J. M.; Tecott, L. H. A robust automated system elucidates mouse home cage behavioral structure, Proceedings of the National Academy of Sciences, Volume 105 (2008) no. 52, pp. 20575-20582 | DOI

[21] Hangya, B. Novel automated training platform for studying flexible switching among natural motivated behaviors in mice, Peer Community in Neuroscience (2024) | DOI

[22] Hartmann, C.; Pereira Mateus Borges, V.; Thönnes, Y.; Karnani, M. Build instructions for a long term behavioural enclosure for measuring motivational switching in mice, ResearchEquals, 2023 | DOI

[23] Hartmann, C.; Thönnes, Y.; Karnani, M. Timed running wheel for rodent work using Arduino and Raspberry Pi, ResearchEquals, 2023 | DOI

[24] Hartmann, C.; Thönnes, Y.; Karnani, M. Single entry module for rodent work using Arduino and Raspberry Pi, ResearchEquals, 2023 | DOI

[25] Jendryka, M.; Palchaudhuri, M.; Ursu, D.; van der Veen, B.; Liss, B.; Kätzel, D.; Nissen, W.; Pekcec, A. Pharmacokinetic and pharmacodynamic actions of clozapine-N-oxide, clozapine, and compound 21 in DREADD-based chemogenetics in mice, Scientific Reports, Volume 9 (2019) no. 1 | DOI

[26] Jennings, J. H.; Ung, R. L.; Resendez, S. L.; Stamatakis, A. M.; Taylor, J. G.; Huang, J.; Veleta, K.; Kantak, P. A.; Aita, M.; Shilling-Scrivo, K.; Ramakrishnan, C.; Deisseroth, K.; Otte, S.; Stuber, G. D. Visualizing Hypothalamic Network Dynamics for Appetitive and Consummatory Behaviors, Cell, Volume 160 (2015) no. 3, pp. 516-527 | DOI

[27] Karnani MM Switchmaze, OSF project, 2024 | DOI

[28] Karnani, M.; Hartmann, C. Sensing water dispenser for rodent work using Arduino and Raspberry Pi, ResearchEquals, 2023 | DOI

[29] Karnani, M. M.; Schöne, C.; Bracey, E. F.; González, J. A.; Viskaitis, P.; Li, H.-T.; Adamantidis, A.; Burdakov, D. Role of spontaneous and sensory orexin network dynamics in rapid locomotion initiation, Progress in Neurobiology, Volume 187 (2020) | DOI

[30] Keller, G. B.; Mrsic-Flogel, T. D. Predictive Processing: A Canonical Cortical Computation, Neuron, Volume 100 (2018) no. 2, pp. 424-435 | DOI

[31] Latham, N.; Mason, G. From house mouse to mouse house: the behavioural biology of free-living Mus musculus and its implications in the laboratory, Applied Animal Behaviour Science, Volume 86 (2004) no. 3-4, pp. 261-289 | DOI

[32] Li, B.; Nguyen, T. P.; Ma, C.; Dan, Y. Inhibition of impulsive action by projection-defined prefrontal pyramidal neurons, Proceedings of the National Academy of Sciences, Volume 117 (2020) no. 29, pp. 17278-17287 | DOI

[33] Li, Y.; Zeng, J.; Zhang, J.; Yue, C.; Zhong, W.; Liu, Z.; Feng, Q.; Luo, M. Hypothalamic Circuits for Predation and Evasion, Neuron, Volume 97 (2018) no. 4 | DOI

[34] MaheshKarnani Switch_maze/Modules_SM, GitHub, 2023 (

[35] Matikainen-Ankney, B. A.; Earnest, T.; Ali, M.; Casey, E.; Wang, J. G.; Sutton, A. K.; Legaria, A. A.; Barclay, K. M.; Murdaugh, L. B.; Norris, M. R.; Chang, Y.-H.; Nguyen, K. P.; Lin, E.; Reichenbach, A.; Clarke, R. E.; Stark, R.; Conway, S. M.; Carvalho, F.; Al-Hasani, R.; McCall, J. G.; Creed, M. C.; Cazares, V.; Buczynski, M. W.; Krashes, M. J.; Andrews, Z. B.; Kravitz, A. V. An open-source device for measuring food intake and operant behavior in rodent home-cages, eLife, Volume 10 (2021) | DOI

[36] Meijer, J. H.; Robbers, Y. Wheel running in the wild, Proceedings of the Royal Society B: Biological Sciences, Volume 281 (2014) no. 1786 | DOI

[37] Miller, E. K.; Cohen, J. D. An Integrative Theory of Prefrontal Cortex Function, Annual Review of Neuroscience, Volume 24 (2001) no. 1, pp. 167-202 | DOI

[38] Naneix, F.; Peters, K. Z.; McCutcheon, J. E. Investigating the Effect of Physiological Need States on Palatability and Motivation Using Microstructural Analysis of Licking, Neuroscience, Volume 447 (2020), pp. 155-166 | DOI

[39] Nguyen, K. P.; O’Neal, T. J.; Bolonduro, O. A.; White, E.; Kravitz, A. V. Feeding Experimentation Device (FED): A flexible open-source device for measuring feeding behavior, Journal of Neuroscience Methods, Volume 267 (2016), pp. 108-114 | DOI

[40] Noorshams, O.; Boyd, J. D.; Murphy, T. H. Automating mouse weighing in group homecages with Raspberry Pi micro-computers, Journal of Neuroscience Methods, Volume 285 (2017), pp. 1-5 | DOI

[41] OpenScale Applications and Hookup Guide - SparkFun Learn (

[42] Padilla-Coreano, N.; Batra, K.; Patarino, M.; Chen, Z.; Rock, R. R.; Zhang, R.; Hausmann, S. B.; Weddington, J. C.; Patel, R.; Zhang, Y. E.; Fang, H.-S.; Mishra, S.; LeDuke, D. O.; Revanna, J.; Li, H.; Borio, M.; Pamintuan, R.; Bal, A.; Keyes, L. R.; Libster, A.; Wichmann, R.; Mills, F.; Taschbach, F. H.; Matthews, G. A.; Curley, J. P.; Fiete, I. R.; Lu, C.; Tye, K. M. Cortical ensembles orchestrate social competition through hypothalamic outputs, Nature, Volume 603 (2022) no. 7902, pp. 667-671 | DOI

[43] Peters, K. Z.; Young, A. M. J.; McCutcheon, J. E. Distracting stimuli evoke ventral tegmental area responses in rats during ongoing saccharin consumption, European Journal of Neuroscience, Volume 53 (2021) no. 6, pp. 1809-1821 | DOI

[44] Pfaff, D. W. Drive: Neurobiological and Molecular Mechanisms of Sexual Motivation, The MIT Press, 1999 | DOI

[45] Puścian, A.; Łęski, S.; Kasprowicz, G.; Winiarski, M.; Borowska, J.; Nikolaev, T.; Boguszewski, P. M.; Lipp, H.-P.; Knapska, E. Eco-HAB as a fully automated and ecologically relevant assessment of social impairments in mouse models of autism, eLife, Volume 5 (2016) | DOI

[46] Rich, P. D.; Liaw, H.-P.; Lee, A. K. Large environments reveal the statistical structure governing hippocampal representations, Science, Volume 345 (2014) no. 6198, pp. 814-817 | DOI

[47] Risold, P.; Thompson, R.; Swanson, L. The structural organization of connections between hypothalamus and cerebral cortex, Brain Research Reviews, Volume 24 (1997) no. 2-3, pp. 197-254 | DOI

[48] Rodgers, R.; Holch, P.; Tallett, A. Behavioural satiety sequence (BSS): Separating wheat from chaff in the behavioural pharmacology of appetite, Pharmacology Biochemistry and Behavior, Volume 97 (2010) no. 1, pp. 3-14 | DOI

[49] Saunders, J. L.; Ott, L. A.; Wehr, M. AUTOPILOT: Automating experiments with lots of Raspberry Pis, bioRxiv (2022) | DOI

[50] Schatz, A.; Winter, Y. LabNet hardware control software for the Raspberry Pi, eLife, Volume 11 (2022) | DOI

[51] Schwartz, M. W.; Woods, S. C.; Porte, D.; Seeley, R. J.; Baskin, D. G. Central nervous system control of food intake, Nature, Volume 404 (2000) no. 6778, pp. 661-671 | DOI

[52] Servo - Arduino Reference (

[53] Shallice, T. Specific impairments of planning, Philosophical Transactions of the Royal Society of London. B, Biological Sciences, Volume 298 (1982) no. 1089, pp. 199-209 | DOI

[54] Silasi, G.; Boyd, J. D.; Bolanos, F.; LeDue, J. M.; Scott, S. H.; Murphy, T. H. Individualized tracking of self-directed motor learning in group-housed mice performing a skilled lever positioning task in the home cage, Journal of Neurophysiology, Volume 119 (2018) no. 1, pp. 337-346 | DOI

[55] Spellman, T.; Svei, M.; Kaminsky, J.; Manzano-Nieves, G.; Liston, C. Prefrontal deep projection neurons enable cognitive flexibility via persistent feedback monitoring, Cell, Volume 184 (2021) no. 10 | DOI

[56] Stamatakis, A. M.; Van Swieten, M.; Basiri, M. L.; Blair, G. A.; Kantak, P.; Stuber, G. D. Lateral Hypothalamic Area Glutamatergic Neurons and Their Projections to the Lateral Habenula Regulate Feeding and Reward, The Journal of Neuroscience, Volume 36 (2016) no. 2, pp. 302-311 | DOI

[57] Sternson, S. M. Hypothalamic Survival Circuits: Blueprints for Purposive Behaviors, Neuron, Volume 77 (2013) no. 5, pp. 810-824 | DOI

[58] Stoffregen, P. CapacitiveSensor Library, GitHub, 2023 (

[59] Takeuchi, T.; Tamura, M.; Tse, D.; Kajii, Y.; Fernández, G.; Morris, R. G. M. Brain region networks for the assimilation of new associative memory into a schema, Molecular Brain, Volume 15 (2022) no. 1 | DOI

[60] Tervo, D. G. R.; Kuleshova, E.; Manakov, M.; Proskurin, M.; Karlsson, M.; Lustig, A.; Behnam, R.; Karpova, A. Y. The anterior cingulate cortex directs exploration of alternative strategies, Neuron, Volume 109 (2021) no. 11 | DOI

[61] Tervo, D. G.; Proskurin, M.; Manakov, M.; Kabra, M.; Vollmer, A.; Branson, K.; Karpova, A. Y. Behavioral Variability through Stochastic Choice and Its Gating by Anterior Cingulate Cortex, Cell, Volume 159 (2014) no. 1, pp. 21-32 | DOI

[62] Watts, A. G.; Kanoski, S. E.; Sanchez-Watts, G.; Langhans, W. The physiological control of eating: signals, neurons, and networks, Physiological Reviews, Volume 102 (2022) no. 2, pp. 689-813 | DOI

[63] Wiepkema, P. Positive Feedbacks At Work During Feeding, Behaviour, Volume 39 (1971) no. 2-4, pp. 266-273 | DOI

[64] Woodard, C. L.; Bolaños, F.; Boyd, J. D.; Silasi, G.; Murphy, T. H.; Raymond, L. A. An Automated Home-Cage System to Assess Learning and Performance of a Skilled Motor Task in a Mouse Model of Huntington’s Disease, eneuro, Volume 4 (2017) no. 5 | DOI

Cited by Sources: