EvalAgentBase class errors
See original GitHub issueHi @TinkeringCode,
First of all, great work you have here! Really useful.
I am trying to replicate some of your experiments (play against DeepCFR for example), but I am getting two errors.
Trying to play interactively against the algorithm (modified examples/interactive_v_agent.py
), when human plays first, the notify_of_processed_tuple_action
method gets executed (line 103) and errors with: TypeError: notify_of_processed_tuple_action() got an unexpected keyword argument 'action_tuple'
. I think the arguments are reversed and misnamed in EvalAgentBase class, it seems pretty straight forward (I can submit a PR fixing it).
The second error comes when the algorithm plays, get_action_frac_tuple
method gets called, but it does not exist in the base class AttributeError: 'EvalAgentDeepCFR' object has no attribute 'get_action_frac_tuple'
. This seems more difficult to solve, I haven’t studied the code in depth, I assume the action could be get from get_action
overridden method, but it’s not clear to me how to get the fraction or bet size.
MWE (inside the DeepCFR repo)
from os.path import dirname, abspath
from DeepCFR.EvalAgentDeepCFR import EvalAgentDeepCFR
from PokerRL.game.InteractiveGame import InteractiveGame
path_to_sdcfr_eval_agent = dirname(abspath(__file__)) + "/trained_agents/Example_FHP_SINGLE.pkl"
if __name__ == '__main__':
eval_agent = EvalAgentDeepCFR.load_from_disk(path_to_eval_agent=path_to_sdcfr_eval_agent)
# to replicate error 1, when prompted choose any action
plays_first = [0]
# then, to replicate error 2, change
# plays_first = [1]
# so that the algorithm starts and the second error is triggered
game = InteractiveGame(env_cls=eval_agent.env_bldr.env_cls,
env_args=eval_agent.env_bldr.env_args,
seats_human_plays_list=plays_first,
eval_agent=eval_agent,
)
game.start_to_play()
Kind Regards, Guillermo.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
Hi Guillermo,
Thanks for testing! Great to hear that it works now. 😃 I merged your PR - thanks for cleaning up.
pip version is going to be updated this week!
Cheers, Eric
Hello Eric,
I’ve tested it and works perfectly fine! 😃 Also, I have submitted a pull request with some things that seemed to be left behind.
Cheers, Guillermo.