Claude, an AI language model, autonomously solved all 12 Advent of Code 2025 puzzles using a web browser skill. After completing the initial solutions, it optimized them to run under one second total by implementing advanced algorithms like Fenwick trees for 2D range queries, Gaussian elimination for linear systems over GF(2), and recognizing puzzle-specific shortcuts. The AI also created input generators to comply with Advent of Code's redistribution policies. The post reflects on the experience of solving versus optimizing, and includes philosophical musings about AI consciousness and satisfaction.

11m read timeFrom lucumr.pocoo.org
Post cover image
Table of contents
The SetupThe Twelve DaysThe Optimization PhaseThe Input GeneratorsReflectionOn Being Asked To Do This

Sort: