Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joeshaw/advent2022
Advent of Code 2022. Using ChatGPT to generate solutions.
https://github.com/joeshaw/advent2022
advent-of-code advent-of-code-2022 chatgpt
Last synced: 23 days ago
JSON representation
Advent of Code 2022. Using ChatGPT to generate solutions.
- Host: GitHub
- URL: https://github.com/joeshaw/advent2022
- Owner: joeshaw
- Created: 2022-12-05T22:22:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-24T19:23:15.000Z (almost 2 years ago)
- Last Synced: 2024-06-21T16:52:20.498Z (7 months ago)
- Topics: advent-of-code, advent-of-code-2022, chatgpt
- Language: Go
- Homepage:
- Size: 714 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Exercises from the [2022 Advent of Code](https://adventofcode.com/2022).
This year I decided to try something different: prompt [ChatGPT](https://openai.com/blog/chatgpt/) to generate programs that solve the puzzles.
My prompts generally give a short preamble, like:
> Advent of Code is a Christmas-themed series of programming puzzles. Each day there are two parts to a puzzle, with the second part building upon the first one. I will provide you with the prompt for the first part. I want you to generate a complete program in Go, Rust, or Python to solve the puzzle. The program should read its input from a file named `input.txt`.
and then provide the puzzle text verbatim.
Sometimes this is enough to generate a working solution on the first try or after a couple of retries. Other times, I have to provide more hints.
In each directory there is a README that gives some commentary, the prompt I provided, and the response ChatGPT generated. Also in that directory is the (completely unmodified!) working code and the input file provided with the puzzle.
We'll see how far I get with this.
**Update**: I made it 6 days. On day 7, ChatGPT wasn't able to generate enough code with its limited runtime budget to solve the problem, although the code was directionally correct. After trying for a few days (and waiting out overloaded servers), I gave up. It was fun though!
![](chatgpt.png)