Solutions to Advent of Code 2025 implemented in Elixir, with a focus on educational value and thorough documentation.
This year's approach was an experiment: use Claude Code to solve 100% of Advent of Code 2025.
Every line of code in this repository was generated by Claude (Opus 4.5), including:
- The initial project setup and framework
- All 12 day solutions
- All test files
- All documentation and writeups
- Even this README
My role was purely supervisory: reading puzzle descriptions, providing inputs, verifying answers on the AoC website, and occasionally providing guidance when Claude needed clarification. The goal was to explore what's possible when AI handles the entire implementation while a human provides oversight.
| Metric | Value |
|---|---|
| Stars earned | 24/24 ⭐ |
| Human-written code | 0 lines |
| Total cost (tracked) | $34.45 |
| Cost per star | ~$1.44 |
| Hardest day (by cost) | Day 10: $13.10 |
| Metric | Value |
|---|---|
| Total commits | 53 |
| Claude co-authored | 35 (66%) |
| Merge commits (GitHub) | 18 (34%) |
| Human-only commits | 0 |
| Category | Lines |
|---|---|
Solution code (lib/aoc2025/days/) |
2,725 |
| Test files | 770 |
| Solution writeups | 2,164 |
| Framework/templates | ~1,500 |
| Total | ~7,159 |
| Day | Cost | Notes |
|---|---|---|
| 1-3 | - | Pre-tracking |
| 4 | $1.87 | |
| 5 | $2.71 | |
| 6 | $1.52 | |
| 7 | $1.34 | |
| 8 | $2.14 | |
| 9 | $4.07 | |
| 10 | $13.10 | Complex state machine simulation |
| 11 | $2.20 | |
| 12 | $5.50 | 2D bin packing |
| Total | $34.45 |
Cost efficiency: ~$0.005 per line of code (half a cent per line)
- Explore AI Capabilities: Test Claude's ability to solve algorithmic challenges
- Learn Elixir: Use AoC as an opportunity to explore Elixir's functional patterns
- Document Everything: Each solution includes detailed reasoning and explanations
- Share Knowledge: Make solutions accessible to others learning Elixir or algorithms
# Install dependencies
mix deps.get
# Run a specific day
mix day 1
# Run with example input (for testing)
mix example 1
# Run tests for a specific day
mix test.day 1
# Run all example tests
mix test
# Run all tests including full puzzle inputs
mix test --include solutionlib/
aoc2025.ex # Main module
aoc2025/
day.ex # Behaviour and helpers for solutions
input.ex # Input loading utilities
days/ # Daily solutions
day01.ex
day02.ex
...
priv/
inputs/ # Full puzzle inputs
day01.txt
examples/ # Example inputs from problem descriptions
day01.txt
solutions/ # Detailed solution writeups
day01.md
day02.md
...
test/
days/ # Tests for each day
day01_test.exs
Each day includes:
-
Solution Module (
lib/aoc2025/days/dayXX.ex)- Implements
part1/1andpart2/1 - Includes parsing logic and helper functions
- Documented with
@moduledocand@doc
- Implements
-
Tests (
test/days/dayXX_test.exs)- Verifies example inputs match expected outputs
- Tests full puzzle inputs (tagged
:solution)
-
Writeup (
solutions/dayXX.md)- Problem summary
- Solution approach and reasoning
- Complexity analysis
- Lessons learned
| Day | Stars | Solution | Writeup | Cost |
|---|---|---|---|---|
| 1 | ⭐⭐ | day01.ex | day01.md | - |
| 2 | ⭐⭐ | day02.ex | day02.md | - |
| 3 | ⭐⭐ | day03.ex | day03.md | - |
| 4 | ⭐⭐ | day04.ex | day04.md | $1.87 |
| 5 | ⭐⭐ | day05.ex | day05.md | $2.71 |
| 6 | ⭐⭐ | day06.ex | day06.md | $1.52 |
| 7 | ⭐⭐ | day07.ex | day07.md | $1.34 |
| 8 | ⭐⭐ | day08.ex | day08.md | $2.14 |
| 9 | ⭐⭐ | day09.ex | day09.md | $4.07 |
| 10 | ⭐⭐ | day10.ex | day10.md | $13.10 |
| 11 | ⭐⭐ | day11.ex | day11.md | $2.20 |
| 12 | ⭐⭐ | day12.ex | day12.md | $5.50 |
Total: 24 stars - Advent of Code 2025 Complete! 🎄
MIT