~*~ stop 8 of 12 on the planned pixel ring ~*~

MILES HOWELL

home » the workshop » Christmas Packing 2025

Optimization

Christmas Packing 2025

Kaggle’s Santa 2025 puzzle: pack 1 to 200 Christmas-tree polygons into the smallest possible square. Geometric families, simulated annealing and a GPU optimizer.

access:
private
year:
2025
built with:
Python, Shapely, PyTorch

Kaggle’s Santa 2025 challenge: for every n from 1 to 200, pack n identical Christmas-tree-shaped polygons into the smallest square you can, with no overlaps. The score adds up each square’s area divided by n, so every single configuration counts.

My attempts included hand-designed geometric families (spirals and diagonal chains of interlocking trees), simulated annealing to jiggle positions and rotations into tighter fits, and a GPU optimizer that rasterizes the trees for fast approximate overlap checks. The final geometry runs on 50-digit decimal precision, because the overlap check has to be exact.

~ highlights ~

This one lives in a private repo. Ask me about it.