import ai_economist.foundation as foundation
env_config = {
"scenario_name": "one-step-economy",
# Must be 2: step 1 = tax setting, step 2 = labor choice
"episode_length": 2,
"n_agents": 10,
# Agent reward
"agent_reward_type": "coin_minus_labor_cost",
"labor_exponent": 2.0,
"labor_cost": 1.0,
# Planner reward
"planner_reward_type": "inv_income_weighted_utility",
# Components
"components": [
{"PeriodicBracketTax": {
"period": 1,
"bracket_spacing": "us-federal",
"usd_scaling": 1000.0,
"disable_taxes": False
}},
{"SimpleLabor": {
"mask_first_step": True,
"payment_max_skill_multiplier": 3,
"pareto_param": 4.0,
}},
],
}
env = foundation.make_env_instance(**env_config)
obs = env.reset()
# Step through one episode
done = False
while not done:
actions = {} # supply actions for each agent
obs, rewards, done, info = env.step(actions)