A newer version of the Streamlit SDK is available:
1.54.0
metadata
title: Beer Game Experiment
emoji: ๐บ
colorFrom: purple
colorTo: green
sdk: streamlit
sdk_version: 1.32.0
app_file: app.py
pinned: false
license: mit
python_version: '3.10'
๐บ Beer Game โ Human & AI Collaboration
This is a Beer Game experiment interface built with Streamlit and hosted on Hugging Face Spaces.
The goal is to study human behaviour in supply chain decision-making when collaborating with AI agents (Factory, Wholesaler, Retailer powered by OpenAI GPT-4o-mini).
๐ฎ Roles
- Distributor: Human participant โ you control the order quantity each week.
- Factory / Wholesaler / Retailer: AI agents making decisions using LLMs.
๐ Features
- Classic Beer Game settings:
- 36 weeks simulation
- 2-week shipping delay
- 1-week information delay
- Standard customer demand sequence (constant โ shock โ fluctuations)
- Human plays as Distributor, other roles are LLM agents.
- Logs saved per participant and automatically pushed to Hugging Face Datasets Hub.
- Simple Streamlit interface, deployable on Hugging Face Spaces.
๐ ๏ธ Running the Experiment
1. On Hugging Face Spaces
Deploy this repo as a Streamlit Space.
Add Secrets (Settings โ Secrets):
OPENAI_API_KEYโ your OpenAI API key- Optional for S3 export:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYS3_BUCKETS3_REGION(default:us-east-1)
Participants open the Space and either:
- Enter a custom participant ID, or
- Use the auto-generated ID shown in the app.
Example URL with participant ID:
https://huggingface.co/spaces//?participant_id=ABC123
2. Locally
pip install -r requirements.txt
streamlit run app.py