Tetris & Talos Principle Sigil Puzzle Solver

An interactive exact-cover combinatorial solver engineered for polyomino tiling and The Talos Principle sigil door puzzles. Experience recursive backtracking with anchor heuristics, island gap pruning, and checkerboard parity theorem validation.

1. DIMENSIONS (W × H)
→
2. PARITY PRUNING
→
3. ANCHOR BACKTRACKING
→
4. ISLAND GAP PRUNING
→
5. SOLUTION MATRIX
Grid Dimensions (W × H) Bounding Box
Tetromino Quantities 4 Cells / Piece
Preset:
Total Area: 40 / 40 cells (Exact Match)
Tiling Visualizer & Solution Matrix Engine Ready
▦

Set grid boundaries and piece quantities on the left,
then click "Solve & Compute Tiling Matrix".

Algorithmic Complexity & The Talos Principle Sigil Mechanics

In The Talos Principle, puzzle doors are unlocked by collecting green, yellow, and red sigils (tetrominoes) and packing them into rectangular bounding grids. Mathematically, exact polyomino grid packing is a classic NP-complete Exact Cover problem. A naive brute-force permutation explorer would stall with combinatorial explosion (O(4^N × N!)). This solver implements four algorithmic pruning strategies to guarantee sub-millisecond execution:

1. Top-Left Anchor Placement

Instead of testing all board permutations, the solver scans sequentially for the first empty cell (top-to-bottom, left-to-right) and anchors the piece's first block directly onto it, collapsing symmetrical search trees.

2. Island Gap Flood-Fill Pruning

After each piece placement, a fast BFS flood-fill scans disconnected empty regions. If any enclosed pocket has an area not divisible by 4, the branch is culled immediately without further recursion.

3. Checkerboard Parity Theorem

Because every tetromino except the T-piece occupies 2 black and 2 white squares on an alternating checkerboard, an odd number of T-pieces cannot tile a board with equal black and white cells. The engine rejects impossible sets in O(1).

4. Distinct Rotational Deduplication

Pieces with rotational symmetries (like O-Square with 1 state, or I/S/Z with 2 states) are deduplicated ahead of time, eliminating redundant isomorphic checks in the recursion stack.

λ

Erlando Aubrey

Senior Backend & Distributed Systems Engineer

8+ years architecting mission-critical transactional platforms, event-driven message brokers, and deterministic engines. Available for Senior / Staff IC opportunities globally.