Files
foxhunt/crates/common
jgrusewski 864cf8690d fix(dqn,ppo): prevent 45-action collapse with entropy, exploration, and monitoring fixes
DQN: wire SAC-style entropy regularizer into TD loss, fix diversity
penalty normalization from ln(3) to ln(45), add epsilon floor (0.05)
for noisy nets, enable sigma scheduling (0.8→0.4 with 0.3 floor),
add UCB count-based exploration bonus, expand hyperopt search space
from 43D to 45D.

PPO: replace fabricated entropy metric (value_loss×0.5) with real
Shannon entropy from action distribution, fix EntropyRegularizer
normalization from ln(3) to ln(45), implement Monte Carlo entropy
estimate for flow policy (was returning zeros), fix hyperopt VRAM
bound from 3 to 45 actions.

Monitoring: add normalized action entropy and diversity Prometheus
gauges, add exploration diagnostics logging per epoch.

2503 ml tests pass, 277 common tests pass, 0 clippy warnings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 02:04:22 +01:00
..

common

Shared types, error handling, and utilities for the Foxhunt HFT ecosystem.

Key Types

  • FoxhuntError — unified error enum with Result alias
  • ModelType — canonical ML model enum (10 primary variants)
  • CircuitBreakerTrait — async circuit breaker interface
  • TlsProtocolVersion, ClientIdentity — TLS configuration types
  • Market data types (Tick, OrderBook) and order types (LimitOrder, MarketOrder)

Modules

  • model_types — canonical ModelType enum re-exported by ml/ and model_loader/
  • resilienceCircuitBreakerTrait async trait
  • tls — TLS types and configuration
  • questdb — QuestDB client configuration

Usage

use common::{FoxhuntError, ModelType};