that’s pricey to me (and to many others) as a result of it has, in a manner, watched me develop from an elementary college pupil, all the best way to a (soon-to-be!) faculty graduate. An plain a part of the sport’s attraction is its infinite replayability derived from its world technology. In present editions of the sport, Minecraft makes use of a wide range of noise capabilities in conjunction to procedurally generate [1] its worlds within the type of chunks, that’s, blocks, in a manner that tends to (kind of) type ‘pure’ wanting terrain, offering a lot of the immersion for the sport.
My objective with this venture was to see if I might transfer past hard-coded noise and as an alternative train a mannequin to ‘dream’ in voxels. By leveraging current developments in Vector Quantized Variational Autoencoders (VQ-VAE) and Transformers, I constructed a pipeline to generate 3D world slices that seize the structural essence of the sport’s landscapes. As a concrete output, I needed the flexibility to generate chunks (organized in a grid) that seemed like Minecraft’s terrain.
As a facet notice, this isn’t a wholly novel concept, particularly, ChunkGAN [2] gives an alternate method to handle the identical objective.
The Problem of 3D Generative Modeling
In a video [3] from January 2026, Computerphile featured Lewis Stuart that highlighted the principle points with 3D technology and I’d encourage readers to offer it a watch nonetheless, to summarize the important thing factors, 3D technology is difficult as a result of good 3D datasets are onerous to seek out or just don’t exist and including a dimension of freedom makes issues a lot more durable (take into account the basic Three-body downside [4]). It ought to be famous that the video explicitly addresses diffusion fashions (which requires labelled information) although lots of the considerations could be ported over to the final concept of 3D technology. One other subject is just scale; a picture ( pixels) would virtually actually be thought of low-resolution by trendy requirements however a 3D mannequin on the identical constancy would require voxels. Extra factors instantly implies increased compute necessities and might rapidly make such duties infeasible.
To beat the 3D information shortage talked about by Stuart, I turned to Minecraft, which, in my view, is the most effective supply of voxel information out there for terrain technology. By utilizing a script to teleport by means of a pre-generated world, I pressured the sport engine to load and render hundreds of distinctive chunks. Utilizing a separate extraction script, I pulled these chunks immediately from the sport’s area information. This gave me a dataset with excessive semantic consistency; not like a group of random 3D objects, these chunks signify a steady, flowing panorama the place the ‘logic’ of the terrain (how a river mattress dips or how a mountain peaks) is preserved over chunk boundaries.
To bridge the hole between the complexity of 3D voxels and the restrictions of recent {hardware}, I couldn’t merely feed uncooked chunks right into a mannequin and hope for the most effective. I wanted a approach to condense the ‘noise’ of thousands and thousands of blocks right into a significant, compressed language. This lead me to the guts of the venture: a two-stage generative pipeline that first learns to ‘tokenize’ 3D area, after which learns to ‘converse’ it.
Knowledge Preprocessing
A key but non-obvious remark is that a good portion of Minecraft’s chunks are stuffed with ‘air’ blocks. It’s a non-trivial remark principally as a result of air isn’t technically a block, you’ll be able to’t place it or take away it as you’ll be able to with each different block within the sport however reasonably, it’s the non-existence of a block at that time. In trendy Minecraft, a lot of the vertical span is air and as such, as an alternative of contemplating full peak ranges, I restricted it to . These extra conversant in Minecraft’s world technology would know that blocks have adverse -values, all the best way to and at this level, I have to apologize as a result of once I carried out this structure, this had solely slipped my thoughts. The mannequin I current on this article would work simply as properly if you happen to thought of a bigger vertical span however attributable to my unlucky oversight, the outcomes that I current will probably be from a restricted span of blocks.
On the notice of limiting blocks, chunks have a number of blocks that don’t present up fairly often and don’t contribute to the final form of the terrain however obligatory to take care of immersion for the participant. Not less than for this venture, I select to limit blocks to the highest 30 blocks that made up chunks by frequency.
Pruning the vocabulary, so to talk, is helpful however solely half the battle. As said earlier than, as a result of Minecraft worlds are primarily composed of ‘air’ and ‘stone,’ the dataset suffers from some fairly excessive class imbalance. To forestall the mannequin from taking the ‘path of least resistance,’ that’s, merely predicting empty area to realize low loss, I carried out a Weighted Cross-Entropy loss. By scaling the loss based mostly on the inverse log-frequency of every block, I pressured the VQ-VAE to prioritize the structural ‘minorities’ like grass, water, and snow.
In plain phrases: the rarer a block kind is within the dataset, the extra closely the mannequin is penalized for failing to foretell it, pushing the community to deal with a patch of snow or a river mattress as simply as necessary because the huge expanses of stone and air that dominate most chunks.
Structure Overview
This mermaid sequenceDiagram [6] gives a chicken’s eye view of the structure.

Uncooked Voxel Drawback and Tokenizing 3D Area
A naive method to constructing such an structure would contain studying and constructing chunks block by block. There’s a myriad of explanation why this is able to be unideal however a very powerful downside is that it may possibly turn out to be computationally infeasible in a short time with out actually offering semantic construction. Think about assembling a LEGO set with hundreds of bricks. Whereas potential, it will be manner too gradual and it wouldn’t actually have any structural integrity: items which might be adjoining horizontally wouldn’t be related and also you’d basically be constructing a set of disjoint towers. The way in which LEGO addresses that is by having bigger blocks, like the long-lasting brick, that take over area that might usually require a number of items. As such, you replenish area sooner and there’s extra structural integrity.
For the system, codewords are the LEGO bricks. Utilizing a VQ-VAE (Vector Quantized Variational AutoEncoder), the objective is to construct a codebook, that’s, a set of structural signatures that it may possibly use to reconstruct full chunks. Consider buildings like a flat part of grass or a blob of diorite. In my implementation, I allowed a codebook with distinctive codes.
To implement this, I used 3D Convolutions. Whereas 2D convolutions are the bread and butter of picture processing, 3D convolutions enable the mannequin to study kernels that slide throughout the X, Y, and Z axes concurrently. That is very important for Minecraft, the place the connection between a block and the one under it (gravity/help) is simply as necessary as its relationship to the one beside it.
Additional Particulars
Probably the most crucial part of this stage is the `VectorQuantizer`. This layer sits on the ‘bottleneck’ of the community, forcing steady neural indicators to snap to a set ‘vocabulary’ of 512 realized 3D shapes.
Certainly one of my greatest hurdles in VQ-VAE coaching is ‘lifeless’ embeddings, that’s, codewords that the encoder by no means chooses, which successfully waste the mannequin’s capability. To resolve this, I added a approach to ‘reset’ lifeless codewords. If a codeword’s utilization drops too low, the mannequin forcefully re-initializes it by ‘stealing’ a vector from the present enter batch:
Brick by Brick
A various assortment of blocks is nice however they don’t imply a lot until they’re put collectively properly. Subsequently, to place these codewords to good use, I used a GPT. With a purpose to make this work, I took the latent grid produced by the VQ-VAE right into a set of tokens, basically, the 3D world will get flattened right into a 1D language. Then, the GPT sees 8 chunks price of tokens to study the spatial grammar, so to talk, of Minecraft to realize the aforementioned semantic consistency.
To attain this, I used Informal Self-Consideration:
Lastly, throughout inference, the mannequin makes use of top-k sampling, together with some temperature to regulate erratic technology creativity within the following technology loop:
By the top of this sequence, the GPT has ‘written’ a structural blueprint 256 tokens lengthy. The subsequent step is to move these by means of the VQ-VAE decoder to manifest a grid of recognizable Minecraft terrain.
Outcomes
On this render [6], the mannequin efficiently clusters leaf blocks, mimicking the sport’s tree buildings.

On this one [6], the mannequin makes use of snow blocks to cap the stone and grass, reflecting the high-altitude or tundra slices discovered within the coaching information. Moreover, this render exhibits that the mannequin realized find out how to generate caves.

On this picture [6], the mannequin locations water in a despair and borders it with sand, demonstrating that it has internalized the spatial logic of a shoreline, reasonably than scattering water blocks arbitrarily throughout the floor.

Maybe probably the most spectacular result’s the inner construction of the chunks. As a result of the implementation used 3D convolutions and a weighted loss operate, the mannequin really generates subterranean options like contiguous caves, overhangs, and cliffs.
Whereas the outcomes are recognizable, they aren’t excellent clones of Minecraft. The VQ-VAE’s compression is ‘lossy,’ which typically ends in a slight ‘blurring’ of block boundaries or the occasional floating block. Nonetheless, for a mannequin working on a extremely compressed latent area, the flexibility to take care of structural integrity throughout a chunk grid, I imagine, is a big success.
Reflections and Future Work
Whereas the mannequin efficiently ‘desires’ in voxels, there may be vital room for growth. Future iterations might revisit the total vertical span of to accommodate the huge jagged peaks and deep ‘cheese’ caves attribute of recent Minecraft variations. Moreover, scaling the codebook past 512 entries would enable the system to tokenize extra advanced, area of interest buildings like villages or desert temples. Maybe most enjoyable is the potential for conditional technology, or ‘biomerizing’ the GPT, which might allow customers to information the architectural course of with particular prompts equivalent to ‘Mountain’ or ‘Ocean,’ turning a random dream right into a directed inventive software.
Thanks for studying! For those who’re within the full implementation or wish to experiment with the weights your self, be at liberty to take a look at the repository [5].
Citations and Hyperlinks
[1] Minecraft Wiki Editors, World technology (2026), https://minecraft.wiki/w/World_generation
[2] x3voo, ChunkGAN (2024), https://github.com/x3voo/ChunkGAN
[3] Lewis Stuart for Computerphile, Producing 3D Fashions with Diffusion – Computerphile (2026), https://www.youtube.com/watch?v=C1E500opYHA
[4] Wikipedia Editors, Three-body Drawback (2026), https://en.wikipedia.org/wiki/Three-body_problem
[5] spaceybread, glowing-robot (2026), https://github.com/spaceybread/glowing-robot/tree/grasp
[6] Picture by creator.
A Be aware on the Dataset
All coaching information was generated by the creator utilizing a regionally run occasion of Minecraft Java Version. Chunks have been extracted from procedurally generated world information utilizing a customized extraction script. No third-party datasets have been used. As the info was generated and extracted by the creator from their very own sport occasion, no exterior licensing restrictions apply to its use on this analysis context.















