Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.
/ ai-guessing-game Public archive

An interactive AI-powered Pokémon guessing game where users receive hints, make guesses, and have their performance evaluated by a judge.

License

Notifications You must be signed in to change notification settings

RillJ/ai-guessing-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Who's That Pokémon? - A Streamlit & AI Guessing Game

Welcome to Who's That Pokémon? An interactive guessing game built with Streamlit and powered by OpenAI's GPT! The objective is simple: guess the name of a Pokémon based on hints provided by the AI assistant. You can play the game here!

Demo Screenshot

Features

  • Interactive Chat Interface: Engage with an AI-powered assistant that provides hints about a randomly selected Pokémon from generations 1 to 7.
  • Scoring System: Your guessing performance is evaluated by a judge model, which rates your accuracy on a scale of 1 to 10.
  • Game Statistics: Track your gameplay stats, including total games played, number of guesses, hints used, and judge ratings.
  • Session Persistence: Your progress is automatically saved to disk, allowing you to resume your game anytime.
  • Game Statistics Dashboard: The app also features a detailed statistics page that shows data such as the total guesses and the judge's rating.

Background

I developed this game as part of a course in my Master's program in Cognitive Science. This course focuses on the application of AI technologies within web applications.

Getting Started

1. Clone the Repository

git clone https://github.com/Gitfoe/ai-guessing-game
cd ai-guessing-game

2. Install the Dependencies

Ensure you have Python 3.10+ installed. Then, install the required packages:

pip install -r requirements.txt

3. Run the Application

streamlit run Hello.py

4. OpenAI API Key

To access the GPT-powered assistant, you need an OpenAI API key. You can enter your API key directly in the sidebar when running the app. This API key is only saved in memory.

Project Structure

.
├── Hello.py                    # Landing page
├── pages/
│   └── Play.py                 # Chat interface and game logic
│   └── Stats.py                # Statistics dashboard
├── data/
│   └── pokemon.csv             # Pokémon dataset
│   └── session_state.json      # JSON file for saving session state
│   └── play_screenshot.png     # Screenshot for README
├── requirements.txt            # Python dependencies
├── README.md                   # Project documentation
├── LICENSE                     # Apache license
└── .gitignore                  # Files to ignore in Git

Configuration

Session State Persistence

The game automatically saves your session state to session_state.json after each game. This includes:

  • Number of guesses per game
  • Number of hints per game
  • Ratings and explanations from the judge model

If you want to reset your progress, simply delete the session_state.json file in the data folder.

License

This project is licensed under Apache License 2.0. See the LICENSE file for details.

Acknowledgments

About

An interactive AI-powered Pokémon guessing game where users receive hints, make guesses, and have their performance evaluated by a judge.

Resources

License

Stars

Watchers

Forks

Languages