Match Logging¶
When log_directory is set in ExperimentConfig, each match writes a {match_id}.json file containing every event.
Enabling¶
from pathlib import Path
config = ExperimentConfig(
game_id="ultimatum",
num_matches=10,
log_directory=Path("./logs"),
)
Log format¶
Each JSON file contains:
{
"match_id": "abc123...",
"game_id": "ultimatum",
"agent_ids": ["alice", "bob"],
"events": [
{
"event_type": "match_start",
"timestamp_ns": 1234567890,
"agent_id": null,
"data": {}
},
{
"event_type": "action",
"agent_id": "alice",
"data": {"action_type": "submit_offer", "payload": {"my_share": 60}, "ok": true}
}
],
"outcome": { ... },
"metadata": { ... }
}