ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

Tables merge when player may re-enter #1315

Closed ctm closed 2 months ago

ctm commented 5 months ago

Choose an algorithm for delaying the merging of tables during late-registration and re-entries and implement it.

During the first WYWAE tournament, when we got up to 19 players and a player bust, tables were recombined, only to have that player re-enter shortly afterward, causing the tables to be split again. I should query at least two of the regulars and decide how best to prevent that.

One possibility is just to wait some amount of time after a player who has at least one re-entry left busts before tables are merged. That's what I'm leaning toward.

Another possibility is to simply never merge if re-entries or late-registration is open and there are N or fewer open seats (where N may be related to the number of tables currently running).

ctm commented 5 months ago

FWIW, I initially documented this problem as part of my Poor Table Balance issue (#1302). I knew at the time that it deserved its own issue, but I was busy and then didn't revisit that issue until just now.

ctm commented 5 months ago

I just sent email asking about this. Kind of silly that I didn't ask seven hours ago, but it's always something.

ctm commented 5 months ago

I got great feedback and if I get permission, I'll quote it here for future reference.

For now, however, my plan is to make it so that mb2 doesn't merge tables for some random amount of time between one and five minutes if it's still possible for someone to re-enter or to register late. I think that keeps tables more full than some of the other alternatives, will prevent the merging and re-splitting in most cases and slightly discourages players from waiting around long enough for the merge if that when those players bust from a table they don't like.

I can always futz with the policy later (which is why I want to quote the feedback I got), but almost any fix is better than the current behavior.

ctm commented 2 months ago

I never did quote the feedback I got via email. Oops.

I've gone ahead and implemented, in merge-1315, something that delays the merge for a random amount of time between 1 and 5 minutes (hence 3 minutes, on average). Then, as I was reviewing my own code, I realized that the way I'm doing it bypasses any table balancing. So, if seven players were playing a six-handed game and one of the players on the table that only has three players busts, that would leave one table with four players and the other with two, which wouldn't be appreciated.

So, I'm not going to deploy my fix until I make it invoke the table balancing code, but the table balancing code may assume that the minimum number of tables are present. If so, that could result in bad things happening when the balancer depends on a false assumption. Ugh.

ctm commented 2 months ago

Done. Deploying now.