~ 2 min read

Using ChatGPT to Create Spoiler-Free Advent of Code Hints

Advent of Code is an Advent Calendar for programmers. It consists of 25-daily challenges split into 2 parts I take part in each year. Each day is increasingly challenging and it’s extremely difficult by day 25. The answer for each challenge is unique to every participant, since they are each given unique data to work with.

When users encounter difficulty, they’re referred to the Advent of Code subreddit /r/AdventofCode. When I’ve referred to this in the past, it’s impossible to avoid what I term ‘spoilers’ - people responding with their code verbatim. This is more than I need, often just needing someone to tease an algorithm or approach before being able to tackle it in my own way.

Since ChatGPT is all the rage at the moment, I decided to use it to generate some hints for me, but concisely and without explicit code examples. Sometimes it will do so anyway with pseudocode, or will be overly verbose at which point I’ll ask for something more concise or rephrased. ChatGPT is very good at producing helpful responses - possibly due to the fact it has a lot of code under it’s belt to train on from Github.

I’ve created a list of spoiler free hints on this page, through til day 11. There’s 3 hints for each day, which are hidden until you click to open them. Some of the hints have been edited where I felt it appropriate.

Update - on day 11 here I’ve decided to stop maintaining these, since I’ve realised spoiler free posts are available on reddit outside of the main mega solution threads and ChatGPT answers are becoming less useful on these later problems

Subscribe for Exclusives

My monthly newsletter shares exclusive articles you won't find elsewhere, tools and code. No spam, unsubscribe any time.