heiko-hotz / advent-of-code-2024-gemini

Exploring Gemini AI's problem-solving capabilities through Advent of Code challenges - documenting prompts, attempts, and solutions.
MIT License
3 stars 0 forks source link

Advent of Code 2024 - Gemini Challenge

This repository documents an experiment where Google's Gemini AI model (gemini-exp-1121) attempts to solve the Advent of Code challenges. The goal is to evaluate Gemini's capabilities in understanding and solving complex programming problems.

Setup & Running the Solutions

  1. Clone the repository:

    git clone [repository-url]
    cd advent-of-code-gemini
  2. Create and activate a virtual environment:

    python -m venv venv-advent-of-code
    source venv-advent-of-code/bin/activate  # On Unix/macOS
    # or
    .\venv-advent-of-code\Scripts\activate  # On Windows
  3. Get the input files and problem statements:

    • Visit Advent of Code
    • For each day:
      • Create dayXX/input.txt with your puzzle input
      • Create dayXX/part1-problem.txt and dayXX/part2-problem.txt with the problem descriptions
  4. Run solutions:

    python dayXX/part1.py < dayXX/input.txt  # For part 1
    python dayXX/part2.py < dayXX/input.txt  # For part 2

Progress Overview

Day Model ID Part 1 Part 2 Attempts (P1/P2) Prompt Type Gemini Chat Link Notes
01 gemini-exp-1121 1/1 Zero-shot Chat
02 gemini-exp-1121 1/1 Zero-shot Chat
03 gemini-exp-1121 1/2 Zero-shot Chat first attempt for part 2 led to a ValueError due to improper handling of regex groups
04 gemini-exp-1121 1/3 Zero-shot, CoT Chat did not solve part 2

Legend:

Repository Structure

Each day's challenge is organized in its own directory:

dayXX/
├── input.txt         # Challenge input (not included - get from adventofcode.com)
├── part1-problem.txt # Problem description for part 1 (not included - get from adventofcode.com)
├── part2-problem.txt # Problem description for part 2 (not included - get from adventofcode.com)
├── part1.py         # Solution for part 1
└── part2.py         # Solution for part 2

Note: The input.txt and problem statement files are not included in this repository. You'll need to get these from the Advent of Code website using your own account, as per the Advent of Code's terms of use.

About the Project

This project aims to:

  1. Test Gemini's ability to understand complex problem statements
  2. Evaluate its code generation capabilities
  3. Document the interaction patterns that lead to successful solutions
  4. Provide a reproducible framework for AI-assisted problem solving

Contributing

Feel free to:

License

MIT License