helppokersource - Support: sr #2368, Reassigned to another tracker...

Show feedback again

sr #2368: Reassigned to another tracker [was: TablePicker() should select the most empty table if many match criteria]

Submitted by:  Bradley M. Kuhn <bkuhn>
Submitted on:  Tue Jun 23 02:14:22 2009  
Category: poker-networkPriority: 5 - Normal
Severity: 4 - ImportantStatus: In Progress
Privacy: PublicAssigned to: Bradley M. Kuhn <bkuhn>
Open/Closed: ClosedOperating System: GNU/Linux
Effort: 0.00

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Wed Jun 24 15:40:46 2009, comment #3:


Please, do not post any new comments to this item.

Bradley M. Kuhn <bkuhn>
Project AdministratorIn charge of this item.
Tue Jun 23 02:54:05 2009, SVN revision 5935:

Implementation of PacketPokerTablePicker(), merged from table-picker branch.
Detailed implementation logs are in table-picker branch, r5830 to r5933.
The commit message below contains a summary of the feature implementation
details. The feature itself is best documented in the "Semantics" section
for the PacketPokerTablePicker() (in This merge
closes sr #2364.

Implementation Details:
* Expanded the method PokerService.listTables() to include various
additional criteria needed to find a list of tables that matched the
desired parameters sought by the requesting player. Additional
indexes were added on dbtable, pokertables, to speed this up.

* PokerService.getTableBestByCriteria() uses the aforementioned new
listTables(). getTableBestByCriteria() loops through the tables
returned by listTables(). It eliminates tables that:
+ are full, or
+ have too many players sitting out, such that the requested
minimum player count would (effectively) not be reached, or
+ have minimum buy-ins such that the requesting player could not
afford to play.

* Refactored PokerAvatar.handlePacketLogic() somewhat to create a
variety of so-called "perform" functions. These functions move some
of the code that was originally in-line inside the giant "if"
statement into their own methods.

* PokerAvatar.performPacketPokerTablePicker() takes advantage of the
aforementioned "perform" functions to ensure its sequence of
automatic packet operations work exactly as if the client had sent
those very packets itself.

* Added a helper function for constructing a string ready for
PokerService.listTables() in PokerAvatar.

Tests Implementation Details:
* Created PokerAvatarTestCaseBaseClass so additional client/server test
case classes can be created to reuse some of the methods from the
original PokerAvatarTestCase.

* Various feature-oriented tests are in PokerAvatarTablePickerTestCase,
which also serves as unit test coverage for handlePacketLogic().

* Standard unit test coverage for the new listTables() and for
getTableBestByCriteria() is provided.

Future Work:

During implementation, the idea came up that table selection by the
TablePicker should help keep the cash game tables site-wide as balanced
as possible, which is the inspiration for sr #2368 and for the

[...] currently-skipped test04_tablePicker_twoPossibleGivesMostEmpty


(Browse SVN revision 5935)

Bradley M. Kuhn <bkuhn>
Project AdministratorIn charge of this item.
Tue Jun 23 02:15:29 2009, SVN revision 5932:

Various fixes to the TablePicker() tests:

* timeout of 540 is needed as some of the later tests take quite a long
* fail if setMoney is given an odd setting.

* Skip test04_tablePicker_twoPossibleGivesMostEmpty for now. sr #2368
has been created for whenever someone implements this feature.

* Other tests needed minor fixes to work properly.

(Browse SVN revision 5932)

Bradley M. Kuhn <bkuhn>
Project AdministratorIn charge of this item.
Tue Jun 23 02:14:22 2009, original submission:


The TablePicker() packet currently returns the first table matching the criteria. Ideally, it would examine every possible table matching the criteria, and pick the one with the fewest players that does match. That way, the tables across the site remain more balanced.

There is already a test that should pass if this feature is implemented. Namely, PokerAvatarTablePickerTestCase.test04_tablePicker_twoPossibleGivesMostEmpty in (Currently, that test is set to return True at all times.)

Bradley M. Kuhn <bkuhn>
Project AdministratorIn charge of this item.


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by bkuhn (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Jun 24 15:40:46 2009bkuhnReassign Itempokersource, sr #2368=>pokersource, bug #13773
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup