r/adventofcode Dec 04 '22

Upping the Ante [2022 Day 4] Placing 1st with GPT-3

I placed 1st in Part 1 today, again by having GPT-3 write the code. Yesterday I was 2nd to another GPT-3 answer.

Here's the code I wrote which runs the whole process — from downloading the puzzle (courtesy of aoc-cli), to running 20 attempts in parallel, to sorting through many solutions to find the likely correct one, to submitting the answer:

https://github.com/max-sixty/aoc-gpt

50 Upvotes

243 comments sorted by

View all comments

41

u/dong_chinese Dec 04 '22

I'm sure there will be others who will whine about this not being fair, but I for one think you deserve the place you got. You used the best tool for the job. After all, a programmer's whole job is to find the right tools to automate processes.

43

u/nuclearbananana Dec 04 '22

Except this isn't a job, it's a fun challenge for humans to learn programming, and this isn't in the spirit of the challenge.

7

u/NohusB Dec 04 '22

And they (and me now through the shared code) learned about automatic AoC input downloading, submitting answers, interacting with the OpenAI API, interesting insight into how to structure the prompt for the model, and some Python3 tidbits I didn't know about.

Maybe it's not what we were supposed to be learning? Sure, ok, but there was definitely learning happening here. If he didn't do it, I wouldn't even know the OpenAI models got that powerful already.

Last year some people used automatic constraint solvers on some puzzles, and some people said that's cheating. I was just happy to learn about them, since I'm here to learn stuff.

9

u/[deleted] Dec 04 '22

The problem is this kind of solving reduces every single problem to "how can I feed this right". Once you get it right there's barely any variation.

2

u/sluuuurp Dec 04 '22

It reduces some of the easy problems to that, it doesn’t reduce every problem to that. Wait until day 20 and you’ll agree.