I Built an AI Agent That Gets Curious On Its Own
Active inference: curiosity emerges for free from minimizing surprise — 48% vs 100% on a foraging task. TL;DR: Most AI agents chase rewards — they pick whatever action scores the most points. I tried a different, brain-inspired goal: avoid surprises . Something neat happened — the agent became curious without being told to. It goes looking for information before acting, and that takes it from 48% to 100% on a simple task. ~100 lines. Two different ways to make decisions Most AI agents are "reward chasers." Give them points for doing well, and they'll pick whatever action they expect to score highest. Simple and effective. There's another idea from brain science: instead of chasing points, try to avoid being surprised — act so the world matches what you expected. It sounds almost too simple, but it leads to a surprising bonus: when you're trying not to be surprised, going and finding out what you don't know becomes valuable all by itself. In other words, curiosity isn't something you have to bolt on. It comes for free. This is called active inference , and in 2026 it jumped from neuroscience into AI as a serious approach ( here's a 2026 paper ). Here's the smallest demo that makes it click. The 10-second version The task: a reward is hidden behind either the LEFT door or the RIGHT door (50/50). There's also a hint you can check that tells you which door — if you bother to look. ❌ Reward-chaser ✅ Curious agent What it cares about getting the reward, right now getting the reward + not being unsure What it does guesses a door checks the hint first, then opens the right door Success (400 tries) 48% 100% Nobody told the second agent "go check the hint." It did it on its own, because being unsure bothered it. How it works Before acting, the agent scores each option on two things: Does this get me closer to the reward? Does this make me less unsure about what's going on? value_of_checking_the_hint = how_unsure_am_i # high when it's a total coin-flip value_of_just_guessing =