Neurosymbolic Generative AI for Physically-Valid 3D LEGO Architecture (Llama-3.2-3B + MLX + Three.js)
Python
0
134 commits
updated Sep 10, 2026
A research project working toward locally trained generation of novel LEGO Architecture-style buildings on a 16 GB Mac mini M4.
Current status: novel, aesthetically pleasing, physically buildable generation has not yet been demonstrated. The strongest verified capability is exact retrieval and CAD reconstruction of existing designs. Codec round trips and source hashes establish data fidelity, not physical validity or creativity.
The active objective, experiment decisions, reproducible checks, and remaining requirements are maintained in docs/GOAL_STATUS.md.
The older generation branches failed important reconstruction and free-running
checks. Some historical reports counted procedural scaffold output as successful
builds. Their provenance fields and experiment notes must be read before quoting
metrics. The old curation filter checked duplicate origins; its stored
stability_score values are not physical stability measurements.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python scripts/serve_app.py --port 8080
Open http://localhost:8080 to inspect reference and catalog models. The existing application is not the acceptance test for the new generation objective. Model checkpoints, raw datasets, and LDraw libraries are local prerequisites and are not all distributed with this repository.
.venv/bin/python -m unittest scripts.test_physical_corpus
.venv/bin/python scripts/audit_physical_corpus.py
This uses the original 47 official and 198 legacy curated source records plus
scratch/ldraw, the full local LDraw library. Output:
data/corpus_v2/audit.json: source provenance, inventory issues, family links,
splits, and consulted library hashes.data/corpus_v2/candidates.json: complete 40–600-piece parses awaiting
construction and visual review.The revised audit found 106 complete parses, including 96 size-band candidates spanning 65 conservatively grouped families. V2 fixes set-number title variants that separated related designs; V1 is retained for old experiment provenance. These candidate files have not all passed physical construction validation.
Start with pavilions and stepped towers, approximately 30 common part types, eight colors, upright connections, and an included physical base. Evaluate attachment-based generation against coordinate prediction before scaling local training. Measure complete builds against procedural and retrieval baselines.
The final evaluation must report every attempted generation, actual physical piece counts, supported construction checks, novelty, runtime, and memory. Aesthetic approval and real-world assembly require human evidence.
Project code is MIT licensed; see LICENSE. Third-party model files, part libraries, datasets, and dependencies retain their own licenses. LEGO is a trademark of the LEGO Group, which does not sponsor or endorse this project.
Neurosymbolic Generative AI for Physically-Valid 3D LEGO Architecture (Llama-3.2-3B + MLX + Three.js)
Python
0
134 commits
updated Sep 10, 2026
A research project working toward locally trained generation of novel LEGO Architecture-style buildings on a 16 GB Mac mini M4.
Current status: novel, aesthetically pleasing, physically buildable generation has not yet been demonstrated. The strongest verified capability is exact retrieval and CAD reconstruction of existing designs. Codec round trips and source hashes establish data fidelity, not physical validity or creativity.
The active objective, experiment decisions, reproducible checks, and remaining requirements are maintained in docs/GOAL_STATUS.md.
The older generation branches failed important reconstruction and free-running
checks. Some historical reports counted procedural scaffold output as successful
builds. Their provenance fields and experiment notes must be read before quoting
metrics. The old curation filter checked duplicate origins; its stored
stability_score values are not physical stability measurements.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python scripts/serve_app.py --port 8080
Open http://localhost:8080 to inspect reference and catalog models. The existing application is not the acceptance test for the new generation objective. Model checkpoints, raw datasets, and LDraw libraries are local prerequisites and are not all distributed with this repository.
.venv/bin/python -m unittest scripts.test_physical_corpus
.venv/bin/python scripts/audit_physical_corpus.py
This uses the original 47 official and 198 legacy curated source records plus
scratch/ldraw, the full local LDraw library. Output:
data/corpus_v2/audit.json: source provenance, inventory issues, family links,
splits, and consulted library hashes.data/corpus_v2/candidates.json: complete 40–600-piece parses awaiting
construction and visual review.The revised audit found 106 complete parses, including 96 size-band candidates spanning 65 conservatively grouped families. V2 fixes set-number title variants that separated related designs; V1 is retained for old experiment provenance. These candidate files have not all passed physical construction validation.
Start with pavilions and stepped towers, approximately 30 common part types, eight colors, upright connections, and an included physical base. Evaluate attachment-based generation against coordinate prediction before scaling local training. Measure complete builds against procedural and retrieval baselines.
The final evaluation must report every attempted generation, actual physical piece counts, supported construction checks, novelty, runtime, and memory. Aesthetic approval and real-world assembly require human evidence.
Project code is MIT licensed; see LICENSE. Third-party model files, part libraries, datasets, and dependencies retain their own licenses. LEGO is a trademark of the LEGO Group, which does not sponsor or endorse this project.