|
- from . import *
-
- def review(frames):
- sucs = ""
- prevSess = -1
- rew = 0
- cnt = 1
-
- for i, frame in enumerate(frames):
- print (u"{}[2J{}[;H".format(chr(27), chr(27)))
- print(f"Session: {frame['session']}")
- print(frame['frame'])
- print(f"Timestep: {i + 1}")
- print(f"State: {frame['state']}")
- print(f"Action: {frame['action']}")
- print(f"Reward: {frame['reward']}")
-
- sess = frame['session']
- if sess != prevSess:
- if rew > 0:
- sucs += "+"
- sleep(1)
- elif rew < 0:
- sucs += "-"
- else:
- sucs += "."
- prevSess = frame['session']
- cnt += 1
- rew = frame['reward']
-
- print(f"\nSuccesses: [{sucs}]")
- sleep(.1)
|