Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FergusKidd/GB-Zelda_AI

Repository files navigation

GB Zelda AI Player

An AI system that plays The Legend of Zelda using PyBoy emulation, Azure OpenAI for decision-making, and local models for player control.

Architecture

  1. PyBoy Integration: Runs legitimate Zelda ROM and captures screen data
  2. Azure OpenAI: Receives screen captures and makes strategic decisions
  3. Local Control: Translates AI decisions into button presses using local models

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your Azure OpenAI credentials
  1. Place your Zelda ROM file in the roms/ directory

Usage

python main.py

Project Structure

  • src/: Main source code
    • pyboy_client.py: PyBoy integration and ROM management
    • azure_client.py: Azure OpenAI communication
    • screen_capture.py: Screen capture and image processing
    • local_controller.py: Local model for button control
    • main.py: Main game loop orchestrator
  • roms/: Directory for ROM files
  • logs/: Logging output
  • models/: Local model files

About

AI plays Zelda

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published