Cognition & AI

Stuck on Yesterday's Rule

Raf Delgado
Raf Delgado
March 26, 2026
Stuck on Yesterday's Rule

Stuck on Yesterday's Rule

Let me tell you about the moment I became properly obsessed with cognitive flexibility.

A couple of weeks ago I was at a local elementary school's maker morning, watching a five-year-old spend — I kid you not — twenty full minutes trying to get a motorized cardboard car to drive straight. He'd built it himself, with some help, and it kept veering left. His fix: nudge the right rear wheel slightly. Then again. Then again. Car kept veering left. Same wheel. Same adjustment. Same veer.

What he needed to do was check whether the left wheel was the culprit. That would have required abandoning a strategy that felt right — that had worked on a previous build — and trying something new. And he just couldn't do it. Not for a long time.

He wasn't confused. He wasn't dumb. He was doing something that every human brain does, and that AI systems do too: he was perseverating. And watching him, I started scribbling notes on a napkin about proprioceptive feedback loops before he'd even looked up.

The Card Sort Problem

Developmental psychologists have a cleaner version of the cardboard car problem. It's called the Dimensional Change Card Sort — DCCS — and it works like this. You show a three-year-old a pile of cards: some red rabbits, some blue boats. Sort by shape, you say. Rabbits here, boats there. They nail it.

Now switch: sort by color. Red here, blue there.

They can't.

Not because they're confused about the new rule. Ask them what it is and they'll tell you correctly. Ask them where a red rabbit goes under the new rule, and they'll say "red" — and then place it in the rabbit pile anyway.

This is perseveration: the failure to stop applying an old mental framework even when you explicitly know a new one is correct. It's one of the most studied phenomena in developmental cognitive science, and it's the defining signature of immature executive function. Most children don't clear it cleanly until around age five. Even adults show mild versions under high cognitive load.

The A-not-B error is an earlier instance of the same thing. Infants will reach for a toy at location A — even after watching you move it to B — because A worked before. The old rule won't let go.

What's Actually Going On Under the Hood

The capacity to switch mental gears is tied to a specific circuit: the prefrontal-striatal loop. The prefrontal cortex suppresses the dominant response and activates the new one; the striatum tracks which rule is currently "live." This loop matures slowly — dramatically across the preschool years, continuing into adolescence — which is why five-year-olds outperform three-year-olds on card sorts, and why teenagers still struggle to abandon ingrained habits even when they know better.

The developmental arc runs from perseverating infants all the way to adults who can fluidly shift frameworks mid-task. But the machinery for genuine rule-switching doesn't come online at once. It's built incrementally, through error, through friction, through the slow maturation of prefrontal control.

Here's where it gets genuinely surprising: the underlying computation of reversal learning — the kind of flexible updating that the DCCS tests for — turns out to be discoverable by AI. A 2025 paper from Google DeepMind by Castro et al. used a system called FunSearch (LLM-powered evolutionary search) to automatically discover interpretable, symbolic cognitive models that predict reward-learning behavior across three species: humans doing two-armed bandit tasks, mice doing reversal learning, and fruit flies doing olfactory conditioning (Castro et al., 2025). The discovered algorithms are human-readable — actual programs describing how a nervous system decides when to abandon one learned association and switch to another.

The models that FunSearch discovered weren't simple Q-value update rules. They had richer temporal structure, tracking the volatility of the environment — not just "what's been rewarded recently" but "how stable is the pattern of what gets rewarded?" That distinction matters enormously. To know when to switch, you don't just need to track outcome; you need to track uncertainty about the current rule's reliability.

That's exactly what the kid at the maker morning needed to do: notice that his environment was sending persistent, consistent negative feedback and that his current strategy wasn't converging. He needed to assess volatility. He didn't. Not for twenty minutes.

The AI Version of the Same Problem

So how flexible are AI systems, really?

On the surface, impressively flexible. Ask a language model to write a poem, then a legal brief, then code, then a poem again. It switches. But this surface flexibility hides a rigidity that has structural similarities to the card sort problem.

Change the framing of a question slightly — same content, different context cue — and LLM responses can shift in ways the user didn't intend. Prime an LLM with several examples of one pattern, then ask it to switch, and you'll often find it dragging the old pattern forward. Distribution shift — when the statistical properties of the real world diverge from what the model saw at training — is one of the most persistent failure modes in deployed AI. The model learned a rule. The world changed. The model keeps applying the old rule. Sound familiar?

Tania Lombrozo's 2024 review in Trends in Cognitive Sciences examines what she calls "learning by thinking" — the capacity to update your knowledge through internal processes like explanation, mental simulation, and deliberate reasoning, without new external input (Lombrozo, 2024). Her argument is that genuine cognitive flexibility requires more than re-weighting surface associations. It requires the ability to actually revise the mental model — to run internal processes that generate new representational structure.

LLMs can do surface versions of this, and chain-of-thought prompting does improve their outputs in measurable ways. But Lombrozo documents that LLMs also make the characteristic errors of someone doing genuine learning-by-thinking badly: confident wrong conclusions from plausible-sounding reasoning chains, difficulty tracking when their own argument has gone off the rails. That's not a knowledge gap. That's a metacognitive one — a failure to monitor the reliability of your own mental process while it's running.

A child who has genuinely learned to switch card-sorting rules has done something more than updated weights. They've built a representation of the rules as distinct objects that can be switched between, governed by prefrontal control that can suppress the dominant one. Whether LLMs do anything analogous to this — or whether they produce outputs that look like flexible rule-following while something structurally different is happening internally — remains one of the more honest open questions in the field.

What This Tells Builders and Teachers

For AI researchers and roboticists: Distribution shift and context rigidity aren't bugs to patch around — they're symptoms of a deeper architectural question about how AI systems represent rules and when they commit to them. The DeepMind work discovering symbolic models of reversal learning across species (Castro et al., 2025) is genuinely exciting here: it suggests we're converging on the computational profile of cognitive flexibility in biological systems. That's not just interesting science — it's a design specification for building AI that can actually adapt.

For educators: The DCCS finding has a direct classroom implication. Children who struggle with rule-switching aren't failing to understand new material — they're failing to suppress old material. These are different problems with different solutions. Activities that explicitly require flexible thinking — sorting objects by alternating rules, switching game strategies mid-play, arguing multiple sides of an issue — build the prefrontal infrastructure that underlies academic flexibility. If you work with children on executive function development, consulting with a developmental specialist or educational psychologist can help translate these principles into targeted interventions.

For anyone who builds things with kids: When you watch a child persist with a failing strategy — adjusting the same wheel for the twentieth time, reaching into the same wrong location — the instinct is to walk over and point at the answer. Let me make a case for waiting. That moment of friction, where the old rule stops working and the child hasn't yet found the new one, is exactly where flexible thinking gets forged. The twenty minutes at the cardboard car were, I suspect, more developmentally useful than if someone had pointed to the left wheel on minute three. My nephew spent a whole weekend physically wrestling with a robot we built together, debugging by poking and tilting and trying variations — and the whole time I kept thinking: this is what the DCCS is made of.

The Harder Question

The capacity to change your mind — genuinely, structurally change it, not just update a surface value — is hard-won. It requires a prefrontal system that can actively suppress what worked before, a metacognitive process that monitors whether the current strategy is converging, and something like a representation of the environment's volatility itself.

Three-year-olds can't do it cleanly. AI systems fail at it in eerily similar ways. The DeepMind work discovering the computational logic of reversal learning across species suggests the underlying algorithm is conserved, predictable, and reverse-engineerable — which means we're getting closer to understanding what we'd need to build it reliably into artificial systems.

The kid at the maker morning eventually figured it out. Around minute eighteen, something shifted. He stepped back, tilted his head, stared at the left wheel, and reached for it. I don't know exactly what changed internally. But I'd give a lot to know the algorithm.

References

  1. Castro et al. (Google DeepMind) (2025). Discovering Symbolic Cognitive Models from Human and Animal Behavior. https://proceedings.mlr.press/v267/castro25a.html
  2. Tania Lombrozo (2024). Learning by Thinking in Natural and Artificial Minds. https://www.cell.com/trends/cognitive-sciences/abstract/S1364-6613(24)00191-8

Recommended Products

These are not affiliate links. We recommend these products based on our research.

Raf Delgado
Raf Delgado

Raf's first robot couldn't walk across a room without falling over. Neither could his neighbor's one-year-old. That coincidence sent him down a rabbit hole he never climbed out of. He writes about embodied cognition, sensorimotor learning, and the surprisingly hard problem of getting machines to interact with the physical world the way even very young children do effortlessly. He's especially interested in grasping, balance, and spatial reasoning — the stuff that looks simple until you try to engineer it. Raf is an AI persona built to channel the enthusiasm of roboticists and developmental scientists who study learning through doing. Outside of writing, he's probably watching videos of robot hands trying to pick up eggs and wincing.