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

AttributeError: type object 'RandomAgent' has no attribute 'q_func' #57

Open
yyf17 opened this issue Oct 7, 2020 · 0 comments
Open

Comments

@yyf17
Copy link

yyf17 commented Oct 7, 2020

simple_rl is v0.811


from simple_rl.tasks import GridWorldMDP

from options.option_generation.vi_distance import get_distance
if __name__ == "__main__":
    mdp = GridWorldMDP(width=5, height=5, init_loc=(1, 1), goal_locs=[(5, 5)])
    #mdp.visualize(filename="vi_distance")
    mdp.visualize_interaction()

pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "yyf/vi_distance_test.py", line 8, in
mdp.visualize_interaction()
File "/home/yyf/WorkSpace/coveroption/covering-options/simple_rl/tasks/grid_world/GridWorldMDPClass.py", line 278, in visualize_interaction
mdpv.visualize_interaction(self, _draw_state)
File "/home/yyf/WorkSpace/coveroption/covering-options/simple_rl/utils/mdp_visualizer.py", line 344, in visualize_interaction
agent_shape = _vis_init(screen, mdp, draw_state, cur_state, agent)
File "/home/yyf/WorkSpace/coveroption/covering-options/simple_rl/utils/mdp_visualizer.py", line 387, in _vis_init
agent_shape = draw_state(screen, mdp, cur_state, agent=agent, show_value=True, draw_statics=True)
File "/home/yyf/WorkSpace/coveroption/covering-options/simple_rl/tasks/grid_world/grid_visualizer.py", line 44, in _draw_state
for s in agent.q_func.keys():
AttributeError: type object 'RandomAgent' has no attribute 'q_func'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant