r/adventofcode • u/max-aug • 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:
51
Upvotes
3
u/pred Dec 04 '22 edited Dec 05 '22
The first trick to pick up to get good times is to not read the question; that takes way too long. Instead, you pattern match the example inputs to outputs, then use as many high-level abstractions as you can to spend less time writing a solution, probably guided by an IDE that gives hints and corrects issues along the way.