Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine functions into player file #14

Open
azhikai opened this issue Mar 26, 2019 · 0 comments
Open

Combine functions into player file #14

azhikai opened this issue Mar 26, 2019 · 0 comments
Labels
priority.high Must do without fail!

Comments

@azhikai
Copy link
Contributor

azhikai commented Mar 26, 2019

As stated in the latest announcement, all functions that we want to use for our player must be in the same file.

For example, we have to shift EHS.py into <Name>Player.py.

Hi All,

We understand that there have been some confusions regarding the poker agent implementation, especially the restrictions imposed on agent and the information available to agent whenever the game state changes. Just to clarify once again.

1. The agent API is given by the following 
 
class <agentName>(BasePokerPlayer):
        def declare_action(self, valid_actions, hole_card, round_state):                   <implementation (Compulsory)>

        def receive_game_start_message(self, game_info):                                     <implementation (optional)>
        def receive_round_start_message(self, round_count, hole_card, seats):     <implementation (optional)>
        def receive_street_start_message(self, street, round_state):                        <implementation (optional)>
        def receive_game_update_message(self, action, round_state):                    <implementation (optional)>
        def receive_round_result_message(self, winners, hand_info, round_state):  <implementation (optional)>

        <Any other functions that you might want you use, but must be implemented in this file>

The engine is responsible for supplying the arguments to these functions whenever they are called. Many of you would require the game state information as and when the game progresses, this can obtained by all the receive_* functions. For example the round_state data structure will tell you the action histories, the player's current stack etc. Similarly the hand_info structure tells you the hand strengths of each player after every round ends (assuming no player folds). The engine will ensure that these informations are available to you whenever the game state changes (like start of a new street, or new round etc). Ideally a sophisticated agent is expected to use these functions to obtain all possible state information. If you want to understand how each data structures look like just implement pprint.pprint(<data_structure>) in the various receive_*  functions. 


2. Timeout
The initial timeout as specified by the document is 100ms (Although the code has a different value and will update it). However, we think that it might be too small. Hence we will increase it to 200ms.

Please contact us if there are any further queries.

 Thanks 

Timeout of 200ms has been increased accordingly in @darren96's PR, #13

@azhikai azhikai added the priority.high Must do without fail! label Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.high Must do without fail!
Projects
None yet
Development

No branches or pull requests

1 participant