ai-fishing-game  by tutusagi

Text-based fishing game engine designed for AI agents

Created 1 week ago

New!

387 stars

Top 73.6% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides a deterministic, single-file, zero-dependency text-based fishing game engine designed specifically for AI agents. It addresses the challenges of integrating AI with games by offering reproducible gameplay, efficient token usage through batch commands and status summaries, and a "blind play" mode that allows AI to discover game elements organically. This makes it ideal for researchers and developers looking to test AI decision-making, build AI companions, or create novel AI-driven game experiences.

How It Works

The core of the game is engine.py, featuring a deterministic Mulberry32 Pseudo-Random Number Generator (PRNG) and full state serialization. This ensures that identical game seeds and command sequences produce identical outcomes, facilitating debugging, testing, and sharing of game sessions. The engine supports "blind play" via fishing.py, which obfuscates game data, forcing AI players to discover fish types and probabilities through gameplay. Key design choices for AI interaction include batch command execution (multiple instructions separated by ; or newlines) and a compact JSON status bar appended to each output, significantly reducing token consumption compared to traditional turn-based interactions.

Quick Start & Requirements

  • Primary Install/Run: Requires Python 3.8+. The game can be run by importing engine or fishing.py directly into a Python environment.
    import engine
    print(engine.cmd("help"))
    print(engine.cmd("cast"))
    
  • Prerequisites: Zero external dependencies.
  • Windows Users: May require UTF
Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
4
Star History
389 stars in the last 13 days

Explore Similar Projects

Feedback? Help us improve.