feat(games): sessione 2 del gioco Blind Traders su timing diversi (30m/2h/4h)

- engine: resampling (_RESAMPLE) per 30m/2h/4h/1d + TF_BPM esteso -> nuovi timing.
- arena/run_game: TIMEFRAMES estesi, out_name e GAME_SPECS_DIR/GAME_OUT parametrizzati
  (game 1 non sovrascritto).
- Risultato: 10 finalisti tutti 30m pairs ETH/BTC (vincitore #36: OOS Sh 12.3, 43 tr/mese).
  La regola >=10 trade/mese filtra i tf lunghi (4h: 4/33 qualificati). Conferma la
  frontiera frequenza-vs-edge. Diario 2026-06-09-blind-traders-game2.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Adriano Dal Pastro
2026-06-09 13:01:34 +00:00
parent abc1c1cb80
commit d3dab57532
5 changed files with 74 additions and 9 deletions
+4 -3
View File
@@ -44,7 +44,7 @@ SPACE = {
}
SINGLE_FAMILIES = ["zscore", "breakout", "ma_cross", "rsi", "momentum"]
DIRECTIONS = ["reversion", "trend"]
TIMEFRAMES = ["1h", "15m", "5m"] # timing diversi su cui competono gli agenti
TIMEFRAMES = ["5m", "15m", "30m", "1h", "2h", "4h", "1d"] # tutti i timing validi
def _rand_param(rng, lo, hi, typ):
@@ -143,7 +143,8 @@ class Agent:
def run_tournament(specs, briefs=None, seed=7,
epochs=90, cull_every=10, cull_n=10, log=print):
epochs=90, cull_every=10, cull_n=10, log=print,
out_name="tournament_result.json"):
rng = random.Random(seed)
# carica solo i timeframe effettivamente usati dagli agenti
used_tfs = sorted({_normalize(s).get("tf", "1h") for s in specs})
@@ -204,7 +205,7 @@ def run_tournament(specs, briefs=None, seed=7,
"survivors": len(survivors), "results": results,
"history": history,
"reveal": {"A": "BTC", "B": "ETH", "tf": "1h"}}
(OUT / "tournament_result.json").write_text(json.dumps(payload, indent=2))
(OUT / out_name).write_text(json.dumps(payload, indent=2))
return payload