mirror of
https://github.com/wassname/rl_2d_walker.js.git
synced 2026-09-09 11:33:20 +08:00
bugfix
This commit is contained in:
+6
-6
@@ -32,12 +32,12 @@
|
||||
<br />
|
||||
<div>
|
||||
<h4>Load brain:</h4>
|
||||
<button onclick="game.agent.restore('../checkpoints', 'model-ddpg-walker-10m/model')">10 minutes old</button>
|
||||
<button onclick="game.agent.restore('../checkpoints', 'model-ddpg-walker-1h/model')">1 hour</button>
|
||||
<button onclick="game.agent.restore('../checkpoints', 'model-ddpg-walker-2h/model')">2 hours old</button>
|
||||
<button onclick="game.agent.restore('../checkpoints', 'model-ddpg-walker-4h/model')">4 hours</button>
|
||||
<button onclick="game.agent.restore('../checkpoints', 'model-ddpg-walker-8h/model')">8 hours</button>
|
||||
<button onclick="game.agent.restore('../checkpoints', 'model-ddpg-walker-22h/model')">22 hours</button>
|
||||
<button onclick="game.agent.restore('./checkpoints', 'model-ddpg-walker-10m/model')">10 minutes old</button>
|
||||
<button onclick="game.agent.restore('./checkpoints', 'model-ddpg-walker-1h/model')">1 hour</button>
|
||||
<button onclick="game.agent.restore('./checkpoints', 'model-ddpg-walker-2h/model')">2 hours old</button>
|
||||
<button onclick="game.agent.restore('./checkpoints', 'model-ddpg-walker-4h/model')">4 hours</button>
|
||||
<button onclick="game.agent.restore('./checkpoints', 'model-ddpg-walker-8h/model')">8 hours</button>
|
||||
<button onclick="game.agent.restore('./checkpoints', 'model-ddpg-walker-22h/model')">22 hours</button>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Be mean:</h4><button onclick="game.agent.env.chuckBalls()">Thow balls</button>
|
||||
|
||||
@@ -35,7 +35,6 @@ class Renderer {
|
||||
this.zoom += 0.1 * (this.target_zoom - this.zoom);
|
||||
this.translate_x += 0.1 * ((1.5 - minmax.min_x) - this.translate_x);
|
||||
this.translate_y += 0.3 * ((minmax.max_y + 1.3) * this.zoom - this.translate_y);
|
||||
console.log(this.translate_y)
|
||||
this.ctx.translate(this.translate_x * this.zoom, this.translate_y);
|
||||
this.ctx.scale(this.zoom, -this.zoom);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user