Using Claude as a tutor

577 words · 2 min read · 34 views

One thing I've been wanting to do this year is to finish Advent of Code 2025.
I had managed to grab all the stars except one, day 10 part 2. Part 2 was a real step up in difficulty for me, given my relatively shallow mathematical background.

I had an idea to use Claude as a private tutor to help me fill my knowledge gaps. I learn best by doing, but given that I've already tried and failed on this particular problem I knew it was beyond me.
The puzzle asks you to find the minimum number of button presses to hit exact target values on a set of counters.

Building on my solution for part 1 didn't get me anywhere, but since I still had all of my old code, I started Claude and asked it to help me understand the problem and why my current solution was not the correct one. Spoilers will follow.

Screenshot_20260615_215515.png

It started off way too hard, and I had to ask it to dumb it down for me. And again, I didn't want it to tell me the answer, I wanted to come to the insight by myself, as much as I could anyway.

Screenshot_20260615_231122.png I'm sorry, the what matrix?

I liked that during the session it asked me questions about my reasoning, and when I explained my thinking it could tell me where I went wrong and gave a hint on what I should be doing.

Screenshot_20260615_231436.png Claude realizing it's guiding a simpleton

Pretty quickly we came to the topic of Linear Programming, which was a topic that was new to me. Claude recommended me to use an existing tool such as scipy or ortools. If this was for work, that's the way I would have gone, but since this whole thing was for learning I asked it to help me work through the problem and implement the most basic functionality needed.

As it continued to guide me, it helped me think about how to better use constraints, unit propagation, and some nifty tricks when searching. We sped up the solution, cutting certain problems down from 2 minutes to just 14ms! And while all these things helped out, they weren't enough. The input contained almost 200 problems to solve and my code only solved around 10 of them in a timely manner.

That is, until we landed on the final solution, Gaussian Elimination. And again Claude tried to dissuade me from implementing it myself but I asked to continue.

One thing that I appreciated while working through the problem was the fact that I could ask Claude about terminology or why something had to be done in a particular way. Someone with a deeper math background might understand these intuitively, but for me some of the terminology was pure nonsense.

I particularly liked when it made comparisons between concepts and "the real world". Like how Linear Programming could help solve a bakery's menu to maximize profit.

Luckily, Claude had infinite patience with me and after two sessions spread across a couple of days I had, not only a working solution, but an understanding of the what and why of what we did.

How much will I remember in a month? While maybe not much of the details, I now have learned about these ideas and Linear Programming is no longer a foreign concept to me. But the next time I need Gaussian Elimination I might reach for a library.