Skip to content

Commit fd9998a

Browse files
feat(training): add yellow output to weak wins
- sometimes we get wins with low reward values, and they look terrible when viewing the output - add yellow log outputs for < 1.0 reward wins
1 parent 95925aa commit fd9998a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • libraries/mathy_python/mathy/agents/a3c

libraries/mathy_python/mathy/agents/a3c/util.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ def record(
6262

6363
global_ep_reward = global_ep_reward * 0.99 + episode_reward * 0.01
6464

65-
fore = "green" if is_win else "red"
65+
fore = "green"
66+
if not is_win:
67+
fore = "red"
68+
elif episode_reward < 1.0:
69+
fore = "yellow"
6670
heading = "{:<8} {:<3} {:<8} {:<10}".format(
6771
now, f"w{worker_idx}", f"ep: {episode}", f"steps: {num_steps}"
6872
)

0 commit comments

Comments
 (0)