chore: bug fixes

This commit is contained in:
2026-01-31 10:13:07 +01:00
parent 2f481bd94b
commit 13959e4b28
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ class MarketEngine():
def act(self, prices):
demand = generate_demand(prices, *self.demand)
sample_n = lambda n, human: [sample_behavior(demand, human=human) for _ in range(n)]
human_t, agent_t = sample_n(100, True), sample_n(100, False)
human_t, agent_t = sample_n(self.Nhumans, True), sample_n(self.Nagents, False)
trajectories = human_t + agent_t
demand_estimate = estimate_demand(trajectories)
return demand_estimate

View File

@@ -56,7 +56,7 @@ def run_single(cfg: dict) -> dict:
"id": cfg["id"],
"config": cfg,
"total_reward": total_reward,
"avg_reward": total_reward / steps,
"avg_reward": total_reward / steps if steps > 0 else 0.0,
"steps": steps,
}