From 05549da0c17eecb542e4c30c2426b61add8fed6a Mon Sep 17 00:00:00 2001 From: Dustin Hendrickson Date: Thu, 20 Feb 2025 16:34:34 -0800 Subject: [PATCH] Readjusting the algo for distribution and player contribution --- src/mod-player-bot-level-brackets.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod-player-bot-level-brackets.cpp b/src/mod-player-bot-level-brackets.cpp index e9c19d6..32c388e 100644 --- a/src/mod-player-bot-level-brackets.cpp +++ b/src/mod-player-bot-level-brackets.cpp @@ -328,9 +328,9 @@ public: float hordeWeights[NUM_RANGES] = {0}; for (int i = 0; i < NUM_RANGES; ++i) { - allianceWeights[i] = baseline + g_RealPlayerWeight * log(1 + allianceRealCounts[i]); + allianceWeights[i] = baseline + g_RealPlayerWeight * (totalAllianceReal > 0 ? (1.0f / totalAllianceReal) : 1.0f) * log(1 + allianceRealCounts[i]); - hordeWeights[i] = baseline + g_RealPlayerWeight * log(1 + hordeRealCounts[i]); + hordeWeights[i] = baseline + g_RealPlayerWeight * (totalHordeReal > 0 ? (1.0f / totalHordeReal) : 1.0f) * log(1 + hordeRealCounts[i]); allianceTotalWeight += allianceWeights[i]; hordeTotalWeight += hordeWeights[i];