Page 1 of 1

Dealing engine question

Posted: Tue Apr 25, 2023 10:01 pm
by Kloux
Hi,

I've been wondering from the start whether the pokerTH "dealing engine" tries to simulate actual card deck management (no reshuffling, discarded cards and so...).

Did not spend much time to look in code (looked for it in sourceForge - outdated - then github -still your codebase ? - ), and where to look at is not so obvious to find (did not take time to install qtcreator....) in code tree, so I ask the question here.

Obviously, if deck management is coded, an option for players to ask for reshuffle and new deck would be nice...


Thanks for the game anyway !

Re: Dealing engine question

Posted: Wed Apr 26, 2023 6:48 am
by sp0ck
Hi Kloux,

github is still the right place - esp. the stable branch which represents current running server: https://github.com/pokerth/pokerth

About the shuffling: Tools::ShuffleArrayNonDeterministic - e.g. https://github.com/pokerth/pokerth/blob ... /tools.cpp

Line 69-75

... that's the function which shuffles the board at gamestart.

Kind regards.

Re: Dealing engine question

Posted: Wed Apr 26, 2023 10:07 am
by Kloux
Thanks for the answer.

I'll look and find if I find the ....logic of it (even though I'm only human...;-) )

Re: Dealing engine question

Posted: Fri Apr 28, 2023 9:14 am
by Kloux
Hi,

I've looked the internet about Holdem dealing rules and found out that the deck management procedure I use IRL may be kind of a "familiy tradition"....

I(my)RL, our deck is shuffled ONCE at start (any player may ask for a reshuffle between hands, many times and any player may ask for new cards -ie another physical deck- ONCE per game).
Of course, 1 card is burnt before flop, turn and river (if any).
Cards are collected in the order they are folded, then the burnt cards, then the community cards, and placed at the bottom of the deck for the next hand.

My reading of the pokerTH code is that the deck is reshuffled between each hand (which corresponds to some explicit procedure I've found, but not to all).

So, to reshuffle or not to reshuffle, that is the question !
(with no particular advantages for Danish people on the matter ;-) )

What say you ?
Is there an official regulation on this ?

Re: Dealing engine question

Posted: Sun Apr 30, 2023 12:58 pm
by boehmi
From what I read the deck should be shuffled after each hand.

https://www.anglersnet.co.uk/forums/ind ... -in-poker/

And why would you not re-shuffle? In a computer game there is no delay by doing so.