A teenager and a robot learned to flip a pancake from just hearing good or bad
No recipe, no wrist angles, just trial, error, and feedback until, after about 50 tries, the flip sticks.

CS50 · CS50x 2025 - Artificial IntelligenceThe volunteer looked a little nervous, which was fair. Max, a high school senior visiting for family weekend, had just been called down from the audience, handed a real frying pan and a fake pancake, and asked to flip it in front of everyone.
David Malan, the Harvard lecturer running the demonstration, gave him almost no instruction. Flip the pancake up and around so it stays in the pan, he said. After each try, he would say only one of two words, good or bad. Do more of the good, and less of the bad.
Max peaked early. His first toss was very good. The next ones got worse, to laughter from the crowd, and one attempt did not really flip at all. After a few more tries, Malan stopped the game to applause and handed Max a parting gift.
It was reinforcement learning in miniature, one way to train computers to learn from data. Until then, Malan explained, the class had written deterministic code, rows of ifs and elses that told a game exactly how a ball or paddle should move. For machine learning, programmers instead set up software that can practice its way to an answer they did not spell out step by step.
He played a video of a robot in a research lab doing the same thing. A person demonstrated the motion once to give it a starting example. After that, there was no programming for move up, move left, or flick the wrist. The robot just tried, failed, and tried again.
Its first attempt did worse than Max. So did the third, the fifth, and the tenth. By about 11 tries, it was getting a bit more air. By 15 tries, it was still bad. But every motion could be broken down into small movements along three directions, and the software was keeping score, doing more of the movements that earned a reward and less of those that did not.
After about 50 tries, the robot could flip the pancake again, and again, and again. Max had learned from only the goal and the good or bad calls. The robot had learned mostly from feedback after one human demonstration.
Questions people ask
How does the robot know what counts as good or bad?
Someone has to define the reward, usually in software. For pancake flipping, that could be sensors that detect height, rotation, and whether the pancake lands back in the pan. A flip that goes high, turns over, and stays in the pan scores well, while one that falls short or falls out does not.
Why did Max start strong and then get worse?
That happens a lot with trial-and-error learning. An early lucky success does not yet tell you which part of the motion mattered, so the next attempts can drift while you explore. Both people and robots often get messier before they get consistent, as they test which changes help and which hurt.
Where is reinforcement learning used outside the kitchen?
It is common wherever a computer can practice safely and keep score, from video games and board games to warehouse robots and self-driving simulations. Systems learn by repeating actions that raise the score and avoiding ones that lower it. Over millions of simulated tries, they can discover strategies no programmer explicitly taught.