Skip to content

x052/rljs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RLJS - Reinforcement Learning Library for JavaScript

RLJS is a JavaScript library for implementing reinforcement learning algorithms, providing tools and utilities for building and training RL models in Node.js environments.

Features

  • Deep Q-Network (DQN): Implementation of the Deep Q-Learning algorithm
  • Graph Utilities: Tools for working with graph-based environments
  • Matrix Operations: Matrix manipulation utilities for neural networks
  • Reinforcement Learning Core (R): Core RL functionality and utilities
  • Solver: Generic solver interface for RL problems
  • Utility Functions: Helper functions for RL implementations

Usage

const { DQN, Graph, Solver, Matrix, utils } = require('rljs');

// Example: Creating a DQN agent
const agent = new DQN({
  stateSize: 4,
  actionSize: 2,
  hiddenLayers: [32, 32]
});

// Example: Using the Graph utilities
const graph = new Graph();
// Add nodes and edges as needed

// Example: Matrix operations
const matrix = new Matrix(3, 3);
// Perform matrix operations

API Documentation

DQN (Deep Q-Network)

The DQN class implements the Deep Q-Learning algorithm for training agents in environments with discrete action spaces.

Graph

The Graph class provides utilities for working with graph-based environments, including node and edge management.

Matrix

The Matrix class offers matrix operations essential for neural network computations.

R (Reinforcement Learning Core)

Core functionality for reinforcement learning, including state management and reward processing.

Solver

A generic interface for implementing different RL solvers and algorithms.

Utils

Collection of utility functions for common RL operations and calculations.

Examples

Check the source code for detailed examples of how to use each component.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

  • Inspired by various RL implementations and research papers

About

DQN learning in javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published