The Best Minecraft AI in the World (For 4 Months)
How I built a rule-based Minecraft agent that became the first AI to autonomously enter the Nether, 131 days before GPT-6 Astra.
Introduction
If you look at a chart documenting the best Minecraft AI in the world, you will see that LLMs and modern machine learning techniques have dominated the state of the art for the past few years. However, what those charts miss is that I briefly held the most capable Minecraft AI in the world, in terms of progress through the game, before GPT-6 Astra. My agent was the first non-human player to enter the Nether on a random seed of Minecraft, without using any information other than the screen itself, achieving this feat 131 days before GPT-6 Astra reached the Nether too.
Despite being the only entry on the list that isn’t primarily machine-learning-based, my agent was the first to enter the Nether.
Using an LLM to play Minecraft has been attempted since as early as 2023, with nearly all of the subsequent approaches using LLMs to control the game. However, my Minecraft AI doesn’t use modern machine learning techniques at all, yet was still the first agent to have ever autonomously entered the Nether.
LLMs have been shown to be able to solve long-standing mathematical problems independently, hack websites, and beat benchmarks designed to be impossible. You could easily argue that modern LLMs are the most knowledgeable and intelligent entities in the world. Strangely, though, as of April 2026, all of that was easier than beating Minecraft.
Why Minecraft is hard for AI
Minecraft is a deceptively hard task for AI. Players are nearly constantly faced with situations that require sub-second reaction times in order to survive when playing in real time. LLMs really struggle to reason quickly enough to control the player without dying. This means that even though models can come to the right conclusion of what to do, they’ve often already died in the game by the time they reach that conclusion. This is partly why, up until September of 2026, LLMs had made little progress on Minecraft.
So that inspired me to take on the top AI labs myself. Labs including OpenAI, DeepMind and NVIDIA have all made attempts to play Minecraft with AI, with the best so far, Optimus-3 [archive], making it as far as getting diamonds 15% of the time. I knew that the rate of progress with LLMs meant that I likely only had weeks to months to claim the top spot, so I began development and raced to autonomously enter the Nether before the first LLM did.
The constraints
Existing Minecraft bots like Baritone can already play the game well, but Baritone injects code into the game to know everything about the world, similar to a player using a hacked client to see through walls. I didn’t allow myself to use mods or code injection to learn about the world, to keep on a level playing field. I gave myself the same information that a human gets, which is simply the pixels on the screen.
How can I win?
I needed a good plan before starting to code this project, as there’s clearly a reason that no one has managed to enter the Nether autonomously before. The reason for Minecraft’s difficulty is what makes it an interesting problem to begin with: its open-endedness. Every Minecraft world is procedurally generated, making each game completely different. There are many ways to accomplish the same goal, meaning that to play the game well, you have to know how to best utilise the resources around you.
For example, just zooming into the task of entering the Nether, the tree of progress in Minecraft looks like this:
- Needs all of these
- Needs any one of these
This suggests that a capable autonomous Minecraft agent would need to be able to understand and implement all of these paths, which is an incredibly complicated task. So how can we simplify the problem to make it tractable? To do this, I turned to the community of people who know the most about beating the game: speedrunners. The speedrunning community has put thousands of hours into developing techniques which make beating the game easier, many of which might be helpful to an agent as well.
For example, every speedrunner plays on the same version of the game, 1.16.1, due to it having many oversights which make beating the game significantly easier. I found this to be by far the easiest version for my agent as well.
When looking at the fastest Minecraft speedruns at the time of writing, we notice something interesting:
0:00 → 1:11 (1:11)
Spawn to Nether
1:11 → 3:15 (2:04)
Nether to fortress
3:15 → 4:18 (1:03)
Fortress to leaving the Nether
4:18 → 5:34 (1:16)
Leaving the Nether to stronghold
5:34 → 5:51 (0:17)
Stronghold to the End
5:51 → 6:39 (0:48)
The End to killing the dragon
0:00 → 1:39 (1:39)
Spawn to Nether
1:39 → 4:00 (2:21)
Nether to fortress
4:00 → 4:44 (0:44)
Fortress to leaving the Nether
4:44 → 5:42 (0:58)
Leaving the Nether to stronghold
5:42 → 5:56 (0:14)
Stronghold to the End
5:56 → 6:50 (0:54)
The End to killing the dragon
0:00 → 1:08 (1:08)
Spawn to Nether
1:08 → 3:39 (2:31)
Nether to fortress
3:39 → 4:59 (1:20)
Fortress to leaving the Nether
4:59 → 5:51 (0:52)
Leaving the Nether to stronghold
5:51 → 6:04 (0:13)
Stronghold to the End
6:04 → 6:56 (0:52)
The End to killing the dragon
0:00 → 1:18 (1:18)
Spawn to Nether
1:18 → 3:32 (2:14)
Nether to fortress
3:32 → 4:26 (0:54)
Fortress to leaving the Nether
4:26 → 5:22 (0:56)
Leaving the Nether to stronghold
5:22 → 5:44 (0:22)
Stronghold to the End
5:44 → 7:01 (1:17)
The End to killing the dragon
0:00 → 1:27 (1:27)
Spawn to Nether
1:27 → 3:51 (2:24)
Nether to fortress
3:51 → 5:01 (1:10)
Fortress to leaving the Nether
5:01 → 5:47 (0:46)
Leaving the Nether to stronghold
5:47 → 6:19 (0:32)
Stronghold to the End
6:19 → 7:05 (0:46)
The End to killing the dragon
0:00 → 1:29 (1:29)
Spawn to Nether
1:29 → 3:25 (1:56)
Nether to fortress
3:25 → 4:41 (1:16)
Fortress to leaving the Nether
4:41 → 6:03 (1:22)
Leaving the Nether to stronghold
6:03 → 6:20 (0:17)
Stronghold to the End
6:20 → 7:08 (0:48)
The End to killing the dragon
0:00 → 1:07 (1:07)
Spawn to Nether
1:07 → 3:40 (2:33)
Nether to fortress
3:40 → 5:16 (1:36)
Fortress to leaving the Nether
5:16 → 5:52 (0:36)
Leaving the Nether to stronghold
5:52 → 6:22 (0:30)
Stronghold to the End
6:22 → 7:09 (0:47)
The End to killing the dragon
0:00 → 1:31 (1:31)
Spawn to Nether
1:31 → 3:56 (2:25)
Nether to fortress
3:56 → 4:46 (0:50)
Fortress to leaving the Nether
4:46 → 5:51 (1:05)
Leaving the Nether to stronghold
5:51 → 6:20 (0:29)
Stronghold to the End
6:20 → 7:11 (0:51)
The End to killing the dragon
0:00 → 1:22 (1:22)
Spawn to Nether
1:22 → 4:06 (2:44)
Nether to fortress
4:06 → 4:55 (0:49)
Fortress to leaving the Nether
4:55 → 6:01 (1:06)
Leaving the Nether to stronghold
6:01 → 6:27 (0:26)
Stronghold to the End
6:27 → 7:11 (0:44)
The End to killing the dragon
0:00 → 1:08 (1:08)
Spawn to Nether
1:08 → 4:11 (3:03)
Nether to fortress
4:11 → 5:36 (1:25)
Fortress to leaving the Nether
5:36 → 6:17 (0:41)
Leaving the Nether to stronghold
6:17 → 6:23 (0:06)
Stronghold to the End
6:23 → 7:11 (0:48)
The End to killing the dragon
- Overworld
- Bastion
- Fortress
- Eyes
- Stronghold
- End
The fastest Minecraft speedruns, at the time of writing, split by stage of the run.
Ten separate runs look almost identical to one another. Every run in the top 10 uses a bastion to get ender pearls rather than villager trading, killing endermen, or bartering without a bastion. Every run visits the bastion before the fortress. Every run except drip120’s uses a technique called a ‘zero cycle’ to kill the dragon in about 50 seconds. When we break the runs down further, we see similar results:
0:00 → 0:18 (18s)
Digging up and looting the buried treasure
0:18 → 0:41 (23s)
Logs (often via TNT), tools and a boat
0:41 → 0:55 (14s)
Sailing to a magma ravine
0:55 → 1:11 (16s)
Building and lighting the portal
0:00 → 0:18 (18s)
Digging up and looting the buried treasure
0:18 → 0:46 (28s)
Logs (often via TNT), tools and a boat
0:46 → 1:20 (34s)
Sailing to a magma ravine
1:20 → 1:39 (19s)
Building and lighting the portal
0:00 → 0:16 (16s)
Digging up and looting the buried treasure
0:16 → 0:40 (24s)
Logs (often via TNT), tools and a boat
0:40 → 0:51 (11s)
Sailing to a magma ravine
0:51 → 1:08 (17s)
Building and lighting the portal
0:00 → 0:21 (21s)
Digging up and looting the buried treasure
0:21 → 0:46 (25s)
Logs (often via TNT), tools and a boat
0:46 → 1:03 (17s)
Sailing to a magma ravine
1:03 → 1:18 (15s)
Building and lighting the portal
0:00 → 0:18 (18s)
Looting a shipwreck's chests
0:18 → 0:55 (37s)
Logs (often via TNT), tools and a boat
0:55 → 1:12 (17s)
Sailing to a magma ravine
1:12 → 1:27 (15s)
Building and lighting the portal
0:00 → 0:19 (19s)
Digging up and looting the buried treasure
0:19 → 0:49 (30s)
Logs (often via TNT), tools and a boat
0:49 → 1:10 (21s)
Sailing to a magma ravine
1:10 → 1:29 (19s)
Building and lighting the portal
0:00 → 0:10 (10s)
Digging up and looting the buried treasure
0:10 → 0:30 (20s)
Logs (often via TNT), tools and a boat
0:30 → 0:52 (22s)
Sailing to a magma ravine
0:52 → 1:07 (15s)
Building and lighting the portal
0:00 → 0:22 (22s)
Digging up and looting the buried treasure
0:22 → 0:53 (31s)
Logs (often via TNT), tools and a boat
0:53 → 1:11 (18s)
Sailing to a magma ravine
1:11 → 1:31 (20s)
Building and lighting the portal
0:00 → 0:19 (19s)
Digging up and looting the buried treasure
0:19 → 0:45 (26s)
Logs (often via TNT), tools and a boat
0:45 → 0:55 (10s)
Sailing to a magma ravine
0:55 → 1:22 (27s)
Building and lighting the portal
0:00 → 0:31 (31s)
Digging up and looting the buried treasure
0:31 → 0:53 (22s)
Logs (often via TNT), tools and a boat
0:53 → 1:08 (15s)
Building and lighting the portal
- Buried treasure
- Shipwreck
- Wood & tools
- Boating
- Portal
The Overworld split of the same runs, broken into tasks, showing that nearly all of them use the same strategy to enter the Nether.
Minecraft 1.16.1 is a game with 79 biomes, 18 structures, and unique worlds. However, every run in the top 10 is nearly identical. All of them spawn on an island in an ocean. All but one find a buried treasure to get their iron. All of them mine trees on the island to get wood and craft tools. Every run except Aquacorde’s 10th-place time then boats into the ocean to find a magma ravine; Aquacorde instead gets a ruined portal on their spawn island.
This is vastly different to how the leaderboard looked back around when OpenAI and NVIDIA likely started making VPT and Voyager, near the start of 2022.
0:00 → 0:35 (35s)
Looting chests, hay and iron golems
0:35 → 1:08 (33s)
Logs, tools and a boat
1:08 → 1:55 (47s)
Looting chests, hay and iron golems
1:55 → 2:52 (57s)
Building and lighting the portal
0:00 → 0:46 (46s)
Logs, tools and a boat
0:46 → 1:04 (18s)
Sailing to a shipwreck or ravine
1:04 → 1:19 (15s)
Looting a shipwreck's chests
1:19 → 1:29 (10s)
Logs, tools and a boat
1:29 → 1:49 (20s)
Sailing to a shipwreck or ravine
1:49 → 2:11 (22s)
Building and lighting the portal
0:00 → 0:17 (17s)
Logs, tools and a boat
0:17 → 0:40 (23s)
Digging up and looting the buried treasure
0:40 → 1:07 (27s)
Logs, tools and a boat
1:07 → 1:48 (41s)
Sailing to a shipwreck or ravine
1:48 → 2:12 (24s)
Building and lighting the portal
0:00 → 0:43 (43s)
Digging up and looting the buried treasure
0:43 → 1:40 (57s)
Logs, tools and a boat
1:40 → 2:17 (37s)
Building and lighting the portal
0:00 → 0:44 (44s)
Looting a shipwreck's chests
0:44 → 1:36 (52s)
Logs, tools and a boat
1:36 → 2:03 (27s)
Sailing to a shipwreck or ravine
2:03 → 2:30 (27s)
Building and lighting the portal
0:00 → 0:49 (49s)
Digging up and looting the buried treasure
0:49 → 1:28 (39s)
Logs, tools and a boat
1:28 → 1:46 (18s)
Sailing to a shipwreck or ravine
1:46 → 2:11 (25s)
Building and lighting the portal
0:00 → 0:48 (48s)
Digging up and looting the buried treasure
0:48 → 1:36 (48s)
Logs, tools and a boat
1:36 → 1:52 (16s)
Sailing to a shipwreck or ravine
1:52 → 2:19 (27s)
Building and lighting the portal
0:00 → 0:12 (12s)
Logs, tools and a boat
0:12 → 0:28 (16s)
Digging up and looting the buried treasure
0:28 → 0:53 (25s)
Logs, tools and a boat
0:53 → 1:45 (52s)
Sailing to a shipwreck or ravine
1:45 → 2:18 (33s)
Building and lighting the portal
0:00 → 0:26 (26s)
Looting chests, hay and iron golems
0:26 → 0:56 (30s)
Logs, tools and a boat
0:56 → 2:04 (68s)
Looting chests, hay and iron golems
2:04 → 2:42 (38s)
Building and lighting the portal
0:00 → 0:28 (28s)
Looting chests, hay and iron golems
0:28 → 0:57 (29s)
Logs, tools and a boat
0:57 → 1:32 (35s)
Looting chests, hay and iron golems
1:32 → 1:50 (18s)
Logs, tools and a boat
1:50 → 2:33 (43s)
Building and lighting the portal
- Village
- Buried treasure
- Shipwreck
- Wood & tools
- Boating
- Portal
The Overworld splits of the fastest 10 runs at the start of 2022, using many different strategies to enter the Nether.
It’s clear that the community had not yet settled on the optimal way to enter the Nether, leading to a massive variation in techniques even amongst the fastest 10 runs at the time. This is the edge that I have over the previous attempts at this problem: I can utilise the mostly solved meta of Minecraft speedrunning to massively simplify the game. My agent doesn’t need to decide between a village, a shipwreck, or a cave; I can simply code one path which is known to work: using a buried treasure and a magma ravine.
Sight
The first problem to solve is sight, as we need to understand the world around us in order to do anything else. This problem boils down to being able to know what blocks are around us and where they are. If we knew every block in the world like Baritone does for free, it would be much easier to navigate around.
I tried many approaches in development, such as edge detection and depth estimation. However, I found that matching edges and depth to the world was too imprecise for the sorts of movements that you need in the game. Without being 100% confident in the terrain around us, we cannot accurately move around.
Edge detection and depth estimation proved to be too noisy to give accurate world readings.
Eventually, I realised that to move around with any level of confidence, we need much, much higher accuracy. Minecraft needs us to avoid cliffs and jump over gaps; any mistake when reading the world could be fatal, so I needed a better approach.
I then realised the answer might have been staring me in the face the entire time: the same trick I planned to use for knowing our position in the world, the F3 menu, might be able to tell us the blocks as well. The F3 menu shows you a lot of information about the game, such as where you are in the world, your FPS, and the game version.
The Minecraft debug menu (or F3 screen) is typically used by players to share their coordinates in the world, but contains a lot more rich information about the internals of the game.
Crucially, the F3 menu also tells you the block that you are looking at up to a distance of 20 blocks. This gives us an exact coordinate of a block in the world which we can be 100% confident in.
We also learn more about the world than it seems from this one block of information, as not only do we know that block exists, but we also know that there are no blocks in the ray between our camera and the targeted block, as otherwise we would have targeted the closer block instead. This means with just a quick turn of our head, we can infer lots of information about the world.
Reading F3
This plan relies on us being able to read F3 efficiently so that we can adapt in real time. Luckily, Minecraft’s F3 screen is particularly easy to read. Most fonts render with anti-aliasing, which allows them to look smooth by having sub-pixel widths, using partial transparency at the edges to render smoother text.
Anti-aliased text is much harder to read programmatically.
Minecraft’s pixelated design made them choose a font without anti-aliasing, which means every character drawn will always look the same, regardless of where it is on the screen. All of the text also has no transparency, meaning we only need to check for pixels with the exact text colour to read the text.
To efficiently extract text, we encode each character as a list of numbers. Each character is exactly 8 pixels tall, so each column of a character can be represented by an 8-bit number, and each character by a list of 8-bit numbers.
An encoding of the character ‘X’ by turning each column into an 8-bit number.
Despite no anti-aliasing and no transparency making the problem easier, Minecraft’s font isn’t monospace, meaning that each character can occupy a variable number of columns. This means when reading the text, we have to make sure we don’t greedily match a short character when it actually forms part of a longer character.
To solve this problem, we scan for the widest characters first, slowly shrinking our search until we find an exact match for a character. As we know where the F3 text is on the screen, we can extract all the text that is important to us using this technique.
Altogether, this approach takes under a millisecond to read the entire F3 menu, which is more than fast enough for us to act on in real time.
A visual representation of the F3 reader.
However, the F3 screen alone didn’t provide enough information for the agent to reach the Nether. Firstly, it’s inefficient to scan every nearby block to find structures such as trees, and secondly, it can’t spot things more than 20 blocks away. I needed to develop a few more ways of inferring information about the world.
Colour matching
The first technique is to use a screenshot of the game and analyse it for certain desired colours. For example, the first task in Minecraft is often to find trees. When looking straight, we expect the bark of trees to be roughly rectangular sections of the screen, matching the colour of one of the common wood types. However, when looking for areas consistent with the bark colours, we often get results like this:
The shadows and lighting cause dirt to match oak trees, and the lighting causes enough variation for us to miss trees entirely. To fix this, we apply a filter to find the chromaticity of each pixel. The chromaticity of a pixel normalises intensity / lighting differences by calculating the ratio between the red, green, and blue channels rather than their absolute values.
This process is known as RGB normalisation, or RG chromaticity, and converts our original image into a much less noisy source.
You can see the birch tree looks the same colour now on both the light and the dark side. When we match exactly against the chromaticity we expect, we get much more accurate tree detection.
Grid projection
The second technique helps when we want to check whether certain blocks exist. For example, when trying to find a magma ravine in an ocean, we are looking for magma and obsidian blocks at a known height in the world. However, the blocks would be too far away to see with the F3 targeted block, and their distance and distortion from the water make the colour matching approach ineffective.
Magma ravines are crucial for entering the Nether as they have lava underneath them. However, they need to be spotted from far away.
To solve this problem, we can leverage our knowledge of how the Minecraft camera works. We know our exact position, angle, and camera settings from the F3 screen, and we know how the Minecraft camera converts those into a 2D screen. This allows us to invert the question we’re asking: rather than trying to find edges ourselves, we can figure out where we’d expect edges to be for blocks at a certain height. Then, using that grid, we can check if those regions look like magma.
By projecting where a plane of blocks at Y=11 would land on our screen based on our knowledge of the Minecraft camera and our settings, we can make the task of identifying magma significantly easier.
Simple labelling techniques such as checking the average colour of each block work well when we know exactly where we expect the outlines of blocks to be.
Detecting menus
Each menu in Minecraft looks the same every time it is interacted with, so we can constantly scan the screen for certain pixels to see if we are inside a GUI, and which type of GUI we are interacting with.
Luckily, the player inventory, chests, and the crafting GUI all share a pixel in the same place with the same colour, so we can very efficiently determine when we aren’t in a GUI, as this pixel won’t be grey. Once we’ve detected this GUI pixel, we do some slower checks to differentiate which GUI we have opened.
Every GUI has a pixel of the same colour at exactly the same position on each panel.
The crafting GUI in Minecraft and the unique region we use as a fingerprint to detect it, once we have checked for the GUI pixel.
We use the same technique of deterministic checks against known Minecraft UI to detect our health, hunger, and whether the ‘You Died!’ screen is showing.
Reading our items
Reading items in the inventory works similarly to the F3 text reader. We already have the groundwork in place to detect which GUI, if any, is rendered on the screen. This means we know where the items in the GUI should be on the screen. We can compare each slot to a list of known Minecraft textures and find the closest match.
When reading items, the red highlighted region is ignored as it can be occluded by stack counts or durability bars.
Then, the stack count of the item can be read in the same way we read F3, allowing the agent to know exactly what items are in its inventory.
Controlling the player
Next, we need a system to control the player which aligns with the rule set. Initially, I tried to use a library to move the mouse and press keys on my computer. The first problem I faced with this approach was that the amount your player moved depended on the frame timing of the mouse movement, making it very difficult to accurately control the player. Secondly, this actually takes control of the mouse, which makes the development cycle much more annoying.
I needed a way to control Minecraft precisely whilst not breaking my rule against using mods to gain information about the internals of the game. I settled on a compromise: a small mod adding an API to send keyboard and mouse inputs to the game. I made the response from the API give no useful information about the state of the game, giving me a way to send deterministic instructions to the game without breaking the rules. I’m still only using the screen to inform decisions, but I have precise control over the player.
POST /control
{
"inputs": [
{ "forward": 1.0, "sprint": false, "jump": false, "yaw": 90.0, "pitch": 52.0 }
]
}
An example API call to send one tick of input to Minecraft.
Minecraft’s physics run at a fixed 20 ticks per second, meaning each API call can correspond to exactly one tick of input. Even though your player movement is interpolated on the screen, making movement look smooth at higher frame rates, your direction can only change at the beginning of the next tick. Therefore, the agent only needs to send 20 inputs per second to get precise control of the character. To make the recordings of the agent less choppy, I interpolated the angles between each tick.
Controlling GUIs
Now that we have a mechanism for controlling the player, the last thing we need is a way to control the GUIs in the game. Crafting, settings changes, and moving items in our inventory all use different menu screens, and our agent needs an interface to interact with them.
Luckily, the GUIs in Minecraft are relatively simple, and will always look the same on the screen for a given window size and GUI scale setting. This means that we can give higher-level instructions from the agent such as “move the 1st item in my inventory to the centre slot of the crafting table”, and just need a small translation layer to turn that into screen coordinates and mouse clicks.
POST /inventory/move
{ "sourceSlot": "hotbar.0", "destSlot": "craft.4" }
An example API call to move the first item in the hotbar to the centre slot of a crafting table.
This translation layer added abstraction which made it very easy to do complex UI actions, such as multiple settings changes, without complex code.
await self.run_action(ChangeSettings(self.ctx, {"renderDistance": "12", "gamma": "0.0"}))
POST /menu/open {} # pause menu
POST /menu/click { "button": "options" }
POST /menu/click { "button": "video_settings" }
POST /menu/slider { "widget": "render_distance", "value": 12.0 }
POST /menu/slider { "widget": "gamma", "value": 0.0 }
POST /menu/close {} # back to options
POST /menu/close {} # back to pause menu
POST /menu/close {} # back to game
The code to run a single settings change, with the API calls made underneath.
Navigation
The most important part of the agent’s code is the navigation. Most of its time will be spent traversing from A to B, and being able to do so consistently without getting stuck is very difficult.
A naïve approach
In a simpler problem, like a maze, a reasonable strategy is to use the state of the squares around you to inform each move. The same section of code controlling decisions can run at every step, and will usually not be that complex. In this example, the following simple strategy would solve the maze:
- If there’s no wall to your right, turn right and step forward.
- Otherwise, if there’s no wall in front of you, step forward.
- Otherwise, if there’s no wall to your left, turn left and step forward.
- Otherwise, turn around.
However, with Minecraft’s complex terrain and movement system, an approach like this would spiral into thousands of rules.
- If there’s a block in front of your feet and the two blocks above it are air, jump.
- If you’re standing on soul sand, your feet are inside the block you’re standing on, so don’t mistake it for a wall.
- If you’re swimming up from deep water, keep sprinting until you stop rising, or you’ll drop out of swimming and overshoot the surface.
- If you’ve been walking out of a Nether portal for 2 seconds without escaping, assume that side is blocked and walk out the other side, unless you’re mining a block, because that block might be the way out.
The strategy system
To avoid this complexity, we break navigation up into several specialised strategies, each optimised for a different type of terrain. This allows each strategy to be much simpler, as it is only used in specific situations. For example, not every strategy needs to know how to mine through a wall; we simply add detection for when mining is needed, and a specialised mining strategy to handle the mining itself.
Careful walk
The most important strategy is our careful walk. The careful walk simply looks at our target coordinate, picks one axis at a time, and walks along that axis in a straight line for as long as it can. By only walking along one axis at a time, we remove a lot of the complexity of navigating Minecraft. We don’t have to handle edge cases such as straddling two blocks, which could cause our movement to be blocked by something we weren’t looking at directly, so we might not know it exists.
The agent only learns of blocks it looks directly at, so it isn’t aware of the tree. As our hitbox is over the edge of the block, we can’t move forwards, and the agent won’t know why.
When we’re walking along an axis in the centre of a block, we only have to care about the terrain going up or down, which simplifies routing in Minecraft to a two-dimensional problem.
To do this, the first step of the walking strategy is to centre on a block. We make small adjustments by tapping movement keys until our hitbox is entirely contained within a block. Then we look in the direction we want to travel and aim a couple of blocks in front of us. This lets us see changes in terrain slightly before we reach them. If the ground is flat, we can simply hold forwards and make progress. The careful walk strategy will also jump when there is a one-block incline. Otherwise, it transitions to another strategy.
The careful walk strategy. The blocks in yellow indicate what is checked in each decision. Walking and jumping are handled within the strategy, but the other cases transition to a specialised strategy to handle the difficult terrain.
The careful walk strategy in game, handling a jump without transitioning to another strategy.
Descent
The descent strategy is used to handle any drops in terrain. Falling is the biggest risk to the agent as it plays. Minecraft terrain can have cliffs and ravines which instantly kill a player who falls in. To minimise the amount of damage we take from falling, the descent strategy carefully descends one block at a time. As steep drops are usually not entirely vertical, this means we should only fall for a few blocks at a time.
To make progress, the descent strategy uses the crouching mechanic in the game, which prevents you from falling off an edge. We walk in the direction of the drop and look downwards. When we reach the edge of the block, we’ll know how far of a drop it is. If the fall is not deadly, we will uncrouch and walk off the edge slowly. Otherwise, if we also have blocks, we bridge across instead.
Mine
The mining strategy is used whenever the agent has no clear path forwards. As every block is breakable, we can get out of this situation by simply tunnelling to our destination. The agent will default to staircasing upwards, as this is the most likely way to become unblocked by reaching the surface.
The mining strategy also makes use of the inventory reader, and will swap to the most effective tool for the block we’re trying to mine.
Water
One of the most complicated strategies is the water strategy. This is used whenever we detect that we are inside a block of water. In deep water, we can swim directly towards the goal, which involves sinking until we’re allowed to enter the swimming mode, and then holding sprint and aiming towards our goal. However, in water only one block deep, we can’t sink far enough to enter the swimming state, so instead we bob at the top of the water while sprinting to move quickly.
The water strategy has many edge cases when leaving the water. Usually, we can run straight out, but when we are blocked, we might have to mine blocks in front of us to get out. To do this, we have to bob at the top of the water without moving, while keeping our aim directly on the block. This is particularly useful for escaping water pools. This is one example of the many complex states that the agent has to account for in order to consistently travel from A to B. I found no consistent approach which could handle all types of terrain, and instead solved individual problems using different strategies and edge-case handling. Slowly, by adding handling for each edge case which came up and testing, the agent became more and more consistent, and could comfortably make it between two locations.
Putting it all together
Now, by combining all our specialised terrain handling and adding transitions between them, the agent becomes capable of moving around the Overworld in Minecraft. There were many hurdles in getting a reliable navigation system which I won’t explain in full, such as grass occluding the F3 targeted block, the F3 targeted block lagging your looking angle by one tick, and certain F3 elements updating per frame and others per tick. However, every problem and its subsequent fix made the agent slightly more reliable, and after hundreds of small improvements, it can handle wildly varying terrain and usually route from A to B successfully.
Tasks and actions
Similarly to navigation, it would be infeasible to control the entire Nether entry in a single logic block, so we need to divide the code into small chunks, making any shared logic reusable.
To do this, I use ‘tasks’ and ‘actions’. Tasks are the sequential, unchanging parts of each run; they allow for splitting the logic into chunks so our code doesn’t become bloated. The code dealing with building a Nether portal doesn’t need to interact with the code to mine trees. As mentioned before, most speedruns follow the exact same route, so this was used as inspiration for the route the agent uses: a buried treasure followed by a magma ravine.
Actions are the reusable parts of code which tasks use to reduce complexity. For example, many tasks need to navigate from A to B, and many need to mine a block. Therefore, both of these are implemented as actions that each task can call when needed.
1. Scan buried treasure
Buried treasures are single chests with iron, gold, and diamonds buried a few blocks underground in beaches. The traditional way to find them is to use a map from a shipwreck. However, there’s a trick to find them without a map, known as ‘mapless’.
Mapless uses the debug pie chart on the F3 screen. The pie chart shows diagnostic information about the game’s processing, and you can navigate to different pages to see different data. To find chests through walls, a page is used that measures the amount of time the game spent rendering block entities. Even if a chest is not visible on screen, it is often rendered anyway behind the occluding blocks. This rendering costs CPU time and can be seen on the pie chart. By spinning in a circle with the pie chart open, you can see a spike in CPU time spent rendering block entities when a chunk containing a chest enters your screen. By checking where the spike happens on both the left and right sides of the chunk, we can accurately estimate which chunk has a chest in it.
Typically, a speedrunner will check the right and left edges of the pie chart spike several times in their approach to the buried treasure, incrementally increasing their confidence in the buried treasure chunk. However, the agent doesn’t need to check multiple times as it can derive exactly which chunks are on screen at each angle, which is too complex for human players. By performing a few checks, we binary search the contending chunks that could contain a chest, aiming at an angle which cuts the number of possible chunks by half.
Mapless becomes much more complex when multiple block entities are within the render distance, making it much harder to identify a buried treasure. Speedrunners are particularly good at noticing the unique signature of a buried treasure and ignoring the noise of other block entities. It would be difficult to encode the full process a human player uses to do this, as they might see part of a structure which is difficult for the agent to detect, like an ocean ruin, which can inform them that a spike in that direction is likely from the ocean ruin. Instead, to reduce false positives, I took the pie chart readings from all of the development runs I did and split them into the successful buried treasure detections and false positives. Then, you can use this data to extract features: how large was the largest spike, what was the sum of all the readings, etc. These features can be used to build and tune a ‘random forest’, which is a set of decision trees. Each node in the tree asks a certain question about a feature, and is optimised to ask questions which filter positive and negative results. This helped me reduce the false positive count by 35%.
Once we have a predicted buried treasure chunk, we navigate to the (9, 9) coordinates within that chunk (slightly south-east of the centre), as buried treasures are always placed at those chunk coordinates.
2. Dig buried treasure
This task is much simpler, and is only responsible for digging the few blocks on top of the buried treasure. The reason this warrants its own task is that buried treasures are often in deep parts of the ocean. A naïve approach would likely lead to the agent drowning, as you can only be underwater for about 15 seconds before you take damage. To avoid this, the agent centres over the buried treasure block whilst above the surface, then quickly swims down and starts mining to minimise drowning time. Buried treasures can be up to 4 blocks underground, so when the agent comes close to drowning, it swims to the surface for air, before swimming down again and continuing to mine.
3. Loot buried treasure
By using the container interactions described earlier, the agent can easily read which items are inside the buried treasure and loot them quickly. If the buried treasure doesn’t have enough resources to make a bucket, a pickaxe, and a flint and steel, we instantly reset, which happens roughly 25% of the time. Then, we return to the last solid ground we touched for the next step.
4. Punch trees
Now that we have iron, we need to get wood. Using the colour matching techniques described earlier, we can identify areas of the screen which are likely trees, so we spin in a circle looking for colours matching oak or birch trees. Then, we look at the largest section of suspected wood and use the targeted block on F3 to confirm or deny whether there is a tree there. If not, we randomly walk 10 blocks away and scan again. If we have found a tree, we navigate to it, and break all the log blocks directly above and below us.
5. Craft tools
Once we’ve mined a tree, we can make our tools. Using the buried treasure loot, we can make an axe, pickaxe, shovel, and bucket. With the inventory manipulation described earlier, this is simple.
6. Get blocks
Blocks are important during the portal build, so we collect a few more trees before going into the ocean. This also gives us the materials to craft a boat and doors, which are essential for ocean travel.
7. Get in boat
Now we need to get into the boat so that we can look for a magma ravine. The problem is that we don’t know which direction the ocean is and it’s difficult to tell the difference between rivers and oceans with colour matching. To solve this, we use the fact that the buried treasure is on the coast. We know that there must be ocean in some direction, so when we look for trees from the coast, we also look for the angle with the most exposed sky. Exposed sky means there is no terrain blocking our view, and is more consistent than trying to look for colours matching the ocean. The ocean colours vary greatly between different ocean biomes (warm ocean, cold ocean), leading to unpredictable results, whereas the sky is a consistent colour for a given time of day and is much easier to detect.
8. Find magma ravine
To find a magma ravine, we look at the ocean floor whilst boating in a straight line. Using the grid projection technique described above, we wait until we see a cluster of magma on the screen. Magma ravines are rare when searching blind, so we often run into the opposite coast before finding one. To escape, the agent will spin by a random angle when it detects it is stuck or detects it has left an ocean biome, which will usually point it in a clear direction for it to make progress. Additionally, it checks whether it is stuck checking parts of the ocean it has already checked. If the agent hasn’t discovered unchecked ocean for a while, it will give up searching and reset. Once magma is thought to be detected, it will direct the boat towards the magma. By using a value on the F3 screen, we can see the highest block in the column we are standing in. As water doesn’t count towards this value, we know that all magma ravines exposed to the sky will have a highest terrain of 10. If we see this value on F3, we break our boat and continue. Otherwise, we continue searching.
9. Mine gravel
In non-cold ocean types, the ocean floor is made of gravel. Gravel is important as it has a 10% chance of dropping flint, required for a flint and steel, which is used for lighting the Nether portal. To get gravel, we swim down next to the ravine. To ensure we don’t swim into the ravine at this point, we use the same highest-terrain trick to know that the ground beneath us is at a realistic gravel height (30–45). We place a door to create an air pocket and mine the six gravel blocks next to us, of which we should pick up at least one, despite the items travelling in random directions.
10. Find L-shape
To build a Nether portal easily in a magma ravine, we need an L-shape of magma (one block of magma with two perpendicular adjacent magma blocks). To find this, we swim to the surface and look down at the magma ravine. For a few seconds, we gather each frame that we are looking down and record whether magma blocks are detected at each projected block on the floor.
By aggregating the results over several seconds, we get an accurate map of the ravine floor. This gives us a list of L-shape candidates to attempt to build a portal at. We swim down to each candidate one by one, and mine the first magma block. For a split second, before the water fills in and turns the lava to obsidian, the highest terrain value on F3 drops to the solid floor underneath the lava, which lets us tell how deep the lava is at this point. In order to easily build a portal in the same way every time, we need the lava to be at least 2 blocks deep underneath the magma, so if it is not deep enough, we swim to the next L-shape candidate. Once we’ve found a deep enough L-shape, we place a door to stand in whilst building the portal.
11. Build L-shape portal
Building the portal in an L-shape magma ravine is the same every time, which makes it very easy to automate. As a Nether portal requires an obsidian frame around a 2x3 gap, we can use our bucket to place lava into the frame. We let the water from the ocean turn the lava at the bottom into obsidian, then drain the water.
12. Light portal
Lastly, we need to light the portal. We place and break gravel in the frame of the portal until we get the 10% chance of getting flint instead of gravel. Using the flint and the iron ingot we saved earlier, we can craft a flint and steel and light the portal.
Conclusion
Putting all twelve tasks together, on 30 April 2026 my agent autonomously entered the Nether on a random seed in just over eight minutes (08:00.550 on the in-game timer), using nothing but the pixels on the screen. For 131 days afterwards, it was the only autonomous system to have entered the Nether unassisted. In September, OpenAI released GPT-6 Astra, which was particularly good at operating computers in real time, and within days it had reached the Nether and a fortress.
There is plenty more under the hood that I’ve left out here, from automatically resetting poor spawns to handling popup notifications and testing navigation offline, as well as ongoing work to push further into the Nether. Still, this project shows that playing Minecraft doesn’t necessarily need complex generally intelligent agents, but can be played with simple rule-based systems. It’s also likely the last time the frontier for autonomous Minecraft agents will be held by a system that doesn’t rely on modern machine learning.