The idea on replay that took my nights

Hello, I’m in a multimedia internship and my schedule is not very busy so I have time to play poker and in order to pass the time in confinement I have been walking around the console of replay tables, yes it’s strange but I love to watch how it is done inside :blue_heart:

Anyway, when I’m not playing I’m digging around a bit to understand how this or that thing works.

At the moment a project that is close to my heart is to try to develop a feature to switch from chips to blinds regardless of the type of table (ring-game, tournaments, sit and go, private tables etc…), an idea that I’m not inventing since it exists on many poker sites.
By the way, this ambition follows this topic, go on it’ s really short :+1: :

For example if you have a stack of 10k on the table at blinds 300/600 this feature will show you 16BB instead of 10,000.

Thanks to my work in the console I was able to start writing my first lines of code.
After a few nights I was able to extract the big blind value from ring tables, then the blinds from tournament tables which are constantly rising, and if you know the value of the big blind you are 50% done.
Then I converted the players’ stacks and bet sizes into blinds, which I thought would be super easy because it’s only one division, but it actually took me 2 weeks :scream:

  • Standard table before :

  • Table after :

  • By the way here is a tournament table with antes in the middle :

The thing I’m having a hard time with is being able to bet in blinds and not in chips : say blinds are 100/200 I would like to make it so that if you bet 2.0 for example, it bets 400, and I just can’t do it.
So what I have developed is limited to informing you of your stack in blinds and your opponents stack (and their blind bet sizes) which is not bad.

What I’m working on now is a button to switch from chips to blinds and from blinds to chips because right now it’s impossible to go back without reloading the table.

Also, I still have to convert the pot into blinds which I forgot to do but it will be quick.

As for the use of such a feature, well I hope I’m not teaching you anything by saying that a big part of poker strategy is based on blinds.
In short, I would need (and I’m not the only one) to know in real time the stack in blinds of my opponents rather than calculating it each time in my head, and when there are 9 people at the table it’s time consuming and tiring, it’s useless to know that your opponent has 3,750,999,999,999,999 chips at the table, what will always be useful is his real depth in blinds.

As for the use of this tool, it’s pretty boring:
Indeed for the moment it is necessary to go into the console and copy and paste my program, so it is rather annoying in tournaments because on average we switch 2 to 3 times of table and we have to put the program each time you leave your table.
In ring game on the other hand it’s not very disturbing (except if you play 5 minutes sessions) because in general we stay more than 30 minutes at the tables and there it’s up to you to leave

Maybe I’ll have to put this in the form of a downloadable extension that injects the code directly into the console so that we don’t have to do anything but it won’t be for a while because I’ll have to learn how to do it.

  • Here is the visualization of my code, not very practical to copy and paste :

  • So I put it on one line to make it lighter :thought_balloon: :

For those who want to test my program in its current state here is the text file to copy and paste into the console (and which will retrieve all your bank data by the way :ok_hand: ) :

oneLine chips2BB.txt (3.2 KB)

Please note that in its current state when using this program you have to reload your table to get back into chips, so for now I must admit that it is more fun than useful.
On my side this program works perfectly but I would like to know if it works well for other people :thinking:, don’t hesitate to send me your feedback.

5 Likes

This is awesome. It worked for me in Firefox.

It seems to work in ring games but doesn’t show the correct balances in tournies

1 Like

thank you so much i just found the error and corrected it, i had exactly the same problem as you when i participated in a tournament.

I will put the new code available for download tonight because I am playing :upside_down_face:

1 Like

I don’t have time to play so I can’t test this for now but I certainly appreciate the work that you have put in and yes, it will be very useful.

When you have finished polishing this script, will it be possible to implement it as a plug-in?

Regards,
TA

1 Like

Yes ideally if I managed to put my final program in the form of a plugin it would be great that’s exactly what I want !

Unfortunately for the problem in MTT I solved it at 90% and it is not in my habit to post something incorrect, I still put the code almost solved but which will occasionally make an error in tournaments :

oneLine chips2BB.txt (3.6 KB)

I will come back as soon as possible in a few days to add features and completely resolve the issue :+1:

2 Likes

Please continue with your work … there is another application that somebody else is interested in that also involves harvesting data.

I am happy to be more explicit in due course but I really don’t think that you should be thinking further ahead than completing this project according to your requirements. As I said, when I start playing again, what you have done so far is sufficient for me. There is always going to be “… but more …” :slight_smile:

Again, all I can do is thank you and encourage you in your work.

Very Kind Regards,
TA

That’s some fantastic work. I wish I had the knowledge to write code like that. :+1:t2: Keep going.

1 Like

Update 1 :

  • Fixed issue with displaying blinds in tournaments
  • Displaying the pot in blinds in real time

I find it laborious to put the new text file each time so I will make it available for download when I add a big new feature :partying_face:

Thanks for all the support !

1 Like

I just noticed that replay doesn’t calculate the antes in the total pot calculation preflop :thinking:
If you look at the previous picture the total pot is 3.5+3.5+1=8.0 BB + 0.6 BB of antes = 8.6 BB and the pot displayed is 8.0BB (I checked without activating my code and indeed it’s replay)

well I’ll take a look at it to improve it :ok_hand:

2 Likes

Very techy for me but WOW…I think you know alittle about this stuff, keep up the good work!

1 Like

I wonder if you are allowing for the rake in your code?

Obviously not an issue in MTTs but that would certainly affect your calculations in ring games.

Regards,
TA

Actually I don’t calculate much :rofl:
Let’s take a 100k/200k table with a 5000 rake, replay automatically takes this amount from the middle of the table and I get the total amount and convert it into blinds.

However, for the total pot amount at the top replay does not take into account the rake and preflop antes, by extension: so do I :face_with_raised_eyebrow:

For the preflop antes it’s clearly a problem but for the rake replay did it voluntarily (I think) for a reason I don’t know and I don’t find it disturbing, what do you think? I could look into it if you think it’s worth it.

If I consider that all the amounts calculated by replay suit me I keep them in memory by letting replay calculate them for me, then I convert them every X(which I choose according to the importance of the value) milliseconds into blinds, this is how my program works.
However, for the total pot amount at the top of the table, this will eventually be the only data I will have to recalculate because I think that this amount lacks precision (especially for the antes :point_up:).

To answer your question, as it is, I copy all the replay values without recalculating them, which means that where replay takes the rake into account, so do I automatically, so I still have to recalculate the total pot at the top to adapt it to my requirements and to yours because people’s opinions count

Now you know a little better how my program works :slightly_smiling_face:

I just tested and taking into account the rake in my code will not be useful since it is so small that the amount in blinds will always remain rounded up :partying_face:

You’ll notice in the console some values flashing in purple just above my arrows, in fact these are the famous amounts I was talking about that update every X milliseconds, and just below I have constant access to the chip value to keep them in memory in real time and convert them into blinds.

Thanks for the detailed replies!

I agree with your conclusions and I love your approach of letting RP do the calculations. I also agree that if allowing for rake doesn’t have a usable effect, the calculation is not worth doing!

You are obviously very close to nailing this thing - what a great effort and very, very much appreciated!

Regards,
TA

1 Like

update 2 :

  • conversion feature to switch into chips or blinds at any time

a final tournament heads up

a 6 max ring table

:partying_face: :partying_face: :partying_face: :partying_face:

here is the code to copy and paste in the console of your tables, don’t hesitate to test, I will need feedback especially for the possible bugs

oneLine chips2BB.txt (7.8 KB)

As for the remaining work, in order of my priorities :

  • 1. Optimize my code - super easy :last_quarter_moon: :new_moon: :new_moon: :new_moon: :new_moon:
  • 2. Create a plugin from my program - hard :full_moon: :full_moon: :full_moon: :new_moon: :new_moon:
  • 3. Take into account the antes for the total pot - easy :full_moon: :last_quarter_moon: :new_moon: :new_moon: :new_moon:
  • 4. Be able to bet in blinds - extremely hard :full_moon: :full_moon: :full_moon: :full_moon: :full_moon:
1 Like

Looks pretty good. If I was making it I would put bets in terms of BB as the top priority. I think 1-3 are nice-to-haves, I myself don’t mind manually running the JS code in the console to have this feature. IMO not having to mentally map BB back to chips for the bet is better than having all of 1-3.

But this is excellent and inspired work. I look forward to seeing more developments.

1 Like

You’re still doing really well!

I’d be tempted to tackle number 4 first as well but not directly for the utility, more to leave yourself something to “play” with as you get stuck with the implementation. One day, when things grind to a complete halt on the betting code, taking a break by tackling something easy like 1 or 3 is keeping you in touch with the programme, maintaining your interest, and gives you a bit of a reward for the effort that you’ve been putting into the betting code.

It’s not impossible that working on something “easy” in the code will let the rest of your mind wander off and seek solutions to whatever problem you’re having with the betting code.

You may also want to look at the bankroll plugin that moofish developed quite some time ago. That may give you some hints regarding how to implement your code as a plugin. Who knows what other nuggets of goodness you will find as well :slight_smile:

A link to the source code is provided in the description.

Regards,
TA

I understand you are doing an internship with a company at the moment. I think what you’re doing is brilliant for the community here. Please keep challenging yourself and I have no doubt in the future we will be calling you professor :+1:t2: Thank you for your work

Good work.

Can you get the source code in readable form. I get something like this if I open the file with notepad.

Making an extension in this case. which only involves content script ,is fairly straight forward once you learn how to do it. If background and interface scripts are involved it gets complicated. You need three things to make the extension:

  1. Manifest.json something like this:

    {
    "manifest_version": 2,

    "name": "Replay chips to BB",
    "description": "Displays stack in terms of BB",
    "version": "1.0",
    
     "browser_action": {
        "default_icon": "oneLine chips2BB.png",
        "default_title": "Replay chips to BB"
     },
     "content_scripts": [
       {
          "matches" : ["https://replaypoker.com/play/table/*",
                       "https://replaypoker.com/play/tournament/*/table/*"],
          "js"      : ["oneLine chips2BB.txt"]
       }
     ]
    

    }

  2. Small png file to give an icon to the extension.

  3. Source code.

Put all three of them in a directory, note .png and source code should have the name as given in the manifest.json. Go to chrome://extensions/ . Click on the ‘Developer Mode’ on the top right hand corner. This will open ‘Load unpacked’ option on the top left. Click on it and select the directory you have placed the files.

It will create the extension, you will find the extension in alphabetical order. And its all set. You can pin it using extension icon on top left of the browser if you want it to be visible, like any other extension.

You can go to any game table and see the button and code automatically loaded.

One thing is needed in the extension though. Extension has to wait for the page to completely load. Otherwise it will error out I have made a small tweak to do this, which you can see in the top few lines in the attached file.

To distribute to others you will have to register with Google as a developer and upload it in their play store. Detailed help page is available on their site on how to do that.

Good luck.

manifest.txt (508 Bytes) Rename it as manifest.json
oneLine chips2BB name it as oneLine chips2BB.png
oneLine chips2BB.txt (8.0 KB) tweaked code.

1 Like