From fae3c4101bb0a02c1eaccee1bcec3e59949980c9 Mon Sep 17 00:00:00 2001 From: wassname Date: Sun, 13 Jan 2019 20:58:12 +0800 Subject: [PATCH] tidy the html --- package-lock.json | 7 +- package.json | 6 +- src/index.html | 197 ++++++++++++++++++++++++++++++---------------- 3 files changed, 140 insertions(+), 70 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2a35acc..afe7258 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "2d_walker_rl_js", - "version": "0.0.1", + "version": "0.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -932,6 +932,11 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, + "bulma": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.7.2.tgz", + "integrity": "sha512-6JHEu8U/1xsyOst/El5ImLcZIiE2JFXgvrz8GGWbnDLwTNRPJzdAM0aoUM1Ns0avALcVb6KZz9NhzmU53dGDcQ==" + }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", diff --git a/package.json b/package.json index 1c27630..1d3f594 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "A 2d humanoid walker trained to walk with reinforcement learning", "main": "index.js", "dependencies": { - "@tensorflow/tfjs-node": "^0.1.17", - "@tensorflow/tfjs-node-gpu": "^0.1.17", + "@tensorflow/tfjs-node": "^0.1.20", + "@tensorflow/tfjs-node-gpu": "^0.1.20", "canvas": "^2.1.0" }, "devDependencies": { @@ -21,7 +21,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "display": "webpack-dev-server -d", - "train": "node --max-old-space-size=8192 scripts/train | tee outputs/train_$(date +\"%Y-%m-%d_%H-%M-%S\").log" + "train": "node --max-old-space-size=16192 scripts/train | tee outputs/train_$(date +\"%Y-%m-%d_%H-%M-%S\").log" }, "repository": { "type": "git", diff --git a/src/index.html b/src/index.html index 7ef6a67..b33a9e1 100644 --- a/src/index.html +++ b/src/index.html @@ -1,87 +1,152 @@ - + + + Reinforcement Learning 2D Biped Walkers - + + + - Fork me on GitHub +
+
+

Reinforcement Learning 2D Humanoid Walkers

+

"Play that funky music, robot"

-
-

Reinforcement Learning 2D Humanoid Walkers

-

"Play that funky music, robot"

- - + -
- This project take a teach a 2d ragdoll to walk(ish) using reinforcement learning. -

- You can view the progress at differen't stages of training with the buttons below. You can also throw balls by clicking the animation. -

- The agent can move it's limbs in a realistic range of motion, it can feel the position of it's limbs and it's goal it to hold it's head upright and move to the right. - The dark outlines are when the agent grips the floor, since I found walking was slippery otherwise. The balls are to provide obstacles. -
    -
  • Reward: The agent is rewarded for moving to the right, keeping it's head above it's legs, conversing energy, not bending it's limbs too much, and not touching to many limbs to the ground
  • -
  • Actions: The agent can power motors that rotate each limb within a certain range of motion
  • -
  • State: The agent can "see" most things about itself: each limb's relative position, global position, rotation, linear velocity, angular velocity, and orientation. Also each joints angle, speed, and motor speed
  • -
-


- How does it work?: This uses use reinforcement learning to teach the agent to walk. - This is a branch of machine learning targeted at controlling systems over time such as systems of limbs or a self driving car. - - The agent is defined in 2d with a certain strength and range of limb movement. Training is done offline in tensorflow.js. The aglorithm is Deep Deterministic Policy Gradients with prioritized experince replay. The environment is in box2d for javascript and we use webpack to run the same code on the backend and frontend. -

- -


+ - Source code https://github.com/wassname/rl_2d_walker.js

- Credits: - - + + + +
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+
+ + +
+
+
+
+ +
+ This project teaches a 2D ragdoll to (almost) walk using reinforcement learning. +

+ You can view the progress at differen't stages of training with the buttons above. You can also throw balls by + clicking the animation or using the buttons. +

+ The agent can move it's limbs in a realistic range of motion, it can feel the position of it's limbs and it's + goal it to hold it's head upright and move to the right. The dark outlines are when the agent grips the floor, + since I found walking was slippery otherwise. The balls + are to provide obstacles. + +
    +
  • Reward: The agent is rewarded for moving to the right, keeping it's head above it's legs, conversing + energy, not bending it's limbs too much, and not touching to many limbs to the ground
  • +
  • Actions: The agent can power motors that rotate each limb within a certain range of motion
  • +
  • State: The agent can "see" most things about itself: each limb's relative position, global position, + rotation, linear velocity, angular velocity, and orientation. Also each joints angle, speed, and motor + speed
  • +
+
How does it work?
+ + This uses use reinforcement + learning to teach the agent to walk. + This is a branch of machine learning targeted at controlling systems over time such as systems of limbs or a + self driving car. + + The agent is defined in 2d with a certain strength and range of limb movement. Training is done offline in tensorflow.js. The aglorithm is Deep + Deterministic Policy Gradients with prioritized experince + replay. The environment is in box2d for javascript and we use webpack to run the same code on the backend + and frontend. + +


+ +
Links
+ + +
Credits
+ + +
-
-
-

Load brain:

- - - - - - - - - -
-
-

Be mean:

- -
- +
+ +