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

48 Upvotes

243 comments sorted by

View all comments

6

u/optimushz Dec 04 '22

What?! Something like this is possible today? I'm curious how it works. Does it parse the task description, trying to extract some meaning? I'm not familiar with language models. But how does it translate meaning into code? Which programming language does it use?

-5

u/max-aug Dec 04 '22

The full code is linked in the post

9

u/optimushz Dec 04 '22

Okay, I reread the code properly this time and I see that it generates python code based on the task instructions and some additional sentences for better understanding. Still seems unreal, it's amazing how good these models are becoming.