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

457 lines
10 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Concorrenti IA (ai.json)",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1
},
"planning": {
"type": "object",
"properties": {
"intervalDays": {
"type": "integer",
"minimum": 1
},
"maxCandidates": {
"type": "integer",
"minimum": 1
},
"maxProjectsPerMonth": {
"type": "integer",
"minimum": 1
},
"candidateMaxDistanceKm": {
"type": "number",
"exclusiveMinimum": 0
},
"candidateMinDistanceKm": {
"type": "number",
"minimum": 0
},
"pathSlopePenalty": {
"type": "number",
"minimum": 0
},
"pathWaterPenalty": {
"type": "number",
"minimum": 0
},
"steepPenalty": {
"type": "number",
"minimum": 0
},
"steepGradeFactor": {
"type": "number",
"exclusiveMinimum": 0
},
"pathMarginRetryKm": {
"type": "number",
"minimum": 0
},
"trainsPerLine": {
"type": "integer",
"minimum": 1
},
"wagonsPerTrain": {
"type": "integer",
"minimum": 1
},
"cashReserveMonths": {
"type": "number",
"minimum": 0
},
"revenueHorizonYears": {
"type": "number",
"exclusiveMinimum": 0
},
"maxRejectedShare": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"maxConcurrentProjects": {
"type": "integer",
"minimum": 1
},
"evaluateTop": {
"type": "integer",
"minimum": 1
},
"pathMarginKm": {
"type": "number",
"minimum": 0
},
"simplifyToleranceM": {
"type": "number",
"minimum": 0
},
"stationOffsetsM": {
"type": "array",
"minItems": 1,
"items": {
"type": "number",
"minimum": 0
}
},
"depotOffsetM": {
"type": "number",
"minimum": 0
},
"platforms": {
"type": "integer",
"minimum": 1
},
"hubPlatforms": {
"type": "integer",
"minimum": 1
},
"assumedEfficiency": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1
},
"speedFactor": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1
},
"dwellMinutes": {
"type": "number",
"minimum": 0
},
"maintenanceCostShare": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"trackUpkeepPerKmPerYear": {
"type": "integer",
"minimum": 0
},
"maxTrainsPerLine": {
"type": "integer",
"minimum": 1
},
"addTrainWaitingTrips": {
"type": "number",
"minimum": 0
},
"minCommuters": {
"type": "integer",
"minimum": 0
},
"commuterCoverage": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"hubShare": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"noPartsFactor": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"townBonus": {
"type": "number",
"minimum": 1,
"maximum": 10
},
"townRoiFactor": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1
},
"repayCashMonths": {
"type": "number",
"minimum": 0
},
"planningDaySpacing": {
"type": "integer",
"minimum": 0
},
"failedMemory": {
"type": "integer",
"minimum": 0
},
"partsDeferYears": {
"type": "number",
"minimum": 0,
"maximum": 10
}
},
"required": [
"intervalDays",
"maxCandidates",
"maxProjectsPerMonth",
"candidateMaxDistanceKm",
"candidateMinDistanceKm",
"pathSlopePenalty",
"pathWaterPenalty",
"steepPenalty",
"steepGradeFactor",
"pathMarginRetryKm",
"trainsPerLine",
"wagonsPerTrain",
"cashReserveMonths",
"revenueHorizonYears",
"maxRejectedShare",
"maxConcurrentProjects",
"evaluateTop",
"pathMarginKm",
"simplifyToleranceM",
"stationOffsetsM",
"depotOffsetM",
"platforms",
"hubPlatforms",
"assumedEfficiency",
"speedFactor",
"dwellMinutes",
"maintenanceCostShare",
"trackUpkeepPerKmPerYear",
"maxTrainsPerLine",
"addTrainWaitingTrips",
"minCommuters",
"commuterCoverage",
"hubShare",
"noPartsFactor",
"townBonus",
"townRoiFactor",
"repayCashMonths",
"planningDaySpacing",
"failedMemory",
"partsDeferYears"
],
"additionalProperties": false
},
"personalities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"roiThreshold": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"loanShareOfCredit": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"targetsPlayer": {
"type": "boolean"
},
"buysShares": {
"type": "boolean"
},
"maintenancePolicy": {
"type": "string",
"enum": [
"economy",
"standard",
"thorough"
]
}
},
"required": [
"id",
"name_it",
"roiThreshold",
"loanShareOfCredit",
"targetsPlayer",
"buysShares",
"maintenancePolicy"
],
"additionalProperties": false
},
"minItems": 3
},
"bots": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name_it": {
"type": "string",
"minLength": 1
},
"roiThreshold": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"loanShareOfCredit": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"targetsPlayer": {
"type": "boolean"
},
"buysShares": {
"type": "boolean"
},
"maintenancePolicy": {
"type": "string",
"enum": [
"economy",
"standard",
"thorough"
]
}
},
"required": [
"id",
"name_it",
"roiThreshold",
"loanShareOfCredit",
"targetsPlayer",
"buysShares",
"maintenancePolicy"
],
"additionalProperties": false
},
"minItems": 1
},
"companyNames": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 4,
"uniqueItems": true
},
"colors": {
"type": "array",
"items": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$"
},
"minItems": 1
},
"renewal": {
"type": "object",
"properties": {
"minSupersededYears": {
"type": "number",
"minimum": 0
},
"minAgeShareOfLife": {
"type": "number",
"minimum": 0
},
"cashReserveMultiple": {
"type": "number",
"minimum": 0
},
"maxTrainsPerMonth": {
"type": "integer",
"minimum": 0
}
},
"required": [
"minSupersededYears",
"minAgeShareOfLife",
"cashReserveMultiple",
"maxTrainsPerMonth"
],
"additionalProperties": false
},
"trading": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"minMargin": {
"type": "number",
"minimum": 0,
"maximum": 5
},
"priceSlack": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"minSellPriceShare": {
"type": "number",
"minimum": 0,
"maximum": 3
},
"maxUnits": {
"type": "integer",
"minimum": 1
},
"maxTradesPerMonth": {
"type": "integer",
"minimum": 0
},
"cashShare": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"cashReserveMultiple": {
"type": "number",
"minimum": 0
}
},
"required": [
"enabled",
"minMargin",
"priceSlack",
"minSellPriceShare",
"maxUnits",
"maxTradesPerMonth",
"cashShare",
"cashReserveMultiple"
],
"additionalProperties": false
},
"market": {
"type": "object",
"additionalProperties": {
"type": [
"number",
"integer",
"boolean"
]
}
}
},
"required": [
"version",
"planning",
"personalities",
"companyNames",
"colors",
"market",
"renewal",
"trading",
"bots"
],
"additionalProperties": false
}