question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EvalAgentBase class errors

See original GitHub issue

Hi @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:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
EricSteinbergercommented, Apr 16, 2019

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

0reactions
geblancocommented, Apr 16, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python load disk - ProgramCreek.com
importAttr(pyld)) return True except Exception as e: out.err('Error loading from disk: %s\n' % (str(e))) deleteFile = True # Delete the file if(deleteFile): ...
Read more >
Build complete and running but showing error on class android
1 Answer 1 · Remove the lines and re-import them from correct/compatible packages. · Try removing all dependencies then sync and add all ......
Read more >
PokerRL - PyPI
PokerRL. Framework for Multi-Agent Deep Reinforcement Learning in Poker games. Background. Research on solving imperfect information games ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found