Skip to content
Reinforcement learning in JavaScript & Node.js
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
images
python
save Learn on server Mar 30, 2019
server
src Environment gives reward on end only Apr 6, 2019
static
.gitignore
.npmrc
LICENSE
README.md
package.json
rollup.config.js

README.md

js-gym

JavaScript environment for training reinforcement learning agents.

Installation

To download the code and install the requirements, you can run the following shell commands:

$ git clone https://github.com/bobiblazeski/js-gym.git
$ cd js-gym
$ npm install

Getting started

This code is intended to be run locally by a single user. The server runs in node.js.

To start the server from the command line, run this:

$ node server/start.js

If you have pretrained weights you could pass them

$ node server/start.js --kano=t04051134 --subzero=t04051134

You can open your browser at http://localhost:3000/

Sample algorithms

  1. Random Play
  2. Random Search
  3. HillClimbing
  4. Augmented Random Search
  5. Deep Deterministic Policy Gradient

Environments

MK

Adaptation of https://github.com/mgechev/mk.js

MK running

Action space

Action is an object containing two keys, subzero & kano. Each key contains an array of 18 probabilities which represent possible actions for the users. The sum of all actions should be ~1.

The environment is stochastic, and uses weighted random choice to select a move for your agent. Unless you pass one hot action.

State space

47 floating numbers between 0 & 1

TetNet

Adaptation of https://github.com/IdreesInc/TetNet

TetNet running

Action space

Integer in the range of [0, 11).

State space

Javascript object containing information about the game.

You can’t perform that action at this time.