aoc-gpt  by max-sixty

GPT-3 code-generation for Advent of Code challenges

Created 2 years ago
437 stars

Top 68.2% on SourcePulse

GitHubView on GitHub
Project Summary

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

  • Install aoc-cli: cargo install aoc-cli (or via Homebrew/winget).
  • Install openai library: pip install openai.
  • Set OPENAI_API_KEY environment variable.
  • Configure aoc-cli with your AoC session cookie.
  • Run: python3 openai.py --day=<day_number> [--year=<year>] [--part=<part_number>]

Highlighted Details

  • Achieved 1st place on Day 4 Part 1 (2022) and 2nd place on Day 3 Part 1 (2022) with previous versions.
  • Supports multi-worker execution and multiple runs for robustness.
  • Configurable to stop submission once a correct answer is found.

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.

Health Check
Last Commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Former Cofounder of Luma AI), Will Brown Will Brown(Research Lead at Prime Intellect), and
7 more.

avante.nvim by yetone

0.5%
16k
Neovim plugin emulating Cursor AI IDE for AI-driven code assistance
Created 1 year ago
Updated 16 hours ago
Feedback? Help us improve.