Select Page
Poker Forum
Over 1,304,000 Posts!
Poker ForumBeginners Circle

Pseudo-random number generator.

Results 1 to 17 of 17

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Pseudo-random number generator.

    Ok, I've read Sklansky's Theory of Poker though not really understood all of it and I'm going through a Harrington book and he goes on to mention that this or that hand should be played this or that way probably 75% of the time. He mentions briefly that he uses a glance at the second indicator on his wristwatch to decide whether he's in the 25% or the 75% range and yeah, I can see his point. There's no point trying to mentally keep track of where you are in each interval and if you try to choose a random occurrence with your wit alone you'll insert patterns - probably the 75% range becomes something you do 90% of the time. Since deception is certainly a key part of what you're trying to achieve it would serve you best if your number is truly random.

    But here's the thing. I don't use a wrist watch. And I don't plan to. So, I wanted to put together a way to pseudo-randomly generate a random number on the spot which I can use in these types of situations.

    My initial thought and my ideal was to generate a random number only based on the cards I hold. I wanted to limit the amount of inputs I take into the little calculation that generates a number, and I wanted the inputs to be always available and pretty random all by themselves. The thought is to have a relatively simple algorithm which I can practice and become good at with relative ease so it becomes basically automatic.

    The basic mechanism I use is assigning values, adding them together to a number, adding together the digits of that number (and the digits of the resulting number) until I'm down to just one digit. Then use that random digit to determine which random path I shall follow.

    I considered using a predefined number for a game session as a 'seed', using seating position etc, but I'm finding that I don't really need that.

    I give A a value of 1, J is 11, Q is 12, K is 13. KK is 26. As we know from rolling two dice where 7 is the most likely outcome, in this case 14 is the most likely outcome. To equalize this range I add up the digits - 26 becomes 8, 16 becomes 7 etc. Doing this for all 169 combinations produces the following:

    1: 17 occurences
    2: 18 occurences
    3: 19 occurences
    4: 20 occurences
    5: 21 occurences
    6: 20 occurences
    7: 19 occurences
    8: 18 occurences
    9: 17 occurences

    Close enough for government work. Not the final version, but there's definitely hope here.

    I want to add in the suits involved. I don't want my play with 97 PF to be predictable. Suits give me 16 combinations. I give diamonds 0, hearts 1, clubs 2 and spades 4. This in isolation produces something like 3 occurrences of 2 and 4 and 0 occurrences of 7. (The 0 is equal to a 9 for practical purposes). Again, close enough for government work.

    Based on this system these are some example pseudo-random numbers:
    AsKh: 1 (A) + 4 (s) + 13 (K) + 1 (h) = 19 => 1 + 9 = 10 => 1 + 0 = 1
    7c5h: 7 (7) + 2 (c) + 5 (5) + 1 (h) = 15 => 1 + 5 = 6
    Ts8s: 8
    KdJh: 7

    The output of this method is a number between 1 and 9, so instead of saying I want to do this or that 50% of the time or 75% of the time, I just have to decide that I'm happy with doing it 4 times out of 9 or 7 times out of 9 and I can use this method to balance it.

    Now, regarding this being close enough for government work - as a pseudo-number generator this one is somewhat flawed. Card value factor favours the middle range and the suitedness factor favours two specific values and has no chance for the value 7, which adds up to an uneven range. I've played around with spreadsheets for a while to prove to myself exactly how unbalanced it is, and to be quite frank for this type of random number it is probably sufficient in the basic form - but there is quite an easy fix which makes it about as good as it can be.

    The fix to make it an even better balanced distribution of random numbers is this: Differentiate between the cards. Reduce the value for spades to 3 and double the values for one card for both value and suitedness. Going back to the above examples:
    AsKh: 1 * 2 (A) + 3 * 2 (s) + 13 (K) + 1 (h) = 22 => 2 + 2 = 4
    7c5h: 7 * 2 (7) + 2 * 2 (c) + 5 (5) + 1 (h) = 24 => 2 + 4 = 6
    Ts8s: 1
    KdJh: 2

    The card value part which ranged from 17 to 21 occurrences now shows up with only 18 or 19 occurrences (as balanced as it gets), and similarly the suitedness factor now comes up with either 1 or 2 (no zeroes and no threes) occurences of each digit from that component. It's not going to get any better as long as we're talking pseudo-random.

    Basic method:
    Diamond: 0
    Heart: 1
    Club: 2
    Spades: 4

    Card 1: Card value + Suitedness value
    Card 2: Card value + Suitedness value
    "Random" number: Card1 + Card2 - keep adding digits together until one digit between 1 and 9 is left.

    Better balanced method:
    Diamond: 0
    Heart: 1
    Club: 2
    Spades: 3

    Card 1: (Card value + Suitedness value) * 2
    Card 2: Card value + Suitedness value
    "Random" number: Card1 + Card2 - keep adding digits together until one digit between 1 and 9 is left.
  2. #2
    spoonitnow's Avatar
    Join Date
    Sep 2005
    Posts
    14,219
    Location
    North Carolina
    There are a number of easier ways to do this based just off of the suits of the cards alone, but from what I've seen, good work nonetheless.
  3. #3
    swiggidy's Avatar
    Join Date
    Sep 2005
    Posts
    7,876
    Location
    Waiting in the shadows ...
    This is silly
    (\__/)
    (='.'=)
    (")_(")
  4. #4
    Maybe you should overthink the stuff that means almost nothing in terms of poker.
  5. #5
    bjsaust's Avatar
    Join Date
    May 2007
    Posts
    6,347
    Location
    Ballarat, Australia
    I cant possibly see the use of posting this in the beginners forum...

    Theres enough maths in poker without this kind of thing.
    Just dipping my toes back in.
  6. #6
    Wait whaaaaattttt???

    I'll try and explain as well as I can. I'm not even sure I get all the concepts yet but I'll give it a go...

    If I recall correctly you play <10nl right? This sort of thing has no relevance whatsoever in 10nl. You seem to be talking about balancing a range to make every option unexploitable, which is what sklansky talks about in ToP. (By balancing a range i mean playing your hands in such a way that you will be bluffing or value betting a certain amount that makes calling or folding equally -EV for your opponent.)

    The point is, unexploitable play is not always optimal play. As your opponents get better your optimal play becomes closer to the unexploitable.

    Poker is all about exploiting mistakes. At 10nl, a common mistake is calling too much. The way to exploit this is by value betting more and bluffing less. This is very easily exploitable for a clever opponent, there will be many situations where you will only ever have a made hand and you will never be bluffing. Importantly, though, the way to exploit this is to fold and as we know your opponents aren't cabale of folding hence this play is more optimal but also more exploitable.

    This crazy shit you're on about has no relevance whatsoever. Just vallluueeeee town everyone

    Edit: This was a very long and badly written ramble. To conclude, stop doing shit like this and vbet instead.
    3k post - Return of the blog!
  7. #7
    spoonitnow's Avatar
    Join Date
    Sep 2005
    Posts
    14,219
    Location
    North Carolina
    Quote Originally Posted by badgers
    Wait whaaaaattttt???

    I'll try and explain as well as I can. I'm not even sure I get all the concepts yet but I'll give it a go...

    If I recall correctly you play <10nl right? This sort of thing has no relevance whatsoever in 10nl. You seem to be talking about balancing a range to make every option unexploitable, which is what sklansky talks about in ToP. (By balancing a range i mean playing your hands in such a way that you will be bluffing or value betting a certain amount that makes calling or folding equally -EV for your opponent.)

    The point is, unexploitable play is not always optimal play. As your opponents get better your optimal play becomes closer to the unexploitable.

    Poker is all about exploiting mistakes. At 10nl, a common mistake is calling too much. The way to exploit this is by value betting more and bluffing less. This is very easily exploitable for a clever opponent, there will be many situations where you will only ever have a made hand and you will never be bluffing. Importantly, though, the way to exploit this is to fold and as we know your opponents aren't cabale of folding hence this play is more optimal but also more exploitable.

    This crazy shit you're on about has no relevance whatsoever. Just vallluueeeee town everyone

    Edit: This was a very long and badly written ramble. To conclude, stop doing shit like this and vbet instead.
    Or he could have just not tried to contribute to the forums with something he thought other people might find useful.
  8. #8
    i didn't mean what i said as a put-down but to be helpful. I think there are more productive things a micro-stakes player could do.
    3k post - Return of the blog!
  9. #9
    I see my initial post as an exercise in analytical thought utilising certain mathematical concepts useful and pertinent to poker. My stakes hardly matter - what does matter is practicing and learning to think in ways that are appropriate to poker. I posted it deliberately in the beginner's forum because I figure any poker player who isn't a beginner is familiar with the principles of unexploitable play and has his own way of producing random or pseudo-random numbers on the spot - I thought beginners might find this type of thing useful or entertaining to consider. It's flexing the mathematical and analytical muscle in a way that is not (let's be clear) immediately useful, but still revolves around poker concepts.

    Additionally writing it down was a way for me to develop the idea in my own head, and having written it I saw no particular reason not to share it. I've worked a little more with it and come to the conclusion that this pseudo-random number generator has a number of significant problems which make it unusable for the intended purpose. I'll be happy to continue the braindump if anyone has any interest, but as that may not be the case I won't pursue that. And as badgers is correctly pointing out it's not the main thing I should busy my head with if I'm trying to improve my play - and it really isn't the main thing anyway. This was just a stray thought.

    In a completely unrelated thought exercise I saw an example of the outcome of an odds calculation and thought it was interesting - especially for beginners who may not be aware of combining odds in that way. I was vaguely aware that such odds maths should be possible but I hadn't seen an example of it or put any serious thought to figuring it out.

    An assertion is made that a raise can have been made with a hand that has you dominated where you are a 10-1 underdog, or a semi-bluff where you are a 3-1 favourite, and since the pot is giving you 2-1 odds you should call if the villain semi-bluffs a third of the time. Where'd he get that from I asked myself - I discovered the answer by adding up the odd components associated with me winning vs the odd components associated with me losing: 10 + 1 + 1 (me losing) to 1 + 3 + 2 (me winning) => 12 to 6 or 2 to 1. That must be where the observation comes from that he must semi-bluff a third of the time (2 to 1 odds against) for me to have a chance of winning. I could be very wrong in assuming this is where the assertion comes from, but from how I'm seeing it, it fits.
  10. #10
    Why don't you wear a wristwatch?
    Sue me if I play too long....
  11. #11
    euphoricism's Avatar
    Join Date
    Mar 2005
    Posts
    5,383
    Location
    Your place or my place
    Quote Originally Posted by deacon_bluez
    Why don't you wear a wristwatch?
    WIN!
  12. #12
    Quote Originally Posted by deacon_bluez
    Why don't you wear a wristwatch?
    Same reason I don't shag sheep. Don't fancy 'em.
  13. #13
    swiggidy's Avatar
    Join Date
    Sep 2005
    Posts
    7,876
    Location
    Waiting in the shadows ...
    It's an interesting exercise. I question how random it actually is, but that's not too important, it seems good enough.

    The problem is the poker maths are very simple. There is some neat stuff you can do, but it won't make you a better player or give you an edge.

    Putting in hands is WAAAAAAAAY more helpful long term.

    good luck
    (\__/)
    (='.'=)
    (")_(")
  14. #14
    Quote Originally Posted by Erpel
    Quote Originally Posted by deacon_bluez
    Why don't you wear a wristwatch?
    Same reason I don't shag sheep. Don't fancy 'em.
    Think I might rather shag sheep than do the math you're describing.

    If you just need one random digit, why not this: look at PFR% PAHUD stat for the first person to your left. The last digit of that figure should be essentially random, no?
    Sue me if I play too long....
  15. #15
    sarbox68's Avatar
    Join Date
    Sep 2006
    Posts
    1,115
    Location
    wondering where the 3 extra chairs at my 6max table came from
    Quote Originally Posted by deacon_bluez
    Why don't you wear a wristwatch?
    I like both of my arms to weigh the same.



    All that said... a) Props for investing the time and deep thinking, b) Almost nobody is paying enuff attention at $10NL to have a clue what you been doing, let alone that you're doing something different than what they seen you doing before, c) nobody likes a fake multiple choice, so there will be no c....
  16. #16
    I have a similar method involving bodily functions.

    Let BM = the number of times you've piss or shit in the last 4 hours

    Let Ej = the number of times you've jerked off in the last day

    Let Fa = the number of times you've farted in the last hour.

    Let Hb= your approximate heart rate (estimated to the nearest 10BPM)

    Now use the following simple calculation:

    (((BM + Ej + 1) ^ (Fa + 1) ) * HB)

    Then simply do modular arithmetic on this result to get whatever range you want, and presto!

    I use this exclusively in live games to make decision making easier...
  17. #17
    sarbox68's Avatar
    Join Date
    Sep 2006
    Posts
    1,115
    Location
    wondering where the 3 extra chairs at my 6max table came from
    Quote Originally Posted by d0zer
    I have a similar method involving bodily functions.
    Thanks for giving the concepts of "pushing" and "floating" a whole new meaning...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All content
©  2003 - 2025
FlopTurnRiver.com
Testimonials  |   Terms & Conditions  |   Contact Us  |   FTR News & Press  

FTR is your home for Texas Holdem Strategy, Poker Forum, Poker Tools & Poker Videos
https://www.flopturnriver.com/copyscape.gif
DMCA.com