{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://magic-civilization/schemas/autoplay-result.json", "title": "AutoPlay Result", "description": "Per-game result file emitted by src/game/engine/scenes/tests/auto_play.gd every turn and at exit.", "type": "object", "additionalProperties": false, "required": [ "seed", "turns_played", "outcome", "winner_index", "victory_type", "wall_clock_sec", "aggregate", "player_stats", "invariant_violations" ], "properties": { "seed": { "type": "integer", "minimum": 0 }, "turns_played": { "type": "integer", "minimum": 0 }, "outcome": { "type": "string", "enum": ["in_progress", "victory", "max_turns", "defeat"] }, "winner_index": { "type": "integer", "minimum": -1 }, "victory_type": { "type": "string" }, "wall_clock_sec": { "type": "number", "minimum": 0 }, "aggregate": { "type": "object", "additionalProperties": false, "required": [ "total_combats", "total_cities_founded", "total_cities_captured", "turn_first_combat", "turn_first_city_captured" ], "properties": { "total_combats": { "type": "integer", "minimum": 0 }, "total_cities_founded": { "type": "integer", "minimum": 0 }, "total_cities_captured": { "type": "integer", "minimum": 0 }, "turn_first_combat": { "type": "integer", "minimum": -1, "description": "-1 if no combat yet" }, "turn_first_city_captured": { "type": "integer", "minimum": -1 } } }, "player_stats": { "type": "object", "description": "Map of player_index (as string) to per-player stats. Rewritten every turn — not final until outcome != 'in_progress'.", "propertyNames": { "pattern": "^[0-9]+$" }, "additionalProperties": { "$ref": "#/definitions/player_stats" } }, "invariant_violations": { "type": "array", "items": { "type": "string" } } }, "definitions": { "player_stats": { "type": "object", "additionalProperties": false, "required": [ "pop", "pop_peak", "mil", "cities", "cities_captured", "cities_lost", "gold", "gold_peak", "gold_per_turn", "techs", "tiles", "buildings", "happiness", "food_total", "production_total", "kills", "units_lost", "turn_first_pop_3", "turn_first_pop_4" ], "properties": { "pop": { "type": "integer", "minimum": 0 }, "pop_peak": { "type": "integer", "minimum": 0 }, "mil": { "type": "integer", "minimum": 0 }, "cities": { "type": "integer", "minimum": 0 }, "cities_captured": { "type": "integer", "minimum": 0 }, "cities_lost": { "type": "integer", "minimum": 0 }, "gold": { "type": "integer" }, "gold_peak": { "type": "integer" }, "gold_per_turn": { "type": "integer" }, "techs": { "type": "integer", "minimum": 0 }, "tiles": { "type": "integer", "minimum": 0 }, "buildings": { "type": "integer", "minimum": 0 }, "happiness": { "type": "integer" }, "food_total": { "type": "number" }, "production_total": { "type": "number" }, "kills": { "type": "integer", "minimum": 0 }, "units_lost": { "type": "integer", "minimum": 0 }, "turn_first_pop_3": { "type": "integer", "minimum": -1 }, "turn_first_pop_4": { "type": "integer", "minimum": -1 } } } } }