Scenario variants
Two scenario names are registered:
Both variants share the same agent types (
BasicMobileAgent, BasicPlanner) and required entities (Wood, Stone).
Components used
Gather (move.py)
Gather (move.py)
Registered as
Gather. Allows mobile agents to move around the world and collect resources. Supports heterogeneous collection skill via skill_dist (none, pareto, or lognormal). Key parameters:move_labor(float, default1.0): Labor cost per move.collect_labor(float, default1.0): Additional labor cost when collecting a resource.skill_dist(str, default"none"): Skill distribution for bonus collection probability.
Build (build.py)
Build (build.py)
Registered as
Build. Allows agents to spend 1 wood + 1 stone to place a house landmark, earning coin. Supports heterogeneous build skill. Key parameters:payment(int, default10): Base coin earned per house built.payment_max_skill_multiplier(int, default1): Upper bound on the skill multiplier.skill_dist(str, default"none"): Skill distribution for build income.build_labor(float, default10.0): Labor cost per build action.
ContinuousDoubleAuction (continuous_double_auction.py)
ContinuousDoubleAuction (continuous_double_auction.py)
Registered as
ContinuousDoubleAuction. Implements a commodity-exchange-style market where agents submit bids and asks for resources. Trades clear when a bid meets or exceeds an ask. Key parameters:max_bid_ask(int, default10): Maximum coin value for a bid or ask.order_labor(float, default0.25): Labor cost for placing an order.order_duration(int, default50): Timesteps before an unfilled order expires.max_num_orders(int, optional): Maximum open orders per resource per agent.
WealthRedistribution / PeriodicBracketTax (redistribution.py)
WealthRedistribution / PeriodicBracketTax (redistribution.py)
Two redistribution components are available:
WealthRedistribution: Passively divides total agent coin equally each step. No planner actions required.PeriodicBracketTax: The planner sets marginal tax bracket rates. Taxes are collected and redistributed as lump-sum payments at the end of each tax period.
WealthRedistribution must always be placed last in the component list.Key scenario parameters
TheUniform scenario (uniform/simple_wood_and_stone) exposes the following constructor arguments in addition to the base environment arguments.
Instantiating the environment
Observation space
Each mobile agent’s observation consists of:- A spatial tensor (egocentric or full-world view, depending on
full_observability) with channels for each resource type, agent locations, house locations, and water. - Inventory contents: current holdings of Wood, Stone, Coin, and Labor.
- Endogenous quantities: accumulated labor.
- A spatial tensor of the world (if
planner_gets_spatial_info=True). - The inventory of each mobile agent.
- Current tax rates (when using
PeriodicBracketTax).
Reward structure
Mobile agents receive isoelastic utility over coin minus a labor cost:u(coin) is the isoelastic function parameterized by isoelastic_eta.
The social planner receives one of three reward types (set via planner_reward_type):
Tutorials
Economic simulation (basic)
Interact with and visualize the simulation interactively in Colab.
Economic simulation (advanced)
Explore composable building blocks and custom scenario construction.
Optimal taxation
Use the simulation to study optimal tax policy design.
Multi-agent training with RLlib
Train agents with distributed RL using RLlib.