bugpokersource - Bugs: bug #13773, TablePicker() should have more...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #13773: TablePicker() should have more versitle semantics

Submitted by:  Bradley M. Kuhn <bkuhn>
Submitted on:  Wed 24 Jun 2009 03:40:46 PM UTC  
 
Category: poker-networkSeverity: 1 - Wish
Priority: 3 - LowStatus: Confirmed
Privacy: PublicAssigned to: None
Open/Closed: Open

Sun 28 Jun 2009 11:36:31 PM UTC, comment #5:

TablePicker() currently has a very simple semantic which makes it useful
only to one operation: picking a good table for a new player to play at.
In particular, it always picks the fullest game that the player can sit
at.

What I think we should have is actually three settings:
"min_players" "max_players", "preferred_players"

Thus, the existing semantic would be something like:
min_players = N, max_players = 10, preferrred_players = 9

but, you could target more short handed situations and the like with this
better semantic.

This would not be difficult to implement.

Bradley M. Kuhn <bkuhn>
Project Administrator
Thu 25 Jun 2009 01:49:00 PM UTC, comment #4:

It's now not clear that this is the right semantics for TablePicker(). I will update with more information after I close some of the other TablePicker() bugs -- in particular, bug #13789

Bradley M. Kuhn <bkuhn>
Project Administrator
Wed 24 Jun 2009 03:40:46 PM UTC, comment #3:

This item has been reassigned from the project pokersource support tracker to your tracker.

The original report is still available at support #2368

Following are the information included in the original report:

[field #0] Item ID: 2368
[field #1] Group ID: 1588
[field #2] Open/Closed: Open
[field #3] Severity: 4 - Important
[field #4] Privacy: Public
[field #9] Category: poker-network
[field #10] Submitted by: bkuhn
[field #11] Assigned to: bkuhn
[field #12] Submitted on: Tuesday 06/23/2009 at 02:14
[field #13] Summary: TablePicker() should select the most empty table if many match criteria
[field #14] 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 test-pokeravatar.py.in. (Currently, that test is set to return True at all times.)

[field #16] Item Group: None
[field #17] Status: In Progress
[field #18] Component Version: None
[field #19] Operating System: GNU/Linux
[field #20] Reproducibility: None
[field #21] Size (loc): None
[field #22] Fixed Release: None
[field #23] Planned Release: None
[field #24] Effort: 0.00
[field #28] Priority: 5 - Normal
[field #31] Percent Complete: 0%
[field #33] Release: None
[field #58] Custom Select Box #1: None
[field #59] Custom Select Box #2: None
[field #60] Custom Select Box #3: None
[field #61] Custom Select Box #4: None
[field #62] Custom Select Box #5: None
[field #63] Custom Select Box #6: None
[field #64] Custom Select Box #7: None
[field #65] Custom Select Box #8: None
[field #66] Custom Select Box #9: None
[field #67] Custom Select Box #10: None

Bradley M. Kuhn <bkuhn>
Project Administrator
Tue 23 Jun 2009 02:54:05 AM UTC, SVN revision :

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 pokerpackets.py). 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 )

Bradley M. Kuhn <bkuhn>
Project Administrator
Tue 23 Jun 2009 02:15:29 AM UTC, SVN revision :

Various fixes to the TablePicker() tests:

* timeout of 540 is needed as some of the later tests take quite a long
time.
* 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 )

Bradley M. Kuhn <bkuhn>
Project Administrator
Wed 24 Jun 2009 03:40:46 PM UTC, 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 test-pokeravatar.py.in. (Currently, that test is set to return True at all times.)

Bradley M. Kuhn <bkuhn>
Project Administrator

 

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 proppy (Updated the item)
  • -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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 23 Feb 2010 06:14:47 PM UTCproppyCategoryNone=>poker-network
    Sun 28 Jun 2009 11:36:47 PM UTCbkuhnAssigned tobkuhn=>None
    Sun 28 Jun 2009 11:36:31 PM UTCbkuhnSeverity4 - Important=>1 - Wish
      Priority5 - Normal=>3 - Low
      StatusNone=>Confirmed
      SummaryTablePicker() should select the most empty table if many match criteria=>TablePicker() should have more versitle semantics
    Wed 24 Jun 2009 03:41:07 PM UTCbkuhnAssigned toNone=>bkuhn
    Wed 24 Jun 2009 03:40:46 PM UTCbkuhnReassign itempokersource, sr #2368=>pokersource, bug #13773
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup