Twitch-Channel-Points-Miner-v2 icon indicating copy to clipboard operation
Twitch-Channel-Points-Miner-v2 copied to clipboard

Add SMART_HIGH_ODDS strategy

Open 1v opened this issue 3 years ago • 43 comments

Description

Adds new strategy.

Type of change

  • [x] Breaking change (fix or feature that would cause existing functionality not to work as expected)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my code
  • [x] I have commented on my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation (README.md)
  • [x] My changes generate no new warnings
  • [x] Any dependent changes have been updated in requirements.txt

1v avatar May 06 '21 15:05 1v

@1v Please review your code

Tkd-Alex avatar May 23 '21 13:05 Tkd-Alex

It probably requires refactoring. I have zero experience with python, learning on this repo.

1v avatar May 23 '21 17:05 1v

I also made stats console output.

image Worth adding pull request?

1v avatar May 24 '21 00:05 1v

Hi! @1v Have you timed to finish this PR? Don't worry about the check fails, I can review later if you want :) If you want to learn, please read https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/blob/master/CONTRIBUTING.md

Tkd-Alex avatar Aug 16 '21 20:08 Tkd-Alex

Hi @Tkd-Alex. What I need to do? I think what currently in PR is ok. But honestly I think Bet class should be refactored. I'm adding target_odd strategy specific setting to common settings, that's feels not right. I think strategies should be moved from Bet class. skip and calculate methods should be moved to main strategy class. Other strategies should inherit main strategy class. skip and calculate methods in strategy specific class should be possible to be partially adjusted or completely replaced. There should be possibility to add strategy specific settings.

1v avatar Aug 17 '21 16:08 1v

Yup, convert Strategy Enum to a custom class could be an idea of refactory. The new SMART_HIGH_ODDS strategy It's the only one that need additional parameters?

Tkd-Alex avatar Aug 17 '21 20:08 Tkd-Alex

SMART strategy also has percentage_gap.

1v avatar Aug 18 '21 10:08 1v

@Tkd-Alex I'm currently refactoring and it looks good to me. Also adding tests.

1v avatar Oct 06 '21 21:10 1v

@1v Is this still working fine for you? I don't seem to get it working correctly.

castrosu avatar Dec 24 '21 03:12 castrosu

Works multiple months in a row.

1v avatar Dec 24 '21 03:12 1v

Probably it's missing the last features

Tkd-Alex avatar Dec 24 '21 10:12 Tkd-Alex

Will try updating and come back with an update for u guys. Merry Christmas everyone.

castrosu avatar Dec 24 '21 12:12 castrosu

I get this error when trying to use "bet=BetSettings( strategy=Strategy.SMART_HIGH_ODDS," TypeError: __init__() got an unexpected keyword argument 'percentage_gap' is this normal?

got it fixed by adding this code to init.py in the TwitchChannelPointsMiner folder.

-- coding: utf-8 --

version = "2.7.2" from .TwitchChannelPointsMiner import TwitchChannelPointsMiner

all = [ "TwitchChannelPointsMiner", ]

castrosu avatar Dec 24 '21 20:12 castrosu

percentage_gap is moved to strategy_settings

https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/pull/172/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L225-R238

1v avatar Dec 25 '21 06:12 1v

@1v Hey regarding this can you tell me how do i implement this, i can't find place where i can download and also should i change any of settings or its fine out of the box?

Glass47 avatar May 30 '22 16:05 Glass47

@Glass47 clone my repo https://github.com/1v/Twitch-Channel-Points-Miner-v2 and then checkout branch smart_high_odds. Setup should be same as this (main) repo.

1v avatar May 30 '22 17:05 1v

@Glass47 clone my repo https://github.com/1v/Twitch-Channel-Points-Miner-v2 and then checkout branch smart_high_odds. Setup should be same as this (main) repo.

Thank you for reply and answer @1v Do you maybe have statistics of what strategy was best from your testing? Did you test multiple options with "default" options and then compared with yours? Or? If you have any screenshots to share feel free i will appreciate. It would be a bit pain in the ass to test it again myself because i get confused with all these options, WAYTOODANK 😂.

Btw im having hard time figuring this out and its frustrating the hell outta me because i can't even google it since i dont know proper terms, can you please just send me code i will paste it and make it .py with my login info.. Or if you can send me link what i need to download extra and where to put it, i dont know and thats why i hate programming its such frustrating thing that i always lose my nerves on

Glass47 avatar May 30 '22 19:05 Glass47

@Glass47 I have ruby script that calculates optimal settings for strategy based on previous bets. It calculates minimal odd and maximum amount to bet. Always doubt (there is setting), never believe. You should setup script yourself and learn how to do it. Knowing basic programming is required for using this script.

1v avatar May 31 '22 12:05 1v

@Glass47 I have ruby script that calculates optimal settings for strategy based on previous bets. It calculates minimal odd and maximum amount to bet. Always doubt (there is setting), never believe. You should setup script yourself and learn how to do it. Knowing basic programming is required for using this script.

I have some basic understanding and i am running it however the problem is that i don't know what is branch. Do i need to download any extra files from branch or what, i downloaded your fork but im still confused, or if you can give me some youtube/site to educate. There is no "smart_high_odds" option. What am i missing? Please help me image

Glass47 avatar Jun 01 '22 04:06 Glass47

git clone https://github.com/1v/Twitch-Channel-Points-Miner-v2.git git checkout smart_high_odds

1v avatar Jun 01 '22 08:06 1v

git clone https://github.com/1v/Twitch-Channel-Points-Miner-v2.git git checkout smart_high_odds

After doing it now it's blanked white, why? image

Glass47 avatar Jun 01 '22 19:06 Glass47

That's your IDE, code is fine. Check readme for settings https://github.com/1v/Twitch-Channel-Points-Miner-v2/tree/smart_high_odds#settings it's updated.

1v avatar Jun 01 '22 19:06 1v

help me pls on heroku image

taurynamonsterxdd avatar Aug 08 '22 22:08 taurynamonsterxdd

Hi, is it possible to implement the TwitchLogin like in the Main repo? I cant log in with the Login in 1v:smart_high_odds. I would like to Test the SMART_HIGH_ODDS feature and give feedback :)

FirstThread avatar Jan 29 '23 22:01 FirstThread

@FirstThread hi, can you login with main repo? I guess predictions is not working in main repo. I tried fork but I failed to install chrome executables. So I don't run this script anymore, but it should work if you manage to make predictions work, because tests are passing.

1v avatar Jan 30 '23 07:01 1v

Hi, yes i can login with the main repo and predictions are working fine:

30/01/23 10:21:44 - INFO - [on_message]: ⏰ Place the bet after: 89.99s for: EventPrediction(event_id=77f4f9c7-0b0f-4e11-acd0-cf4ab429af67, streamer=Streamer(username=rax1337, channel_id=28213443, channel_points=13.66k), title=Das nächste Match wird?) 30/01/23 10:23:14 - INFO - [make_predictions]: 🍀 Going to complete bet for EventPrediction(event_id=77f4f9c7-0b0f-4e11-acd0-cf4ab429af67, streamer=Streamer(username=rax1337, channel_id=28213443, channel_points=13.66k), title=Das nächste Match wird?) 30/01/23 10:23:14 - INFO - [make_predictions]: 🍀 Place 1.37k channel points on: Gewonnen (BLUE), Points: 184k, Users: 26 (68.42%), Odds: 1.42 (70.42%)

The only problem is that I can't log in to your version with SMART_HIGH_ODDS. Is it possible to do the registration like in the main repo with https://www.twitch.tv/activate?

FirstThread avatar Jan 30 '23 09:01 FirstThread

But is it really placing the bet?

1v avatar Jan 30 '23 10:01 1v

image It is

FirstThread avatar Jan 30 '23 10:01 FirstThread

yes i can login with the main repo and predictions are working fine

How do you logged in? I tried clean install and I get:

30/01/23 13:39:34 - ERROR - [login_flow]: Unknown error: {'error': 'Please update your app to continue', 'error_code': 5023, 'error_description': 'client is not supported for this feature'}

1v avatar Jan 30 '23 10:01 1v

I'll Reinstall this evening and i'll send you all the steps i did.

FirstThread avatar Jan 30 '23 13:01 FirstThread