From 46a9ef85619e6af0cc54bbf66da43c9f8ad8a4b3 Mon Sep 17 00:00:00 2001 From: wassname Date: Tue, 27 Nov 2018 15:41:30 +0800 Subject: [PATCH] local state info --- js/agent.js | 2 +- js/game.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/agent.js b/js/agent.js index 5343c45..1d1a0f4 100644 --- a/js/agent.js +++ b/js/agent.js @@ -23,7 +23,7 @@ function Agent(opt, world) { Agent.prototype.init = function (actor, critic) { var actions = this.walker.joints.length var temporal = 1 - var states = this.walker.bodies.length * 7 + var states = this.walker.bodies.length * 10 + this.walker.joints.length * 3 var input = window.neurojs.Agent.getInputDimension(states, actions, temporal) diff --git a/js/game.js b/js/game.js index 60980f5..6ed3521 100644 --- a/js/game.js +++ b/js/game.js @@ -53,7 +53,8 @@ displayProgress = function () { gameInit = function() { var joints = 12 var bodyParts = 14 - var state = bodyParts * 7 + var joints = 12 + var state = bodyParts * 10 + joints * 3 var actions = joints var input = 2 * state + 1 * actions