Prerequisites
Make sure Foundation is installed:Create an environment
Foundation exposesmake_env_instance() as the primary entry point for creating environments:
Available scenario names
Simple Wood and Stone (dynamic layout)
Simple Wood and Stone (dynamic layout)
Simple Wood and Stone (from file)
Simple Wood and Stone (from file)
.txt file.COVID-19 and Economy
COVID-19 and Economy
One-Step Economy
One-Step Economy
Reset and inspect
1
Reset the environment
reset() returns a dictionary of observations keyed by agent index:2
Inspect agents
Access agents directly from the environment:
3
Step the simulation
Pass an action dict keyed by agent index. Each value is the action index (or a dict in multi_action_mode):
4
Run a full episode
Controlling randomness
Useenv.seed() to set reproducible seeds:
Examining the world
Next steps
Core Concepts
Understand Scenarios, Components, Agents, and Entities.
Simulations
Explore the built-in simulation environments.
Training with RL
Train agents using RLlib or WarpDrive.
Extending Foundation
Build custom components and scenarios.