"Just understand it from first principles. The magic is in the code."
If you have ever spent a rain-slicked Saturday afternoon watching a man in a plain grey T-shirt live-code a neural network from scratch on YouTube, you have been a student of Andrej Karpathy.
Karpathy is not just a world-class engineer; he is the "Teacher of AGI." While his peers in Silicon Valley are locked in a frantic, multibillion-dollar arms race to build the biggest "black box" in history, Karpathy is obsessed with opening it. He possesses what he calls an "almost pathological need" to understand the fundamental calculus of intelligence-and then explain it to the rest of us.
In 2024, Karpathy walked away from the two most powerful labs on Earth-Tesla and OpenAI-to found Eureka Labs. He didn't do it to build a new model to compete with GPT-5. He did it to build a "new kind of school."
"I don't believe my greatest impact is building the AGI," Karpathy says. We are discussing his vision for an AI-native education. "I believe it’s teaching the next billion people how to build it themselves."
Karpathy is tall and slender, a fast-talking presence who speaks with a technical grit that his PhD advisor, Fei-Fei Li, once described as "technical talent brought to life." But beneath the intensity is a deep-seated empathy for the student. From his childhood as a quiet immigrant in Toronto to the grueling "marathon clip reviews" of the Tesla Autopilot team, Karpathy’s career has been a single, continuous lesson: that intelligence is not a mystery handed down from the heavens; it is a process that can be synthesized, step by step, in code.
Part I: The Simulated Runner and the Magic of the Weight
The lesson that defined Karpathy’s life-his "Rosebud"-did not happen at a blackboard. It happened on a flickering computer screen at the University of British Columbia during his Master’s degree.
Karpathy was working on physically simulated figures. He had built a primitive neural network and tasked it with a simple, monumental goal: control a virtual human body.
"Seeing the brain learn to control the body was the magic," Karpathy reflects.
He watched as the collection of numbers and weights evolved through trial and error. At first, the runner would simply collapse into a heap of virtual limbs. Then it would twitch. Then it would stumble. And finally, after thousands of iterations, it learned to balance. It learned to walk. It learned to navigate a physical world.
It was the moment Karpathy realized that intelligence wasn't a spark of divinity; it was an optimization problem. If you understand the gradients, you can build life from scratch. This experience shifted his focus from general computer science to the specific pursuit of deep learning. He realized that if a neural network could learn to run, it could eventually learn to see, to speak, and to think.
Part II: The "Badmephisto" Era and the Outsider’s Edge
Before he was the Director of AI at Tesla, Karpathy was a legend in a very different corner of the internet: the Rubik’s Cube community.
Born in Bratislava, Czechoslovakia, in 1986, Karpathy moved to Toronto at age 15. He was a "quiet, studious kid," an immigrant who felt like an outsider and found solace in puzzles. In 2006, frustrated by the lack of clear resources for speedcubing, he started a YouTube channel under the handle badmephisto.
He created some of the first comprehensive video tutorials for the "CFOP" method, breaking down complex algorithms into their most basic, intuitive parts. His tutorials became so influential that world-record holders would later cite them as their primary source of learning.
This was the birth of the Karpathy Method: zero ego, zero shortcuts, and a relentless focus on the "aha!" moment.
At Stanford, under the "Godmother of AI" Fei-Fei Li, Karpathy co-developed CS231n, the first dedicated deep learning course at the university. He was the primary instructor, writing the majority of the course notes that would eventually become the "gold standard" for the entire industry.
He refused to use high-level libraries like PyTorch or TensorFlow in his lectures. He made the students derive the backpropagation calculus by hand. "If you don't understand the chain rule," he told his class, "you don't understand the machine."
His sister, Iveta Karpathyova, a professional illustrator and animator, would later influence this educational drive. While Andrej handled the technical logic, Iveta’s work in visual storytelling taught him that information is most effective when it is beautiful. This creative influence would eventually define the "X-Men Academy" visual identity of his future ventures.
Part III: Software 2.0 and the Tesla Wars
In 2017, Elon Musk recruited Karpathy to lead Tesla’s Autopilot team. His mission was to build "Tesla Vision"-a pure, camera-based AI system that could navigate the chaos of the real world without the crutch of expensive radar or lidar.
Karpathy’s tenure at Tesla was a "Software 2.0" war. He coined the term to describe a new paradigm of programming: in Software 1.0, humans write code; in Software 2.0, humans curate the data that trains the code.
He led the team through "Operation Vacation," a "half-joke, half-North Star" goal to build automated data pipelines so advanced that engineers could theoretically go on vacation while the neural networks improved themselves through "shadow mode."
But the reality was grueling. Karpathy spent 75% of his time on data curation and only 25% on algorithms. He spent late-night sessions manually reviewing thousands of "intervention" clips-moments where a human driver had to take over. He was debugging the "Long Tail" of reality: the flickering stop signs, the phantom objects on billboards, the rogue plastic bags blowing across the road.
"Musk wants the future yesterday," Karpathy says of the pressure. While he praised Musk’s intuition, the constant public deadlines and the shift from technical building to managerial oversight began to take a toll.
In 2022, after a four-month sabbatical, Karpathy walked away from Tesla. Sam Altman eventually hired him back to OpenAI, reportedly because Karpathy was "exhausted working for Musk." But even at OpenAI, the cycle repeated. He felt the pull back to the keyboard, and more importantly, back to the student.
Part IV: Vibe Coding and the Quest for Eureka
In 2024, Karpathy founded Eureka Labs.
The philosophy is "Teacher + AI symbiosis." Karpathy believes that the world has a scarcity of great teachers-people like Richard Feynman or Carl Sagan who can make a subject come alive. By using AI to scale that instruction, he wants to create a world where every student has access to a "Teacher AI" modeled after the best minds in history.
He recently added a new term to our vocabulary: "Vibe Coding." He realized that as LLMs handle the syntax and the "boilerplate" of programming, humans must shift their focus to the high-level intent-the "vibe" of the architecture. But to provide that vibe, you have to understand the machine from first principles.
His first product, LLM101n: Let’s Build a Storyteller, is an undergraduate-level curriculum that guides students through building a functional AI from scratch using Python, C, and CUDA. It is a return to his "badmephisto" roots: no shortcuts, no black boxes, just the code.
Karpathy maintains his own "second brain"-a "hacky collection of Python scripts" and a personal Wiki indexed by an LLM-that allows him to iterate on his teaching materials at high speeds. He is his own best student.
Part V: The Simple Path
Today, Andrej Karpathy is a billionaire who still records 3-hour long YouTube videos in his spare time. He still cycles through the Bay Area, still reads two audiobooks a week, and still views his job as "dealing with his own psychology."
For the man who watched a simulated runner learn to walk, the goal has never changed. He isn't trying to build a God that will solve our problems for us. He’s trying to give us the tools to solve them ourselves.
"Just understand it," he says. "The magic is in the process."
Karpathy’s approach treats intelligence as an optimization problem solvable through first principles and clean, foundational code.
Join the EulerFold community
Track progress and collaborate on roadmaps with students worldwide.
Discussion
0Join the discussion
Sign in to share your thoughts and technical insights.
Loading insights...
Recommended Readings
The author of this article utilized generative AI (Google Gemini 3.1 Pro) to assist in part of the drafting and editing process.