I Put a Fly’s Brain in Minecraft. It Learned to Farm. — Transcript
Full transcript
- 0:00In October of 2024,
- 0:01scientists published a complete wiring diagram of a fruit fly's brain.
- 0:05Every neuron, every connection, free to download.
- 0:09So I downloaded it.
- 0:10And then I took a piece of it, I put it inside of Minecraft,
- 0:13and I spent four days teaching it to farm wheat.
- 0:16This video is that experiment,
- 0:18and I'm going to explain all of it from the beginning.
- 0:20What a brain actually is made of, how you map one,
- 0:23which piece I took, and what that piece does inside of a real fly,
- 0:26how it runs on my computer, how it plays Minecraft,
- 0:29how you teach it anything at all.
- 0:30Then 15 lessons from put a seed into the ground to being
- 0:34dropped in a field with nothing but a bucket of water.
- 0:36I have been staring at Minecraft in wheat for four days,
- 0:40so let's finally get into this.
- 0:46So you start at the bottom. A brain.
- 0:48Yours or fruit fly's is made of one kind of part, the neuron.
- 0:52A neuron is a cell shaped like a wire.
- 0:54At one end, it has branches that collect signals.
- 0:56At the other end, it has a long cable that sends a signal out.
- 0:59And it only does one thing.
- 1:00It listens to the neurons connected to it,
- 1:02and if enough of them are shouting at once,
- 1:04it fires, and passes a signal down to its own cable to the next neurons in line.
- 1:08The point where one neuron hands a signal to the next
- 1:10is called a synapse, and there are two kinds.
- 1:13An excitatory synapse says fire more.
- 1:15An inhibitory synapse says fire less.
- 1:17Every neuron is constantly adding up its fire
- 1:19mores and its fire lesses and deciding. That's it. That's the whole machine.
- 1:24Seeing, remembering, wanting a sandwich.
- 1:26It's all that, repeated a lot of times. How many times?
- 1:30Well, you have 86 billion neurons.
- 1:32A fruit fly has about 140 ,000, which is still a lot,
- 1:36but it's few enough that you could, in theory, write down every single one.
- 1:40And that list has a name, a connectome.
- 1:42The complete wiring diagram of a brain.
- 1:44Every neuron, every synapse between them. And here's how you make one.
- 1:48A fly's brain is the size of a poppy seed.
- 1:50Researchers took one from an adult female fly and cut it into 7 ,050 slices.
- 1:56Each slice is over 1 ,000 times thinner than a human hair.
- 1:59And every single one of them went under an electron microscope,
- 2:02which gave them about 21 million images that look like this, gray static.
- 2:07Every blob in that static is a cross section of a neuron.
- 2:10To get the shape of one neuron, you find its blob in the next
- 2:12slice and the next and follow it through thousands of images.
- 2:16Then you do that for every neuron in the brain.
- 2:18And AI did that first pass and got a lot of it wrong.
- 2:21So a project called FlyWire, led out of Princeton, put the whole thing
- 2:25online and hundreds of scientists and volunteers spent years fixing it by hand.
- 2:29The result? 139 ,255 neurons, about 50 million synapses,
- 2:35researchers from 127 institutions published in Nature.
- 2:39And what you actually download is this table.
- 2:42This neuron connects to that neuron with this many synapses.
- 2:46More synapses means a stronger connection.
- 2:48They even predicted for each neuron,
- 2:50whether it's the fire more kind or the fire less kind.
- 2:53One thing to be clear on though, this is a wiring diagram, not a recording.
- 2:57It tells you what's connected to what.
- 2:59It doesn't tell you what the fly was thinking.
- 3:01It's the circuit board, but it's not the software.
- 3:03But a circuit board is something a computer can run.
- 3:06So if you're anything like me, you've probably seen a few videos
- 3:09recently of people playing with this project.
- 3:11I was absolutely fascinated, you know,
- 3:14not with hurting the whole it or torturing it thing,
- 3:17but more teaching it and seeing, you know,
- 3:20how an actual mapped brain can like learn and teach.
- 3:23And that's kind of what fascinated me.
- 3:24And for some reason, the first thing that I actually thought of was
- 3:27shoving it in Minecraft and seeing what happens.
- 3:30But for the first asterisk,
- 3:32I'm not going to be running the whole brain for this experiment.
- 3:35Most of it does things Minecraft doesn't need like flying.
- 3:38I took 1536 neurons and the 42
- 3:42,921 connections between them, about 1% of the brain.
- 3:46But every one of those connections is real.
- 3:48It exists inside of the actual fly and at that actual strength.
- 3:51I didn't add any and I didn't rewire any.
- 3:53And it's not a random 1%.
- 3:55It's a one complete pathway front to back.
- 3:58It's the fly's sense of smell.
- 3:59And I picked it for two reasons.
- 4:01It's the most studied learning circuit in the entire fly.
- 4:04And it's shaped like a decision.
- 4:05Something comes in and at the other end of the fly either wants it or it doesn't.
- 4:09It has four stages.
- 4:10And I'm going to walk through all four because once you see what each one
- 4:13does in a real fly, the rest of this video will actually make sense to you.
- 4:16A fly smells with its antennal.
- 4:18They're covered in receptor neurons, about 1300 on each one.
- 4:22And each receptor only reacts to certain chemicals inside of the air.
- 4:25So a smell to a fly isn't one signal. It's a pattern.
- 4:29A rotting banana sets off one combination of receptors.
- 4:31Vinegar sets off a different combination.
- 4:33The smell is which ones are firing like a chord on a piano.
- 4:37So my slice has 256 of these.
- 4:39And it's the kind that the data set labels as responding to any food smells.
- 4:43So this is going to be our front door.
- 4:44And this is where anything that the brain is going
- 4:46to need to know about has to come in first.
- 4:49Those receptors all send their cables to the same place.
- 4:52A relay station at the front of the brain called the antennal lobe. And it's tidy.
- 4:56Every receptor of the same type plugs into the same little ball of wiring.
- 5:00There are about 50 of these balls.
- 5:01So you can picture the relay station as a panel of 50
- 5:04lights and every smell lights up its own combination.
- 5:07Two kinds of neurons work here.
- 5:09Local neurons run sideways between the lights and they're
- 5:12inhibitory, the fire less kind. They're a volume control.
- 5:15If a smell is overwhelming, they'll just turn everything
- 5:17down so it doesn't just max out every single light. And they sharpen things.
- 5:20Strong lights push down their weak neighbors.
- 5:22Messy signal in, clean signal out.
- 5:24Then projection neurons are the output cables.
- 5:27They carry the cleaned up pattern deeper into the
- 5:29brain and they send it to two places at once.
- 5:31I'll come back to why there are two.
- 5:33I've got 128 local neurons and 256 projection neurons.
- 5:37So the first destination is the part that matters the most.
- 5:40It's called the mushroom body because in 1850, a French biologist
- 5:43looked at an insect brain
- 5:45under a microscope and thought it looked like a mushroom. That's the whole reason.
- 5:48It had a stalk and a cap.
- 5:49It is the fly's learning center.
- 5:51If you damage it, a fly can still smell perfectly well.
- 5:53It just can't learn anything about what it smells anymore.
- 5:56The mushroom body is made up of neurons called Kenyon cells,
- 5:59named after the man who first described
- 6:01them in 1896. A real fly has about 2 ,000 on each side of its brain.
- 6:06I've got 512. Here's what a Kenyon cell does.
- 6:09Each one listens to about seven projection neurons,
- 6:12picked more or less at random, and it's stubborn.
- 6:14It only fires if several of its seven are active at the same time.
- 6:17One is not enough. So each Kenyon cell is a detector for one specific combination.
- 6:22These three lights together, and every Kenyon
- 6:24cell is watching for a different combination.
- 6:26The result is that any given smell only switches on about 5% of the Kenyon
- 6:30cells, and different smells switches on a different 5%.
- 6:34Every smell gets its own sparse little pattern, its own barcode.
- 6:37And that's pretty cool if you think about it.
- 6:39Two smells that are nearly identical at the receptors,
- 6:41say ripe banana and slightly overripe banana,
- 6:44light up almost the same lights on the panel.
- 6:46Hard to tell apart, but run them through the Kenyon cells,
- 6:49and they come out as two clearly different barcodes,
- 6:51which means the fly can attach a memory
- 6:53to one of them without messing up the other.
- 6:55So how does a fly actually learn?
- 6:57The Kenyon cells all connect to a small number of output neurons.
- 7:00Those output neurons push the fly towards something, or away from it.
- 7:04Now, say the fly smells a particular smell and then finds sugar.
- 7:07A third set of neurons fires, and they release dopamine.
- 7:10Same channel as in your brain.
- 7:12The dopamine lands on the synapses between the Kenyon cells that are
- 7:15active right now, that smells barcode, and the output neurons.
- 7:18And it changes their strength. That's it. That's a memory.
- 7:21Next time that barcode shows up, those synapses are different.
- 7:25So the output neurons respond differently, and the fly goes toward the smell.
- 7:28A fly's memory is a handful of synapses getting a bit stronger or a bit weaker.
- 7:32And the second destination for those projection neurons?
- 7:35It's called the lateral horn, and it's the instinct route.
- 7:38Hardwired reactions a fly is born with, no learning needed.
- 7:41The mushroom body is what the fly hasn't learned.
- 7:43The lateral horn is what it already knew.
- 7:45For my outputs, I took neurons from both routes.
- 7:48The ones the dataset labels as approach,
- 7:5096 from the mushroom body's outputs, and 288 from the lateral horn.
- 7:54So that's my 1536. Smell comes in through the receptors,
- 7:58gets cleaned up at the relay station,
- 7:59gets turned into a barcode by the Kenyon cells, and what comes out?
- 8:03The far end is one answer.
- 8:05Do I want to go toward this or not?
- 8:07Which, if you think about it, is all you
- 8:09need to choose your next move in Minecraft.
- 8:11I just have to make Minecraft smell like something, to the fly.
- 8:14And here's how you actually simulate that.
- 8:16In my version, each neuron holds one number.
- 8:18How active it is right now.
- 8:20Every step, each neuron looks at every neuron connected to it,
- 8:23takes their activity,
- 8:24multiplies it by the strength of the connection, and adds it up.
- 8:27Fire more connections, push its number up.
- 8:29Fire less connections, push it down.
- 8:3135 ,339 of mine push up, 7 ,582 push down.
- 8:36That split comes from the real fly.
- 8:38I run that four times.
- 8:39Four steps is how long it takes a signal to get from the receptors
- 8:42at the front to the outputs at the back, and then I read the outputs.
- 8:46And I should be honest about how simple that is.
- 8:48A real neuron fires in sharp electrical spikes,
- 8:50runs dozens of chemicals, and has timing down to the millisecond.
- 8:54Mine is one number, so the wiring is real, but the neurons are more of a cartoon.
- 8:58It runs on my graphics card because a graphics card is built to do
- 9:01thousands of small multiplications at the same time, and that's all this is.
- 9:0542 ,921 of them per step.
- 9:07One full pass through the brain takes about six milliseconds.
- 9:11The fly is not the slow part of this project, Minecraft is.
- 9:14The brain needs a body, so I built a Minecraft mod,
- 9:17which is just extra code that loads inside of the game.
- 9:19Mine's called FlyBridge, and it does two jobs.
- 9:22Job one is it tells the brain what's happening.
- 9:24The mod runs a tiny server
- 9:26inside of Minecraft that only my own computer can reach.
- 9:29The brain's code asks it a question,
- 9:31what's going on, and it answers with two things.
- 9:33A screenshot shrunk to 96 by 54 pixels, which looks like this.
- 9:38And a list of facts, straight from the game.
- 9:40How many seeds I have, whether I'm holding a hoe,
- 9:42for each tile nearby, is it dirt,
- 9:44is it farmland, is it something growing, how ripe is it, is it wet, how far away?
- 9:48That's the second asterisk, and it's the biggest one.
- 9:51The fly does not play from pixels alone.
- 9:53It gets facts a human player never sees.
- 9:55With 1536 neurons and only that blurry picture,
- 10:00this video would be four years long and end pretty badly.
- 10:03And its second job. The mod controls the character with real inputs.
- 10:07It presses the actual keys, walk, look, left click,
- 10:10right click, no teleporting, no spawning items.
- 10:13It's a normal survival world,
- 10:15and don't get me wrong, this is controlled by the brain.
- 10:17It's more of a way for the brain to control the character.
- 10:21Think of it as, you know, fly a friendly controller for Minecraft.
- 10:25So how do you get till that tile into a smell receptor?
- 10:29A fly has no wiring for that, so I added two small pieces that are not fly.
- 10:34At the front, a translator.
- 10:35It takes the facts and the picture and converts them into 256 numbers.
- 10:39How active each of those 256 smell receptors should be.
- 10:43It's an artificial nose.
- 10:44It turns a Minecraft situation into a smell pattern.
- 10:47And at the back, a reader.
- 10:49It looks at the approach neurons and boils them down to one score.
- 10:52Both start out at random, and both have to be learned.
- 10:55And everything in between is the fly.
- 10:57So here's one decision, start to finish.
- 10:59This whole loop is the whole video.
- 11:01One, the game state becomes a list of options.
- 11:04Each option is a job and a target.
- 11:06Till this tile, plant that one, go to the chest, wait.
- 11:09Two, each option goes through their translator
- 11:11and into the receptors as its own smell.
- 11:13Three, the signal crosses the fly circuit.
- 11:16Four steps, out comes one number.
- 11:18How much do I want this?
- 11:20Four, do that for every option. Highest number wins. No randomness.
- 11:24Five, and this is the third asterisk, the brain picks what and where.
- 11:28It doesn't walk. Once it picks plant on that tile,
- 11:32a script I wrote handles the walking over, aiming, and clicking.
- 11:35The fly is the manager, it makes every decision,
- 11:37and it has never once touched the mouse.
- 11:39If it picks something impossible, like planting with no seeds,
- 11:42the game rejects it, nothing happens, and it has to choose again.
- 11:45Remember that, because it comes up constantly during the learning process.
- 11:48Right now, every score is garbage.
- 11:50A fly's smell circuit has no opinions about wheat, and it has to learn them.
- 11:53Fifteen lessons, one brain carried through all of them. Here's lesson one.
- 12:00Here's what you're looking at, because it's on screen all video.
- 12:03Left, Minecraft, live.
- 12:05Top right is the brain.
- 12:06Those are my real 1536 neurons,
- 12:08drawn where they sit in the actual fly, letting up with each decision.
- 12:13Brighter doesn't mean smarter.
- 12:14Below that, the fly's view,
- 12:16what the mod is reporting with an outline around whatever the brain just picked.
- 12:19Then four lines, one for each stage you just learned.
- 12:22Receptors, relay, Kenyon cells, and output. And a fly at a desk.
- 12:26He does nothing.
- 12:27I made him on day one when I still had the energy for this project.
- 12:30The label in the corner tells you the phase,
- 12:32and every lesson goes through the same five.
- 12:34First is baseline.
- 12:35Before I teach it anything, I let it try.
- 12:37Four empty plots, 64 seeds, with no training.
- 12:41It chooses to wait, and then it chooses to wait again. 12 times.
- 12:45Its scores are random, and wait happened to come out on top.
- 12:48Nothing changed, so wait came out on top again,
- 12:50and I capped it at 12. Second is the teacher demo.
- 12:53The teacher isn't me, it's a plain boring script that already
- 12:56knows how to plant because I wrote the steps out.
- 12:58It plays the lesson perfectly, and the system records pairs.
- 13:01Here was the situation. Here's what the teacher picked. 16 of them.
- 13:05This way of teaching has a name. Imitation learning.
- 13:08You don't reward it, you don't punish it,
- 13:10you show it someone doing it right and train it to make the same choices.
- 13:14Third is teacher validation.
- 13:16The teacher does one more run, and those examples get locked away.
- 13:19The brain never trains on them.
- 13:20They're the exam, and I'll show you why in a second.
- 13:22The fourth stage is learning from examples.
- 13:25The game sits idle, and this happens on the graphics card,
- 13:28and here's what is actually happening.
- 13:30The system is full of adjustable numbers. Thousands of them.
- 13:33I show the brain one recorded situation and ask, what would you pick?
- 13:36It picks wrong. Then some maths work out for every single adjustable number.
- 13:40If I made you slightly bigger,
- 13:41would the teacher's choice have scored higher or lower?
- 13:44And then it nudges the number a tiny bit in the helpful direction.
- 13:47Next example, nudge.
- 13:49Next example, nudge.
- 13:5016 examples, 90 times through the pile, about 1400 rounds of nudging. That's it.
- 13:56That is how basically all modern AI learns,
- 13:58and all the chatbots that you use included.
- 14:00Guess, check against the right answer,
- 14:02nudge every number slightly, and repeat a ridiculous number of times.
- 14:05Mine just has a fly in the middle.
- 14:07So which numbers are adjustable? Three groups.
- 14:10The translator, which is the artificial nose, the reader,
- 14:13which is on the output, and the fly connections themselves.
- 14:16Each of the 42 ,921 real synapses has a volume
- 14:19setting that training can turn down to zero or up to double.
- 14:23But there are two things training can never do.
- 14:25It can't add a connection that isn't in the fly, and it can't flip one.
- 14:29A fire less synapse stays fire less forever.
- 14:32Whatever this brain learns, it has to learn inside the fly's wiring.
- 14:35And to be straight with you, this is not how a real fly learns.
- 14:38A real fly uses dopamine in the mushroom body.
- 14:40Mine uses calculus from outside.
- 14:42Real wiring, artificial learning. Now, the exam.
- 14:45If you study the same 16 examples 90 times,
- 14:48you can score perfectly by memorizing them, without understanding anything.
- 14:51So after every time through the pile, I test the brain on the locked away
- 14:54examples that it's never seen, and I keep
- 14:56whichever version scored the best on those.
- 14:58Here, that was around 10 of 90. Fifth is the frozen check.
- 15:02Frozen means learning is switched off,
- 15:04the numbers can't change, the teacher is gone,
- 15:06new layouts it hasn't seen, whatever it does now is what it actually learned.
- 15:10One, two, three, four.
- 15:12Four seeds, ten seconds, then twice more. Three out of three.
- 15:16That's the method for every lesson here.
- 15:18Try it untrained, watch a teacher, train, freeze, test.
- 15:221536 fly neurons now know one thing, and it's where seeds go.
- 15:26And here's lesson two.
- 15:30The ground is plain dirt, you have to hoe it into farmland first, and then plant.
- 15:34Here's the untrained attempt, don't blink, that was it.
- 15:37Slowed down, it picks a plant, on dirt, rejected,
- 15:40plant, rejected, four times in under a second.
- 15:43That's how the brain fails, and you'll see it in nearly every lesson.
- 15:47It does not fail by doing nothing, it does the last thing that worked,
- 15:50with total confidence, somewhere that it makes no sense to do that.
- 15:54And you can see why. It scores the options.
- 15:56Plant wins, because planting is the only thing it's ever been taught.
- 15:59The game says no, nothing in the world changes, so it scores the same options,
- 16:03gets the same numbers, and plant wins again.
- 16:06It carries nothing over between decisions,
- 16:08every neuron starts from zero each time,
- 16:10every decision is the first decision of its life.
- 16:13Teaching it lesson two has a trap, and it's a famous one.
- 16:16Planting and tilling are stored in the same adjustable
- 16:17numbers, so if I train on only tilling,
- 16:20those nudges will happily wreck whatever made it get good at planting.
- 16:22It's called catastrophic forgetting.
- 16:24Teach it lesson two, and lesson one falls out of its head. Two fixes.
- 16:28I mix the old planting examples back into the pile
- 16:30so it has to keep getting those ones right,
- 16:33and I keep a copy of the brain from before the lesson
- 16:35and penalize the new one for drifting away from the old one's answers.
- 16:38Frozen check, till, plant, till, plant, three out of three.
- 16:44Lesson three is the first one that actually needs judgment.
- 16:47For wheat plants, one of them is fully grown.
- 16:50Harvest that one, and you leave the rest alone.
- 16:52In Minecraft, wheat has eight growth stages,
- 16:54and yes, the brain gets that number from the mod.
- 16:57It is not squinting at pixels to work out if the wheat looks yellow enough.
- 17:00Untrained, it tries to plant seeds on top of plants that already exist.
- 17:03Same failure. The last thing that worked.
- 17:06Trained, look at the map.
- 17:0743%, 57, 71, 100. It outlines the 100. And there's no safety net here.
- 17:14The script that does the walking doesn't check the brain's work.
- 17:16If it had picked the 71, the script would have walked over and destroyed it.
- 17:19Three out of three passed.
- 17:24Lesson four joins it all up.
- 17:25Harvest the ripe wheat, pick up what drops, replant the empty tile.
- 17:29The untrained attempt is interesting this time.
- 17:31It harvests one, then it replants it.
- 17:33No one actually taught it that, and I was
- 17:35pretty actually surprised that it did that.
- 17:37Harvesting from lesson three and planting from lesson
- 17:39one just happened to line up.
- 17:40But then it tries to plant on wheat that's still standing and gets stuck.
- 17:44So it half already knew it.
- 17:46Trained, the full chain.
- 17:47And I want to point out what this isn't.
- 17:49It isn't a recording being played back.
- 17:51Wheat drops land in random places, so one run took 11 decisions and the next took
- 17:5410. After every single action,
- 17:56it takes a fresh look at the world and asks, what now?
- 17:59Three out of three, it can farm a tiny plot, but now it gets harder.
- 18:03And that brings us to lesson five.
- 18:07A proper three by three garden bed.
- 18:0918 decisions to finish it.
- 18:11Now, completely untrained, it just does it.
- 18:13Till, plant, till, plant, six out of nine plots,
- 18:17zero mistakes, before it hits the 12 decision cap.
- 18:19The skills from the tiny plots carried over to a bigger one.
- 18:22So how do I teach it the rest without damaging what it already has?
- 18:25This is where I changed how it learns for the rest of the video.
- 18:28From here on, everything it learned so far gets locked. Read only.
- 18:32The fly connections, the translator, the old reader, all of it.
- 18:35Then, for each new lesson, I add one small
- 18:37new reader on the output, called a head.
- 18:40It looks at the exact same 1536 neurons.
- 18:43It just forms its own opinion about what their activity means.
- 18:46Training only touches the new head.
- 18:48And afterwards, the computer checks that every locked
- 18:50number is identical to before, down to the last digit.
- 18:53So it's one fly brain growing a team of specialists that all read from it.
- 18:57It physically cannot forget lesson one because lesson one is now locked.
- 19:01I know it matters, because the first time I filmed this lesson,
- 19:03I forgot to switch that system on.
- 19:05It trained the old way and passed two checks out of three.
- 19:07So I threw that take away, I went back to the old save
- 19:09brain from the end of lesson four, and I started again.
- 19:12That's the rule for this whole project.
- 19:14A failed take will keep nothing.
- 19:16Nine of nine, three out of three passed.
- 19:20Lesson six is where I take away its stuff.
- 19:22The hoe and seeds are in a chest now.
- 19:24Untrained, it tries to till the dirt with its bare hands,
- 19:27which gets rejected, obviously, four times. Dirt means till.
- 19:30It has always meant till.
- 19:32The fact that it isn't holding a hoe is right there in its list of facts.
- 19:35Hoe, zero. But up to now, that number has never once mattered.
- 19:39It always was holding a hoe, so it never learned to look for it.
- 19:42So that's what this lesson really teaches,
- 19:44not how to use a chest, that your inventory is part of the situation.
- 19:48And to be clear, who does what?
- 19:49The brain makes one decision, go restock, walking to the chest,
- 19:52opening it, clicking the items out, that's the script.
- 19:55Trained, straight to the chest once, then it three out of three.
- 20:01Lesson seven, water.
- 20:03In Minecraft, farmland needs water within four blocks.
- 20:06Without it, the soil dries out and eventually turns back into plain dirt.
- 20:09So here's an empty hole, and here's a full bucket.
- 20:12Untrained, it stands next to the hole, holding the bucket,
- 20:15plants all four seeds in bone dry soil, and then gets stuck.
- 20:19Placed water is just a job that has never been taught the right answer before.
- 20:23This needed 24 teacher demos, the most of any lesson,
- 20:26because placing the water is only one decision out of six in each run.
- 20:30And this is where the exam really earns its keep.
- 20:32It went through 90 rounds of training.
- 20:34The version I kept was round 17. Look at the two lines.
- 20:37Its score on the examples it was studying keeps going up the whole time.
- 20:41Its score on the hidden exam peaks early and then gets worse.
- 20:44That gap is the brain giving up on learning
- 20:45the idea and memorizing the answers instead.
- 20:48There's a name for it, overfitting.
- 20:50If I'd kept the final version,
- 20:51I'd have kept a worse brain that looked better on paper.
- 20:54Trained, water first, then plant, and in two of the runs,
- 20:57a dry tile had already turned back into dirt before it got there.
- 21:00Nobody demonstrated that exact situation.
- 21:02It just re -tilled it and carried on.
- 21:04Because tilling dirt is something it's known since lesson two.
- 21:07Three out of three passed.
- 21:11Lesson eight, a seven by seven field with water in the middle.
- 21:1548 plots already planted.
- 21:16The job, keep it running.
- 21:18Harvest what ripens, pick it up, replant it, and store wheat in a chest.
- 21:22Do the whole field twice, store at least 96 wheat, break zero young plants.
- 21:26Asterisk, wheat takes forever to grow.
- 21:28So from here on, crops grow at 20 times normal speed.
- 21:31Only the crops, the brain,
- 21:32and the character are moving at normal speed still.
- 21:35The teacher demo for this is seven and a half minutes and 360 decisions.
- 21:39I'm playing it fast because I watched at a normal
- 21:41speed and I would not wish that on you or my worst enemy.
- 21:44After training, it agreed with the hidden exam 88% of the time.
- 21:47Best score yet on the biggest task yet. Frozen check.
- 21:54That was it. One second.
- 21:56It walked up to a field of ripe wheat and chose
- 21:58store wheat in the chest with no wheat.
- 22:00Rejected four times. 88%.
- 22:03Here's what happened, and it's the most useful
- 22:05thing I learned in this whole project.
- 22:07Look at what those 360 teacher decisions are made of.
- 22:09About 100 harvests, about 100 pickings, and about 100 replants.
- 22:13And storing, about 15. You only
- 22:15store when your pockets are full so it's more rare.
- 22:17That means the hidden exam only had three storage
- 22:20questions in it and the brain got all three wrong. Zero of three.
- 22:23But it nearly got everything else right so the average still came out at 88%.
- 22:27The score buried the one thing it couldn't do and the one
- 22:30thing it couldn't do happened to be the first decision of the run. Second problem.
- 22:34I'd been teaching it. Here's the situation.
- 22:36Here's the one thing the teacher picked. Copy that.
- 22:39But that says nothing about all the other options.
- 22:41It never learned that storing with empty
- 22:43hands isn't just not what the teacher did. It's impossible. So two fixes.
- 22:48One, every job gets an equal amount of time in training
- 22:50no matter how rare it was in the demo.
- 22:52Two, I stop labeling just the right answer.
- 22:55For every situation, every option gets a label. This one's productive.
- 22:58This one's impossible.
- 22:59This one would damage a crop.
- 23:01It learns what not to do and why.
- 23:03I also made extra practice material by taking
- 23:05real examples and changing them slightly.
- 23:07A different camera angle, a different look, and that's called augmentation.
- 23:11It's generated, not played.
- 23:12There was no new teacher demo and I didn't have another 10 minutes of wheat in me.
- 23:16And to be fair, this chapter is three recordings joined together.
- 23:19The teaching, that repair, and the retest.
- 23:22Every other chapter but one is a single continuous take. Frozen check.
- 23:26Harvest, pickup, replant, and there, the chest with wheat.
- 23:3010 minutes, 325 decisions, 99 wheat stored,
- 23:34all 48 plots twice, rejected zero, broken zero.
- 23:38Remember the empty chest because it's going to come back.
- 23:42Lesson nine is the other half.
- 23:44Lesson eight was looking after a field that already existed.
- 23:47This is building one.
- 23:48Empty pockets, a chest of supplies, dry ground, and 98 decisions.
- 23:53It took three takes and the second failure taught me something.
- 23:56It got its gear, placed the water, and then tilled nine
- 23:58tiles in a row without planting any of them, and then stalled. Here's why.
- 24:02The teacher always goes till, plant, till, plant.
- 24:05So the teacher is never in a situation
- 24:07with lots of tilled soil and nothing planted,
- 24:09which means the brain has never seen that situation, not once.
- 24:13And the moment it wandered into it, it had nothing to go on.
- 24:15That's the big weakness of imitation learning.
- 24:17The teacher only ever shows you the right path.
- 24:20Step off of it, even slightly, and you're somewhere with zero examples.
- 24:23In AI, this has a name. Distribution shift.
- 24:26The situations you meet aren't the situations that you study. The fix?
- 24:30I generate worksheets. Take real recorded moments and change the facts.
- 24:33What if half the field were tilled and none were planted?
- 24:36What if you only had four seeds left? Not gameplay.
- 24:39Practice questions for places the teacher never goes.
- 24:4248 of 48. 98 decisions, zero rejected.
- 24:45Exactly the same count as the teacher.
- 24:47Not one wasted move.
- 24:49So it can farm, but I've been handing it everything.
- 24:51Tools, seeds, a chest, a hole I dug for it.
- 24:54For the finale, it starts with nothing,
- 24:56so it has to learn where those things actually come from.
- 24:58So here's the shopping list.
- 25:00Four logs make sixteen planks, four planks for a crafting table,
- 25:03two for sticks, two for planks, and two sticks for a hoe, eight for a chest.
- 25:08That's sixteen exactly. Nothing spare.
- 25:10Plus twenty -four seeds, which come from punching grass. Five lessons.
- 25:17Lesson ten. Wood.
- 25:18Untrained, it breaks a log. Good.
- 25:20The log drops on the ground and it never even picks it up.
- 25:23It chooses mine that block again on the spot where the log was, which is now air.
- 25:28Three more times. It is punching the memory of a tree.
- 25:31Breaking something and owning it are two separate decisions. It had only made one.
- 25:35This head learned from one demo.
- 25:37Eight examples, two seconds of training, mine,
- 25:39collect, mine, collect, four logs, two out of two.
- 25:44This brings us to lesson eleven. Seeds.
- 25:46And this is real Minecraft randomness, because when you break grass,
- 25:49there's only a small chance it drops a seed. Most drop nothing.
- 25:52The teacher needed a hundred and thirty -nine grass
- 25:54plants to get twenty -four seeds.
- 25:56Frozen check.
- 25:57It starts well, it clears the grass around it, thirteen seeds, and then it stops.
- 26:01There are two hundred and eighty grass plants still
- 26:03standing, it's just not going to them.
- 26:05It keeps choosing the bare ground right next to it where the grass used to be.
- 26:09Four hundred and three rejected choices in a row. Here's the cause.
- 26:13In the teacher's demo, the closest option was almost always real grass.
- 26:16So this is close, and this is grass looked like the exact same thing.
- 26:20Every single time.
- 26:21And when two clues always agree, the brain learns whichever is easier.
- 26:24It learned close. It took a shortcut, and the shortcut worked
- 26:28right up until everything close was gone,
- 26:30and it was standing in a bald patch that the teacher had never stood in itself.
- 26:33The fix. Worksheets with nearby grass deleted, and a new penalty in training
- 26:37for any time bare ground scores higher than real grass.
- 26:40I refilmed just the retest, so this chapter has two recordings,
- 26:44and I put the failed run back in there so you could see it.
- 26:46Frozen check, it clears a patch, and it leaves.
- 26:49Two hundred and twenty -five grass, twenty -four seeds, with zero rejected.
- 26:53It passed.
- 26:56Lesson twelve. Crafting.
- 26:58I hand it four logs.
- 26:59Untrained, it crafts planks.
- 27:01All four logs into sixteen planks. Correct.
- 27:03Then it picks craft planks again, with no logs. Four times.
- 27:07It found something that worked, and it had no concept of done.
- 27:11After training, it gave us planks, sticks, the table, placed it,
- 27:15ten planks left over, which is exactly what the hoe and chest will need.
- 27:18The brain picks which recipe to make, and where to put the table.
- 27:21Dragging items into the right slots is the script. It's a fly.
- 27:24I'm not teaching it to use a mouse.
- 27:28Lesson thirteen. The hoe and the chest. Untrained, it waits.
- 27:32We've come full circle.
- 27:33Trained, open the table, hoe, chest, close, place the chest. Five decisions.
- 27:39One detail though. On the hidden exam, this one only scored eighty percent,
- 27:43and then it passed both live runs perfectly.
- 27:45Back in lesson eight, eighty -eight percent died in one second.
- 27:48So that's what these exam scores really are.
- 27:51They're a smoke alarm, but they're not a verdict.
- 27:52They can warn you, they can't tell you that it actually works.
- 27:56The only test that counts is the frozen one, in the side of the game.
- 28:02Lesson fourteen. Until now, I've always dug the waterhole for it. Not anymore.
- 28:06Here's a patch of ground, part soil, part stone, pick a spot, dig,
- 28:09fill it, and build twenty -four plots that are all in reach of the water.
- 28:13Untrained, in one point six seconds it chose place
- 28:16water twelve times, which, you know, there is no hole.
- 28:19The game's message, word for word,
- 28:21fill requires a supported contained hole and a filled bucket.
- 28:24It had half of those things. Trained, dig, water, then twenty -four plots,
- 28:28working outward, never past the water's reach, twice. That's everything.
- 28:32Wood, seeds, table, tools, site, farm, and upkeep.
- 28:36Fourteen lessons, each passed on their own,
- 28:39and each passed in its own tidy arena with a reset before every attempt.
- 28:42Now it has to do all of it, in a row, in one world, with no resets.
- 28:49A courtyard, two trees, a few hundred
- 28:52grass plants, a cottage, which is decoration,
- 28:55the fly gets one item, a bucket of water,
- 28:57because I could not be asked to teach it smelting, I was already suffering.
- 29:01From that, four logs, twenty -four seeds, table,
- 29:04hoe, chest, dig a hole, fill it, twenty -four plots.
- 29:08Wait for the wheat to grow, harvest and replant every plot,
- 29:11and get twenty -four wheat into the chest.
- 29:13Learning is switched off for the entire run.
- 29:15Last asterisk, and it's an important one.
- 29:18The brain cannot choose the order of the stages. I do.
- 29:21A few lines of code say you're on wood until you have four logs.
- 29:24Now you're on seeds. Each stage hands over to the head that learned it.
- 29:28Inside each stage, every single decision is the fly's,
- 29:31but the plan to build a farm is mine.
- 29:33Fly's don't have five -year plans.
- 29:35It took five attempts, and every failure broke somewhere new. Attempt one.
- 29:39Wood was fine, seeds were fine, and then it
- 29:41tries to place a crafting table it hasn't made yet. Twelve times.
- 29:45In the crafting lesson, the spot for the table was always a few steps away.
- 29:48Here in the courtyard, however, it was much further.
- 29:50Further than any distance this brain had ever been shown.
- 29:53And when you hand a system like this a number outside of everything
- 29:55it's trained on, its output isn't slightly off. It's meaningless.
- 29:59It knew crafting, but it didn't know crafting from far away. Attempt two.
- 30:03Dead in thirty -two seconds.
- 30:04It broke the fourth log, grabbed for it while it was still
- 30:06falling through the air, missed, and the controls locked up.
- 30:09That was my script.
- 30:11I made it wait for items to land. Attempt number three.
- 30:14It crafts a table, places it, then crafts a second table, which costs four planks,
- 30:18sixteen planks, nothing spare, and now it can't afford the chest.
- 30:22It had never learned that a table you've already got is a table you don't need.
- 30:25It had to pass 256 simulated crafting
- 30:27runs before I let it back inside the game again. Attempt four. This one hurt.
- 30:32Wood, seeds, one table, hoe, chest, digs the hole,
- 30:36fills it, twenty -four perfect plots, eight minutes,
- 30:39zero mistakes, everything that had ever gone wrong was fixed,
- 30:43and then it walks over to the chest and tries to store wheat.
- 30:46It planted that wheat ten seconds ago, rejected, twelve times, and it was over.
- 30:50It's the empty chest from lesson eight, back from the dead. And it makes sense.
- 30:54In lesson eight, the field it learned on was
- 30:56full of ripe wheat from the first second.
- 30:57It had never in its life seen a field where
- 30:59everything was young and there was nothing to do.
- 31:01The right answer was the one job it basically had never been shown. To wait.
- 31:05And I hadn't tested that either. I tested every skill.
- 31:08I hadn't tested the gaps in between them. And that one's on me.
- 31:11So worksheets for the whole life on a farm. Just planted. Wait.
- 31:15Something's ripe. Harvest. Pockets empty. Do not go to the chest.
- 31:18Sixty -four simulated farm cycles later, I let it back in.
- 31:22And that brings us to attempt number five. Frozen. Wood.
- 31:25One, two, three, and the fourth log, the one that killed attempt number two.
- 31:29It waits for it to land. Seeds. And the game was stingy.
- 31:33Six seeds from the first eighty -eight grass.
- 31:35Nine and a half minutes to find twenty -four. I've sped it up.
- 31:38I had to watch it at normal speed at one in the morning. But look at the map.
- 31:41It clears a patch and it moves on. Every single time.
- 31:44Crafting, where attempts one and three died.
- 31:46Planks, sticks, table.
- 31:48The long walk across the courtyard and it places it. One table. Just the one. Hoe.
- 31:53Chest. Sixteen planks in. Zero left. Dig. Water.
- 31:57Twenty -four plots.
- 31:59And now it's standing in front of a field of seedlings.
- 32:01Next to a chest with nothing to do.
- 32:03Exactly where attempt number four ended.
- 32:06It chooses wait.
- 32:08Wait.
- 32:09Wait.
- 32:10Wait.
- 32:11Twenty seconds of a fly brain doing nothing.
- 32:14And it's the best thing that it did all week. First one's ripe. Harvest. Pickup.
- 32:19Replant.
- 32:20Now the chest with wheat. Ten. Twenty. Twenty -four. And then it was done.
- 32:25Eighteen and a half minutes.
- 32:27Three hundred and eighty -seven decisions. Rejected. Zero. Damaged. Zero.
- 32:32And every number in its brain identical to when it started.
- 32:35It didn't learn anything during the run. It already knew.
- 32:38It started with a bucket.
- 32:40So can you teach a fly to play Minecraft?
- 32:42What's real? The wiring.
- 32:43One thousand five hundred and thirty -six neurons and forty
- 32:46-two thousand nine hundred and twenty -one connections from a real
- 32:49fly's sense of smell never rewired with all three
- 32:52hundred and eighty -seven of those decisions passing through it.
- 32:54What isn't the fly was walking and clicking as I've told you.
- 32:57The facts from the mod, the translator, and the reader on either end.
- 33:01The order of stages, the way it learns,
- 33:02and it's one percent of a brain with cartoon neurons.
- 33:05It took five attempts, and one success doesn't tell you how reliable it is.
- 33:09I also never tested whether a random tangle of wiring the same size would
- 33:12have done just as well, but that's another video and a different week.
- 33:15I have got to go to bed.
- 33:17But here's what I got out of it.
- 33:19Every time it failed, it failed the same way.
- 33:21The last thing that worked with full confidence, where it made no sense.
- 33:24Planting on dirt, punching air, a second table, an empty chest, twice.
- 33:29And the fix was never making it smarter.
- 33:31It was showing the situation that it had never seen.
- 33:33The bald patch, the second table, the field with nothing to do.
- 33:36It never needed to be cleverer.
- 33:38It needed to have been there before.
- 33:40I think that's true of more than fly's.
- 33:42Anyway, it's a fly, it has a farm, and I'm going to bed.
- 33:45If you thought this video was good at all, liking or subscribing would
- 33:49genuinely help me a lot, and I'm praying that this video doesn't flop.
- 33:53Bye, guys.
About this transcript
This page contains the full transcript of I Put a Fly’s Brain in Minecraft. It Learned to Farm. by SWOT, generated from the public captions YouTube serves with the video. The transcript has 6,916 words across 717 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.