Discover and explore top open-source AI tools and projects—updated daily.
GPT-3 code-generation for Advent of Code challenges
Top 68.2% on SourcePulse
This project provides a Python-based solution for automating Advent of Code (AoC) puzzles using GPT-3. It targets AoC participants seeking to leverage large language models for code generation and problem-solving, aiming to improve puzzle-solving speed and ranking.
How It Works
The system utilizes the OpenAI API to prompt GPT-3 with Advent of Code puzzle descriptions and inputs. GPT-3 generates Python code to solve the puzzle, which is then executed. The aoc-cli
library is employed to fetch puzzle inputs and submit the generated solutions. This approach automates the coding and submission process, allowing GPT-3 to handle the problem-solving logic.
Quick Start & Requirements
aoc-cli
: cargo install aoc-cli
(or via Homebrew/winget).openai
library: pip install openai
.OPENAI_API_KEY
environment variable.aoc-cli
with your AoC session cookie.python3 openai.py --day=<day_number> [--year=<year>] [--part=<part_number>]
Highlighted Details
Maintenance & Community
No specific information on maintainers, community channels, or roadmap is provided in the README.
Licensing & Compatibility
The README does not specify a license. Compatibility for commercial use or closed-source linking is not addressed.
Limitations & Caveats
The project relies heavily on the OpenAI API, incurring costs and requiring an API key. Its performance is dependent on GPT-3's code generation capabilities, which can be inconsistent. The README does not mention specific Python version requirements beyond the openai
library.
2 years ago
Inactive