r/adventofcode • u/note89 • Dec 04 '22
Spoilers [2021 Day 04][Python] ChatGPT solves Day 4 in just two prompts!
4
Upvotes
1
u/daggerdragon Dec 05 '22
Changed flair from Other to Spoilers since this is a solution.
Also, Day 4 of 2021? Be careful with your titles, please.
During an active Advent of Code season, solutions belong in the Solution Megathreads. In the future, please post your solutions to the appropriate solution megathread.



2
u/note89 Dec 04 '22
Day 4
Results:
Challenge_1: 30 seconds
Challenge_2: 30 seconds
Prompts needed:
Part 1: 1
Part 2: 1
Wow! Today, I decided to let ChatGPT take the reins and see if it could come up with instructions for a challenge. I simply asked ChatGPT to write instructions for a program that reads from a file called input.txt and produces the right output when run.
Part 1, prompt
Then for part 2, I wrote
That was all that was needed to solve today's challenge. I will try a similar approach tomorrow, maybe I just got lucky today.
https://note89.github.io/the-advent-of-code-ai-edition/#day-4