kh-kim / stock_market_reinforcement_learning

This project provides a stock market environment using OpenGym with Deep Q-learning and Policy Gradient.
785 stars 323 forks source link

Running error #5

Open xfffrank opened 6 years ago

xfffrank commented 6 years ago
$ python market_pg.py ./kospi_10.csv pg.h5
  File "market_pg.py", line 86
    print "%s:\t%s\t%.2f\t%.2f\t" % (info["dt"], color + env.actions[action] + bcolors.ENDC, reward_sum, info["cum"]) + ("\t".join(["%s:%.2f" % (l, i) for l, i in zip(env.actions, aprob.tolist())]))
                                ^
SyntaxError: invalid syntax

How can I fix this? I am new to RL. Thanks!

xfffrank commented 6 years ago

The arrow points to 'aprob' .

nateGeorge commented 6 years ago

I think you're running python3, and it's an error for the print statement. This was written for python2. You could used 2to3 on Linux to convert it for python3.

xfffrank commented 6 years ago

Thanks!