Lilli98's picture
Update README.md
531a1a3 verified
|
raw
history blame
1.97 kB
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 with 24 weeks, including a demand shock at week 6.
  • Distributor inputs weekly order quantity; AI agents respond automatically.
  • Optional Information Sharing toggle: reveal historical customer demand to all roles.
  • Multi-participant support: each participant gets a unique participant ID and per-participant CSV log.
  • Rich data logging: timestamps, inventory, backlog, orders, info-sharing toggles, and raw AI output.
  • Local CSV export & optional cloud upload (S3) for persistent storage.

๐Ÿ› ๏ธ Running the Experiment

1. On Hugging Face Spaces

  1. Deploy this repo as a Streamlit Space.

  2. Add Secrets (Settings โ†’ Secrets):

    • OPENAI_API_KEY โ€” your OpenAI API key
    • Optional for S3 export:
      • AWS_ACCESS_KEY_ID
      • AWS_SECRET_ACCESS_KEY
      • S3_BUCKET
      • S3_REGION (default: us-east-1)
  3. 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