Drag loot into your pack · Tap / click an item to rotate (or R while dragging) · Drop off the grid to discard · The pack can't hold it all — keep what's worth the most.
Five foes guard the depths
Dungeon Hoard
Slay · Loot · Carry the greatest treasure — but your pack is small, and their hoards are many.
Dungeon Hoard
Five foes guard the depths. Cut them down — but your pack is small and their treasures are many and strangely shaped.
⚔️ Click the monster to attack. When it falls, its loot spills into the pile.
🎒 Drag items from the pile into your grid. Pieces can't overlap.
🔄 Tap / click an item to rotate it (or press R while dragging).
🗑️ Drop an item off the grid to leave it behind and free up space.
💰 Whatever you can't fit is lost forever when you move on. Carry the most valuable haul you can.
The Depths Are Cleared
You climb back into the light, pack heavy with plunder.
0
—
You vs the Optimizer
Stage 1 / 5
⚙ HiGHS · WebAssembly
Your pack
0
vs
HiGHS optimal
0
Your Run vs the Optimizer
Five stages, five packing puzzles — here's how your hoard compares to the proven optimum.
Your pack is an 8×5 grid — 40 cells. Every treasure has its own shape and value, and you may rotate it. Keep the most valuable haul that fits, with no two pieces overlapping.
Even this little dungeon has billions of ways to choose and arrange the loot — far too many to test one by one.
So instead of guessing, we describe the choice precisely. For every item i and every legal placement p (a position and a rotation), a yes/no variable xi,p is 1 when that item sits there, and 0 otherwise.
placement = position × rotation · the solver picks which variables are 1
maximize Σ vᵢ · xᵢ,ₚ
subject to
Σₚ xᵢ,ₚ ≤ 1 each item placed at most once
Σ xᵢ,ₚ ≤ 1 no two pieces share a cell
xᵢ,ₚ ∈ {0, 1}
Maximize total value · use each treasure at most once · never cover a cell twice.
4 · The solve
HiGHS — a state-of-the-art open-source optimizer, here compiled to WebAssembly and running live in your browser — searches with branch-and-bound and cutting planes, and proves the answer is the best possible, not merely a good one.
The same maths routes delivery fleets, schedules shift crews and lays out factory floors — only with millions of variables instead of a few swords and crowns.