From d1c0f4044e6d91d68297a8a6d805a80a95c33c3f Mon Sep 17 00:00:00 2001 From: realrandolph <104107862+realrandolph@users.noreply.github.com> Date: Sat, 1 Oct 2022 02:53:12 -0400 Subject: [PATCH] Update rldemo.js Pretty sure this is what was intended. The graph doesn't appear to work correctly in the demo. This change makes the x axis match the age of the trained agent. Tested change and appears correct to me. --- demo/js/rldemo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/js/rldemo.js b/demo/js/rldemo.js index 5636c1f2..728355c3 100644 --- a/demo/js/rldemo.js +++ b/demo/js/rldemo.js @@ -433,7 +433,7 @@ ctx.stroke(); if(w.clock % 200 === 0) { - reward_graph.add(w.clock/200, b.average_reward_window.get_average()); + reward_graph.add(w.clock, b.average_reward_window.get_average()); var gcanvas = document.getElementById("graph_canvas"); reward_graph.drawSelf(gcanvas); } @@ -575,4 +575,4 @@ w.agents = [new Agent()]; gofast(); - } \ No newline at end of file + }