Skip to content

shnako/advent-of-code-2024-ai

Repository files navigation

Advent of Code 2024 🤖

2024 is the year of the AI, so for this AoC I decided to use Claude Code with Claude Sonnet 4 to solve the puzzles.

The purpose this time wasn't to learn a new language or algorithm, but to understand how powerful this tool is and how to use it effectively.

Lessons Learned

Effectiveness

I was expecting this to struggle with the solutions, but it only returned a wrong answer on day 24. Except for that, the first answer it showed was the right answer.

Instructions

The most important result of this exercise is the CLAUDE.md file.

I started with a basic one with simple instructions and iterated over it as we solved puzzles. We added not only fixes for things that didn't go as planned, but also improvements that made the whole process more and more automated.

Claude added most of the content in this file based on requests from me. It could definitely be improved, but I preferred to leave it as is as it worked well.

In its current form, it guides Claude to solve problems almost autonomously, from fetching the puzzle and input, to submitting it, raising PRs and addressing comments.

Multiple agents

While Claude was exceptional at solving the puzzles, it did make mistakes and sometimes miss things. All of these were caught when CodeRabbit reviewed the PR, and Claude fixed them when raised. Having CodeRabbit review Claude's work was as useful as having a human review another human's PR.

Next steps

I will take this CLAUDE.md file and ask Claude to modify it so that it can solve all the problems and merge it properly from a single prompt.

Furthermore, I will ask it to do so in a language I am unfamiliar with. Rust? Go? We'll see...

I've implemented this in advent-of-code-2018-ai.

Solutions

Day Puzzle Solution Results Input Text
01 Historian Hysteria Day 01 solution Day 01 test Day 01 input Day 01 puzzle
02 Red-Nosed Reports Day 02 solution Day 02 test Day 02 input Day 02 puzzle
03 Mull It Over Day 03 solution Day 03 test Day 03 input Day 03 puzzle
04 Ceres Search Day 04 solution Day 04 test Day 04 input Day 04 puzzle
05 Print Queue Day 05 solution Day 05 test Day 05 input Day 05 puzzle
06 Guard Gallivant Day 06 solution Day 06 test Day 06 input Day 06 puzzle
07 Bridge Repair Day 07 solution Day 07 test Day 07 input Day 07 puzzle
08 Resonant Collinearity Day 08 solution Day 08 test Day 08 input Day 08 puzzle
09 Disk Fragmenter Day 09 solution Day 09 test Day 09 input Day 09 puzzle
10 Hoof It Day 10 solution Day 10 test Day 10 input Day 10 puzzle
11 Plutonian Pebbles Day 11 solution Day 11 test Day 11 input Day 11 puzzle
12 Garden Groups Day 12 solution Day 12 test Day 12 input Day 12 puzzle
13 Claw Contraption Day 13 solution Day 13 test Day 13 input Day 13 puzzle
14 Restroom Redoubt Day 14 solution Day 14 test Day 14 input Day 14 puzzle
15 Warehouse Woes Day 15 solution Day 15 test Day 15 input Day 15 puzzle
16 Reindeer Maze Day 16 solution Day 16 test Day 16 input Day 16 puzzle
17 Chronospatial Computer Day 17 solution Day 17 test Day 17 input Day 17 puzzle
18 RAM Run Day 18 solution Day 18 test Day 18 input Day 18 puzzle
19 Linen Layout Day 19 solution Day 19 test Day 19 input Day 19 puzzle
20 Race Condition Day 20 solution Day 20 test Day 20 input Day 20 puzzle
21 Keypad Conundrum Day 21 solution Day 21 test Day 21 input Day 21 puzzle
22 Monkey Market Day 22 solution Day 22 test Day 22 input Day 22 puzzle
23 LAN Party Day 23 solution Day 23 test Day 23 input Day 23 puzzle
24 Crossed Wires Day 24 solution Day 24 test Day 24 input Day 24 puzzle
25 Code Chronicle Day 25 solution Day 25 test Day 25 input Day 25 puzzle

Results

Dashboard

Advent of Code 2023 Dashboard Result

About

The solutions to this are fully implemented by AI as an experiment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages