Files
Alby96andClaude Opus 5.5 b0191e4b93
CI / Build e test (pull_request) Successful in 1m39s
CI / Immagine Docker (pull_request) Successful in 31s
F6: bilanciamento, correzioni della revisione
Misure del banco corrette (ADR 0025, «Correzioni della revisione»):
- O8: «trasformatori che vendono» = vendite nell'ultimo trimestre, non
  RevenueEma > 0 (la media mobile non torna a zero e contava impianti fermi
  da anni). Misurato bene il margine è positivo nel 62 % dei mesi dopo la
  taratura contro il 75 % di prima: la conclusione «logistica, non prezzo»
  non reggeva.
- O6 per partita e bene; O7 per difficoltà con la fascia allargata dalla
  volatilità del preset; O3–O5 solo sulle partite in cui il bot costruisce
  (O3 «non valutabile» se in una difficoltà non costruisce mai); O11 sulle
  IA presenti al 3° anno; O12 con gli interessi di dicembre (anno campionato
  dopo la chiusura); obiettivi del mondo su una partita per seme e
  difficoltà; mediana sui due valori centrali con un numero pari di semi.
- Verifica sui semi 4–9, mai usati nella taratura: O1 non tiene (livello 2
  al 4° anno in 3 semi su 6), O11 sì. Il test lento usa i semi 4–9.

Agente:
- il blocco in attesa della linea dei ricambi ferma solo le reti nuove e
  al più per partsDeferYears dall'apertura della rete;
- la linea dei ricambi si rimanda solo se l'utile la ripaga prima che
  finisca la dotazione del deposito (stimata dai tagliandi): con la regola
  di prima il bot competente falliva nel seme 9 di «Imprenditore»;
- il budget della compravendita vale per tutti gli affari del mese.
Una soglia minima al tasso dei prestiti per le linee urbane è stata provata
e scartata (O1 cade sul seme 3): motivazione nell'ADR.

Dati: limiti espliciti negli schemi per ai.json → planning e
balance.json → market.world, più due controlli del validatore.
Test: determinismo con più mondi in parallelo (anche con compravendita),
limiti degli schemi. ADR e STATE: 24 esecuzioni (non 72), tempi, legame
non monotono tra elasticità e accettazione F4 (un'unità di margine), tabella
prima / dopo / verifica rifatta con le misure nuove.

Matrice predefinita: 7 su 13 obiettivi (prima della taratura 4 su 13);
semi 4–9: 7 su 13. 244 test verdi (222 senza i lenti), client compilato.

Refs #47.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 18:00:11 +01:00

577 lines
12 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Bilanciamento (balance.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"time": {
"type": "object",
"properties": {
"tickMs": {
"type": "integer",
"minimum": 1
},
"ticksPerDay": {
"type": "integer",
"minimum": 1
},
"daysPerMonth": {
"type": "integer",
"minimum": 1
},
"monthsPerYear": {
"type": "integer",
"minimum": 1
},
"trainClockFactor": {
"type": "number",
"minimum": 1
},
"speeds": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 64
},
"minItems": 1
},
"defaultStartYear": {
"type": "integer",
"minimum": 1800,
"maximum": 2300
}
},
"required": [
"tickMs",
"ticksPerDay",
"daysPerMonth",
"monthsPerYear",
"trainClockFactor",
"speeds",
"defaultStartYear"
],
"additionalProperties": false
},
"map": {
"type": "object",
"properties": {
"cellSizeM": {
"type": "number",
"minimum": 1
},
"sizesKm": {
"type": "array",
"items": {
"type": "integer",
"minimum": 8,
"maximum": 1024
},
"minItems": 1
},
"chunkCells": {
"type": "integer",
"minimum": 8,
"maximum": 256
},
"maxElevationM": {
"type": "number",
"minimum": 100
},
"noise": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"relief": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"hydrology": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"cover": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"deposits": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"towns": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"industries": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"hubs": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
}
},
"required": [
"cellSizeM",
"sizesKm",
"chunkCells",
"maxElevationM",
"noise",
"relief",
"hydrology",
"cover",
"deposits",
"towns",
"industries",
"hubs"
],
"additionalProperties": false
},
"market": {
"type": "object",
"properties": {
"k": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"alpha": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"windowDays": {
"type": "integer",
"minimum": 1
},
"minPriceFactor": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"maxPriceFactor": {
"type": "number",
"minimum": 1
},
"ratioMin": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"ratioMax": {
"type": "number",
"minimum": 1
},
"world": {
"type": "object",
"properties": {
"amplitude": {
"type": "number",
"minimum": 0,
"maximum": 0.5
},
"periodYears": {
"type": "number",
"exclusiveMinimum": 0
},
"volumeShare": {
"type": "number",
"minimum": 0,
"maximum": 10
},
"baselinePerDay": {
"type": "number",
"minimum": 0
},
"elasticity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 10
},
"shockChancePerYear": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"shockMin": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"shockMax": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"shockDecayDays": {
"type": "number",
"exclusiveMinimum": 0
},
"priceFloor": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"amplitude",
"periodYears",
"volumeShare",
"baselinePerDay",
"elasticity",
"shockChancePerYear",
"shockMin",
"shockMax",
"shockDecayDays",
"priceFloor"
],
"additionalProperties": false
},
"historyDays": {
"type": "integer",
"minimum": 1
},
"outlook": {
"type": "object",
"properties": {
"historyMonths": {
"type": "integer",
"minimum": 1
},
"changeDays": {
"type": "integer",
"minimum": 1
},
"forecastMonths": {
"type": "integer",
"minimum": 0,
"maximum": 24
},
"forecastBandPerMonth": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"sellPlaces": {
"type": "integer",
"minimum": 1,
"maximum": 20
},
"eventThreshold": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"historyMonths",
"changeDays",
"forecastMonths",
"forecastBandPerMonth",
"sellPlaces",
"eventThreshold"
],
"additionalProperties": false
}
},
"required": [
"k",
"alpha",
"windowDays",
"minPriceFactor",
"maxPriceFactor",
"ratioMin",
"ratioMax",
"world",
"historyDays",
"outlook"
],
"additionalProperties": false
},
"localPrice": {
"type": "object",
"properties": {
"lambda": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"maxDeviation": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"epsilon": {
"type": "number",
"minimum": 0
}
},
"required": [
"lambda",
"maxDeviation",
"epsilon"
],
"additionalProperties": false
},
"trading": {
"type": "object",
"properties": {
"warehouseCapacity": {
"type": "integer",
"minimum": 1
},
"storageCostPerUnitPerMonth": {
"type": "integer",
"minimum": 0
}
},
"required": [
"warehouseCapacity",
"storageCostPerUnitPerMonth"
],
"additionalProperties": false
},
"industry": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"growth": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"town": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"migration": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"employment": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"localTransport": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"hubs": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"tariffs": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"finance": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"stockMarket": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
},
"industryMaintenance": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean",
"array",
"object",
"string"
]
}
}
},
"required": [
"version",
"time",
"map",
"market",
"localPrice",
"trading",
"industry",
"growth",
"town",
"migration",
"employment",
"localTransport",
"hubs",
"tariffs",
"finance",
"stockMarket",
"industryMaintenance"
],
"additionalProperties": false
}