# A dad generated 27 million Rail Cube layouts to use every last piece

Original title: Optimising the Rail Cube

> Hacker News story 50357763 · language: en · submitted 2026-11-03
> Web version: https://zeli.app/story/50357763
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 38 · by [owenlacey](<https://news.ycombinator.com/user?id=owenlacey>) · 💬 2
[original](<https://owenlacey.dev/railcube-optimisation/post>) · [HN discussion](<https://news.ycombinator.com/item?id=50357763>)

## Summary

Owen Lacey's three-year-old keeps demanding new train tracks, so he wrote software to generate Rail Cube layouts — roughly 27 million so far, out of an estimated 28 billion that use every piece. The default build leaves 23 pieces in the box, which he calls unacceptable. He shares his favorite layout and challenges readers to beat it, since 99.9% of possibilities remain unseen.

## Key quote

> It leaves 23 Rail Cube pieces in the box, unused. Unacceptable.

---

## Cite

- Page: https://zeli.app/story/50357763
- Date: 2026-11-03
- Source: owenlacey.dev (https://owenlacey.dev/railcube-optimisation/post)
- Hacker News: https://news.ycombinator.com/item?id=50357763

## Other languages

- zh: https://zeli.app/zh/story/50357763 · markdown: https://zeli.app/zh/story/50357763.md
- ja: https://zeli.app/ja/story/50357763 · markdown: https://zeli.app/ja/story/50357763.md
- ko: https://zeli.app/ko/story/50357763 · markdown: https://zeli.app/ko/story/50357763.md
- de: https://zeli.app/de/story/50357763 · markdown: https://zeli.app/de/story/50357763.md
- es: https://zeli.app/es/story/50357763 · markdown: https://zeli.app/es/story/50357763.md
- ru: https://zeli.app/ru/story/50357763 · markdown: https://zeli.app/ru/story/50357763.md
