Tkd-Alex / Twitch-Channel-Points-Miner-v2

A simple script that will watch a stream for you and earn the channel points.
GNU General Public License v3.0
1.2k stars 635 forks source link

Alternate Smart Betting Strategy #229

Open Jaivantv opened 2 years ago

Jaivantv commented 2 years ago

When using the SMART strategy for betting, I found that I was losing frequently. I looked into it and I realised that the majority of the time the choice with the highest odds also had the highest votes, and so the if else condition always iterated to the same choice. This seems to be because more users bet smaller amounts for the choice with high odds, so that they can get a good payout on the off chance that they win, without risking much.

I'm not sure if taking bigger risks for more reward is the goal of this strategy and I have completely misunderstood it but I thought of a more safer strategy albeit remaining smart. The only change is to base the percentage difference on the odds instead of the users and to bet on the choice with higher percentage if the percentage difference is greater than the specified value. This means that when the majority of users are confident in betting more channel points we choose to go along with them and be safe. Risks are only taken and the higher odds are chosen as the bet when the difference is lower than the percentage difference of odds which signifies that nobody is confident about their prediction usually due to a random outcome. I achieved these by altering the following code for the smart strategy in Bet.py

https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/blob/40dcf78a7d9720b75c4c16810f122d36bb94e1d0/TwitchChannelPointsMiner/classes/entities/Bet.py#L242-L251

Altered Code:

elif self.settings.strategy == Strategy.SMART:
            difference = abs(
                self.outcomes[0][OutcomeKeys.ODDS_PERCENTAGE]
                - self.outcomes[1][OutcomeKeys.ODDS_PERCENTAGE]
            )
            self.decision["choice"] = (
                self.__return_choice(OutcomeKeys.ODDS)
                if difference < self.settings.percentage_gap
                else self.__return_choice(OutcomeKeys.ODDS_PERCENTAGE)
            )
Rakambda commented 2 years ago

As you seem to be able to modify the code you can actually make a PR for this and add a new strategy for it.

Jaivantv commented 2 years ago

As you seem to be able to modify the code you can actually make a PR for this and add a new strategy for it.

Thanks! Im new to github so I wasnt aware of the best way to approach this. Im able to modify the code only due to the pre-existing code available whereas adding a new strategy might be out of my coding capabilities. I will do some looking into it and maybe make a PR though.

ss2oo7 commented 2 years ago

Поскольку вы, кажется, можете изменить код, вы можете сделать PR для этого и добавить для него новую стратегию.

Спасибо! Я новичок в github, поэтому я не знал, как лучше всего подойти к этому. Я могу изменить код только из-за наличия уже существующего кода, тогда как добавление новой стратегии может быть вне моих возможностей кодирования. Я немного изучу это и, возможно, сделаю пиар.

i can help you, if you want

Jaivantv commented 2 years ago

Поскольку вы, кажется, можете изменить код, вы можете сделать PR для этого и добавить для него новую стратегию.

Спасибо! Я новичок в github, поэтому я не знал, как лучше всего подойти к этому. Я могу изменить код только из-за наличия уже существующего кода, тогда как добавление новой стратегии может быть вне моих возможностей кодирования. Я немного изучу это и, возможно, сделаю пиар.

i can help you, if you want

Sure!