Skip to main content
GameDev.net gamedev.net
Video Content

This is video content from Sebastian Lague. The summary highlights key points - watch the full video for complete context.

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Sebastian Lague
Sebastian Lague Video
· 4 months, 3 weeks ago • Sebastian Lague

Coding Adventure: Rubik's Cube

Briefing

Sebastian Lague’s latest Coding Adventure walks through building a program that solves a standard 3x3 Rubik’s Cube. The project starts with modeling the cube, then adds move handling, a binary state representation, and search/optimization work to make solving feasible.

The video is useful because it’s not just about “solving a puzzle,” it’s about how you represent complex state and how that representation affects the quality and speed of your solver. Lague compares multiple approaches, including a greedy solver, a sandwich solver, and an oriented solver, which makes the tradeoffs between heuristic strength and implementation complexity very concrete.

For game developers, the takeaways map directly to AI and systems work: compact state encoding, heuristic evaluation, and iterative refinement of search strategies. Even though this is a puzzle project, the same patterns show up in pathfinding variants, procedural systems, and any feature where you need to search a large combinatorial space efficiently.

He also notes a correction about the evaluation function at 22:32: the fallback to the greedy evaluator included a small bonus for correctly oriented corners. That kind of detail is a good reminder that tiny scoring changes can materially affect solver behavior, especially when heuristics are layered or reused.

“My attempt at solving the 3x3 Rubik's cube (by programming the computer to do it for me).”

— Sebastian Lague · Project description
At a glance
what
Sebastian Lague built a program to solve a 3x3 Rubik’s Cube by search and heuristics.
who
Sebastian Lague; source code is published on GitHub at SebLague/Rubiks-Cube.
when
The video is structured into chapters from 00:00 to 23:39, with the evaluation-function note at 22:32.
impact
Useful reference for developers working on state-space search, heuristics, and compact state encoding.
Signal Positive

Strong technical demo with useful solver tradeoffs

Discuss

Follow ai updates

See relevant stories in your personalized news feed.

Sign in to follow

Continue on GameDev.net

Useful next steps related to this story.

Game development news without the noise

One useful weekly briefing. No daily flood.

Sending your confirmation email…

Discussion

Loading comments...

Story Timeline (4 sources)

May 7, 2026
Sebastian Lague • First Main
Coding Adventure: Rubik's Cube
May 10, 2026
May 11, 2026
May 12, 2026
Story covered over 5 days • First reported by Sebastian Lague