Poker Forum

Over 1,246,000 Posts!

Subscribe to FTR web feed
Already Registered?      Username:    Password:   Remember      Forgot Password
  >    > 

Pseudo-random number generator.

  
 
LinkBack Thread Tools Display Modes
Erpel
Old 04-27-2008, 11:16 PM     Post subject: Pseudo-random number generator. #1 (permalink)  
Full House

Join Date: Mar 2008
Posts: 605
Erpel
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.
Reply With Quote
Join the FTR Poker Forum to disable these banners and start posting!
spoonitnow
Old 04-27-2008, 11:20 PM #2 (permalink)  
spoonitnow's Avatar
Straight Flush

Join Date: Sep 2005
Location: IRC Chat Room
Posts: 5,406
spoonitnow is on a distinguished road
Send a message via AIM to spoonitnow Send a message via MSN to spoonitnow Send a message via Yahoo to spoonitnow Send a message via Skype™ to spoonitnow
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.
Quote:
Originally Posted by Ripptyde
I only have 2 simple rules when I am coaching a new student.

Rule # 1: don't ask questions

Rule # 2: don't ask questions

I have no interest in discussing strategy with a protege'. Your job is to remain quiet and listen. I have a very systematic approach that I will share with the right candidate and I promise that I will turn you into a force of nature and show you elements of the game of poker that you never knew existed.
 
Reply With Quote
swiggidy
Old 04-28-2008, 12:04 AM #3 (permalink)  
swiggidy's Avatar
4-of-a-Kind

Join Date: Sep 2005
Location: Waiting in the shadows ...
Posts: 3,777
swiggidy will become famous soon enough
This is silly
(\__/)
(='.'=)
(")_(")
 
Reply With Quote
jyms
Old 04-28-2008, 01:45 AM #4 (permalink)  
jyms's Avatar
Tilting Mod

Join Date: Feb 2006
Posts: 4,836
jyms has a spectacular aura aboutjyms has a spectacular aura aboutjyms has a spectacular aura about
Maybe you should overthink the stuff that means almost nothing in terms of poker.
 
Reply With Quote
bjsaust
Old 04-28-2008, 01:51 AM #5 (permalink)  
bjsaust's Avatar
Straight Flush

Join Date: May 2007
Location: Ballarat, Australia
Posts: 5,842
bjsaust is on a distinguished road
Send a message via MSN to bjsaust
I cant possibly see the use of posting this in the beginners forum...

Theres enough maths in poker without this kind of thing.
Just playing to improve.
 
Reply With Quote
badgers
Old 04-28-2008, 11:11 AM #6 (permalink)  
badgers's Avatar
4-of-a-Kind

Join Date: Feb 2007
Location: Spewing
Posts: 3,372
badgers
Send a message via MSN to 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.
3k post - Return of the blog!
 
Reply With Quote
spoonitnow
Old 04-28-2008, 11:27 AM #7 (permalink)  
spoonitnow's Avatar
Straight Flush

Join Date: Sep 2005
Location: IRC Chat Room
Posts: 5,406
spoonitnow is on a distinguished road
Send a message via AIM to spoonitnow Send a message via MSN to spoonitnow Send a message via Yahoo to spoonitnow Send a message via Skype™ to spoonitnow
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.
Quote:
Originally Posted by Ripptyde
I only have 2 simple rules when I am coaching a new student.

Rule # 1: don't ask questions

Rule # 2: don't ask questions

I have no interest in discussing strategy with a protege'. Your job is to remain quiet and listen. I have a very systematic approach that I will share with the right candidate and I promise that I will turn you into a force of nature and show you elements of the game of poker that you never knew existed.
 
Reply With Quote
badgers
Old 04-28-2008, 11:58 AM #8 (permalink)  
badgers's Avatar
4-of-a-Kind

Join Date: Feb 2007
Location: Spewing
Posts: 3,372
badgers
Send a message via MSN to badgers
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!
 
Reply With Quote
Erpel
Old 04-28-2008, 07:09 PM #9 (permalink)  
Full House

Join Date: Mar 2008
Posts: 605
Erpel
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.
Reply With Quote
deacon_bluez
Old 04-28-2008, 07:47 PM #10 (permalink)  
Straight

Join Date: Nov 2006
Location: Minnesota, USA
Posts: 216
deacon_bluez
Why don't you wear a wristwatch?
Sue me if I play too long....
 
Reply With Quote
euphoricism
Old 04-28-2008, 08:10 PM #11 (permalink)  
euphoricism's Avatar
4-of-a-Kind

Join Date: Mar 2005
Location: Your place or my place
Posts: 3,610
euphoricism
Send a message via AIM to euphoricism
Quote:
Originally Posted by deacon_bluez
Why don't you wear a wristwatch?
WIN!
Reply With Quote
Erpel
Old 04-28-2008, 08:14 PM #12 (permalink)  
Full House

Join Date: Mar 2008
Posts: 605
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.
Reply With Quote
swiggidy
Old 04-28-2008, 11:03 PM #13 (permalink)  
swiggidy's Avatar
4-of-a-Kind

Join Date: Sep 2005
Location: Waiting in the shadows ...
Posts: 3,777
swiggidy will become famous soon enough
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
(\__/)
(='.'=)
(")_(")
 
Reply With Quote
deacon_bluez
Old 04-30-2008, 07:53 PM #14 (permalink)  
Straight

Join Date: Nov 2006
Location: Minnesota, USA
Posts: 216
deacon_bluez
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....
 
Reply With Quote
sarbox68
Old 04-30-2008, 09:19 PM #15 (permalink)  
sarbox68's Avatar
Full House

Join Date: Sep 2006
Location: wondering where the 3 extra chairs at my 6max table came from
Posts: 871
sarbox68
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....
 
Reply With Quote
d0zer
Old 04-30-2008, 10:08 PM #16 (permalink)  
d0zer's Avatar
Moderator

Join Date: Jul 2007
Posts: 2,519
d0zer is a jewel in the roughd0zer is a jewel in the roughd0zer is a jewel in the roughd0zer is a jewel in the rough
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...
Reply With Quote
sarbox68
Old 04-30-2008, 10:39 PM #17 (permalink)  
sarbox68's Avatar
Full House

Join Date: Sep 2006
Location: wondering where the 3 extra chairs at my 6max table came from
Posts: 871
sarbox68
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...
 
Reply With Quote
Reply
Latest Poker News
KoRnholio Old 05-26-2012, 03:08 PM    Australia Legalized Online Poker coming up in next 6 to 12 Months
According to an email sent out by Mark Bryan, a gaming analyst at Merrill Lynch, the Australian government plans to legalize online poker sometime in the next six to 12 months. This move will coincide ...

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:21 PM.


FTR Testimonials

All content
© FlopTurnRiver.com
Advertising  |   Partners  |   Testimonials  |   T&C  |   Contact Us  |   FTR News & Press  |   Site Map  |   Search FTR

Full Tilt  |   Titan Poker  |   UltimateBet  |   Poker Stars  |   Ladbrokes Bonus  |   Sportsbook  |   Cake Poker  

Play Texas Holdem Online, Online Texas Holdem Strategy, & Poker Forum
This is not a gambling website.