SARSA0_example.py doesn't work

Issue #51 resolved
Tarik Kelestemur created an issue

I have created SARSA0.py as described in this tutorial in the same folder with SARSA0_example.py. But when I try to run it I get this error:

➜  src git:(master) ✗ python sarsa.py
     0: >>> E[0:00:00]-R[?]: Return=   -0.9625, Steps=3.46, Features = 25
Traceback (most recent call last):
  File "sarsa.py", line 58, in <module>
    visualize_performance=1)  # show performance runs?
  File "/Users/tkelestemur/Desktop/Courses/BIL470 Machine Learning/project/ml_project/project_main/RLPy/rlpy/Experiments/Experiment.py", line 392, in run
    self.agent.learn(s, p_actions, a, r, ns, np_actions, na, terminal)
  File "/Users/tkelestemur/Desktop/Courses/BIL470 Machine Learning/project/ml_project/project_main/src/SARSA0.py", line 33, in learn
    discount_factor = self.representation.domain.gamma() # 'gamma' in literature
AttributeError: 'GridWorld' object has no attribute 'gamma'

Comments (2)

  1. Log in to comment