Beer Game Environment is a Python-based OpenAI Gym environment simulating the classic Beer Game supply chain with four roles. It lets agents observe inventory levels and place orders, modeling demand fluctuations, lead times, and cost calculations. Users can train and evaluate RL agents via the standard Gym API to minimize inventory holding and backorder costs across retailer, wholesaler, distributor, and manufacturer nodes.
Beer Game Environment is a Python-based OpenAI Gym environment simulating the classic Beer Game supply chain with four roles. It lets agents observe inventory levels and place orders, modeling demand fluctuations, lead times, and cost calculations. Users can train and evaluate RL agents via the standard Gym API to minimize inventory holding and backorder costs across retailer, wholesaler, distributor, and manufacturer nodes.
The Beer Game Environment provides a discrete-time simulation of a four-stage beer supply chain—retailer, wholesaler, distributor, and manufacturer—exposing an OpenAI Gym interface. Agents receive observations including on-hand inventory, pipeline stock, and incoming orders, then output order quantities. The environment computes per-step costs for inventory holding and backorders, and supports customizable demand distributions and lead times. It integrates seamlessly with popular RL libraries like Stable Baselines3, enabling researchers and educators to benchmark and train algorithms on supply chain optimization tasks.
Who will use Beer Game Environment?
Reinforcement learning researchers
Supply chain and operations management professionals
AI and data science educators
Students studying supply chain optimization
How to use the Beer Game Environment?
Step1: Install the package via pip: pip install beer-game-env
Step2: Import the environment: from beer_game_env import BeerGameEnv
Step3: Instantiate the environment: env = BeerGameEnv()
Step4: Use standard Gym loop: obs = env.reset(), action = agent.predict(obs), obs, reward, done, info = env.step(action)
Step5: Train or evaluate agents using any Gym-compatible RL framework