Fix sym shadowing warnings + coherent softmax gating

- Rename Init() param sym -> symName in IAgent base and overrides
  (MAAgent, MomentumAgent, RegimeADX) to stop hiding the global sym.
- Softmax gating: derive temperature from dispersion of the competence
  weights ws[] (the same quantity the softmax weights), not from the
  variance of signals zs[]; skip disabled agents in the normalization.
- Use |rho| (with weightMin floor) as competence and sign-flip
  anti-correlated agents instead of zeroing them, so rho<0 information
  is used (inverted) rather than discarded.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Pietro Giacobazzi
2026-06-14 18:20:19 +00:00
co-authored by Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 3256ebb5c6
commit a8b4a7d3ff
5 changed files with 37 additions and 24 deletions
@@ -39,8 +39,8 @@ public:
momHandle(INVALID_HANDLE), lastMomPeriod(0),
lastZ1(0), lastZ2(0), momCorr(0.1, 5), accelCorr(0.1, 5) { signalStats.SetR(2.0); }
void Init(string sym, ENUM_TIMEFRAMES tf) override {
IAgent::Init(sym, tf);
void Init(string symName, ENUM_TIMEFRAMES tf) override {
IAgent::Init(symName, tf);
momHandle = INVALID_HANDLE;
lastMomPeriod = 0;
}