We present a computational model capable of solving arbitrary Tower of Hanoi problems. All elements except visual input and motor output are implemented using 150,000 LIF spiking neurons. Properties of these neurons (firing rate, post-synaptic time constant, etc.) are set based on the neurons in corresponding areas of the brain, and connectivity is similarly constrained. Cortical components are all general-purpose modules (for storing state information and for storing and retrieving short-term memories of previous state information), and could be used for other tasks. The only task-specific components are particular synaptic connection weights from cortex to basal ganglia and from thalamus to cortex, which implement 19 context-specific rules. The model has a single free parameter (the synaptic connection weights of the input to short-term memory), and produces timing behaviour similar to that of human participants.