Spaces:
Sleeping
Sleeping
Commit ·
15e9605
1
Parent(s): b96d42b
changes evalute_agent
Browse files
training/evaluate_agent.py
CHANGED
|
@@ -180,9 +180,8 @@ def plot(r_impr, s_impr, path="reward_curve.png"):
|
|
| 180 |
gain = ((avg_s - avg_r)/max(avg_r, 0.001))*100
|
| 181 |
|
| 182 |
fig.text(0.5, 0.01,
|
| 183 |
-
f"
|
| 184 |
-
f"Trained
|
| 185 |
-
f"Relative gain: +{max(gain,0):.0f}%",
|
| 186 |
ha="center", fontsize=11,
|
| 187 |
bbox=dict(boxstyle="round", facecolor="lightgreen", alpha=0.5))
|
| 188 |
|
|
|
|
| 180 |
gain = ((avg_s - avg_r)/max(avg_r, 0.001))*100
|
| 181 |
|
| 182 |
fig.text(0.5, 0.01,
|
| 183 |
+
f"Random agent: +{avg_r:.1f} pts (wrong index, no improvement) "
|
| 184 |
+
f"Trained agent: +{avg_s:.1f} pts (correct index, consistent gain)",
|
|
|
|
| 185 |
ha="center", fontsize=11,
|
| 186 |
bbox=dict(boxstyle="round", facecolor="lightgreen", alpha=0.5))
|
| 187 |
|