summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-04-26 15:28:00 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-04-26 15:28:00 +0200
commit32aaabc36b2257856e6db0e2265830641ae3a325 (patch)
treedd6bb42082399c4295287ffbae21452c4c3e73fa
parent41fea0502fbfd720d4f3ae5fb8cd413966e0d52a (diff)
downloadshrinker-32aaabc36b2257856e6db0e2265830641ae3a325.tar.gz
shrinker-32aaabc36b2257856e6db0e2265830641ae3a325.zip
attempt to fix scoring
-rw-r--r--worker.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/worker.js b/worker.js
index ef2d416..d748a24 100644
--- a/worker.js
+++ b/worker.js
@@ -533,8 +533,11 @@ function flatten(obj) {
is_carry_score = -1.88524473 + (0.05593593 * participant.non_jungle_minion_kills) + (-0.0881661 * participant.jungle_kills), // about 90% accurate, trained on Hero.is_carry
is_jungle_score = -0.78327066 + (-0.03324596 * participant.non_jungle_minion_kills) + (0.10514832 * participant.jungle_kills), // about 88% accurate
scores = [is_captain_score, is_carry_score, is_jungle_score];
-
- return ["captain", "carry", "jungler"][scores.indexOf(Math.max(...scores))];
+ if (is_captain_score > is_carry_score && is_captain_score > is_jungle_score)
+ return "captain";
+ if (is_carry_score > is_jungle_score)
+ return "carry";
+ return "jungler";
}
})();