malkhut(e2e): 100-opponent swarm + empty book fix + error handling
- 100 diverse opponents (randomized params within each type) - Risk gate: empty book guard in _post_only_would_cross - CMA-ES: only every 5 cycles, 3 evals, robust error handling - Main loop: try/except prevents silent crashes - Profiling: 11.7 steps/sec with 100 opponents
This commit is contained in:
@@ -147,6 +147,8 @@ class RiskGate:
|
||||
price = materialize_price_from_action(state, action)
|
||||
if price is None:
|
||||
return False
|
||||
if not state.book.bids or not state.book.asks:
|
||||
return False
|
||||
if action.side == Side.BUY and price >= state.book.best_ask:
|
||||
return True
|
||||
if action.side == Side.SELL and price <= state.book.best_bid:
|
||||
|
||||
Reference in New Issue
Block a user