REnforce

App Listed Dormant

Reinforcement learning library written in Rust

Checked · Sources

Downloads
Not measured
Dependents
Not applicable
Stars
24
Forks
3
Contributors
1
Commits
114

About

From the project README ·

Reinforcement library written in Rust

This library is still in early stages, and the API has not yet been finalized. The documentation can be found here. Contributions and comments are welcomed.

As things are right now, the main focus has been on getting some working examples to see how the library can be used, to get a feel for how reasonable the API is, and to get more comfortable with RL. Going forward, the API still needs to be improved (made more intuitive and customizable), the code needs to be safer (less prone to panic), more RL algorithms need to be incorporated, and the documentation needs a lot of work.

Adding library to your project

Use cargo to add this library to your project. This library is not in crates.io yet, so add the following to your Cargo.toml in order to include it

[dependencies]
renforce = {git = "https://github.com/NivenT/REnforce.git"}

and remember to extern it in your project

extern crate renforce;

Example Usage

See the examples and tests folders for example usage. In particular, once an environment has been set up, an agent can be trained and tested using code similar to this

Read the full README
fn main() {
	// Create the environment
	let mut env = ExampleEnvironment::new();
	
	// Here, the agent will use linear value approximators for each action in a given state
	// The agent will select actions based on how high of a value it assigns them
	let q_func = QLinear::default(&env.action_space());
	
	// Creates an epsilon greedy Q-agent
	// Agent will use softmax to act randomly 5% of the time
	let mut agent = EGreedyQAgent::new(q_func, env.action_space(), 0.05, Softmax::default());
	
	// Here, we use Q-learning to train the agent
	// By default the discount factor is 0.95,
	//            the learning rate is 0.1,
	//            the trainer trains for 100 episodes when called train
	// We set the learning rate (alpha) to 0.9
	let trainer = QLearner::default(&env.action_space()).alpha(0.9);

	// Magic happens
	trainer.train(&mut agent, &mut env);

	// Simulate one episode of the environment to see what the agent learned
	let mut obs = env.reset();
	while !obs.done {
		env.render();

		let action = agent.get_action(obs.state);
		obs = env.step(action);
	}
	env.render();
}

Contributing

If you see something that could be done better, or have an idea for a feature that you want to add, then fork and sumbit a PR and/or create an issue for it. If you want to contribute, but you're not sure where to start, feel free to email me with any questions.

Progress

A lot remains to be done, but the following reinforcement learning algorithms have been implemented* thus far...

* - implementations possibly flawed, but you have to start somewhere

License
None stated
Crate facts
Not measured
  • Runs on, Native code and Python bindings read crates on crates.io. This entry lists no crate.

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

REnforce beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
REnforce This page App Listed Dormant

Reinforcement learning library written in Rust

Not measured Not applicable 24 Not measured Not measured Not measured None stated
nexar Listed

Distributed runtime that replaces MPI between nodes: point-to-point messages, 11 collectives and RPC over QUIC, with no mpirun or MPI library.

1,191 downloads over 30 days 5 5 0.2.1 CUDA Binds native code: ring. Build uses a native toolchain: bindgen, pkg-config Apache-2.0
rurel Listed Dormant

Flexible, reusable reinforcement learning (Q learning) implementation

150 downloads over 30 days 0 165 0.6.0 GPU support unknown No native code found MPL-2.0
rsrl Listed Dormant

A fast, extensible reinforcement learning framework in Rust

80 downloads over 30 days 0 204 0.8.1 GPU support unknown Binds native code: lapack-sys MIT
gym-rs Listed Dormant

Open AI environments bindings for Rust

75 downloads over 30 days 2 70 2.2.1 GPU support unknown No native code found Apache-2.0 OR MIT
bevy_rl Listed

Build environments for reinforcement learning with bevy

33 downloads over 30 days 1 104 0.17.0 WebGPU No native code found Apache-2.0 OR MIT
revonet Listed Dormant

Rust implementation of real-coded genetic algorithm for solving optimization problems and training of neural networks. The latter is also known as neuroevolution.

9 downloads over 30 days 0 20 0.2.1 GPU support unknown No native code found GPL-3.0
Why ListedNo archive, New or Featured rule places it, so it is Listed.

What it lacks for Featured

What else the check found

  • The last activity is on 3 Aug 2017, 3385 days ago. That reaches the 365 days the rules expect, so the project is dormant. Dormancy rule

Not measured: Latest release, Unpatched vulnerabilities past the grace window, Binary downloads per release, First release.

Exact rules: Listed, Featured app. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: app: E = 365 days
  • dormancy: last activity 2017-08-03, 3385 days ago, E = 365: dormant
  • featured: not featured: dormant and not stable
  • listed: listed: no archive, new or featured rule applies

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources4 sources
AdoptionNot measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependentsNot measuredYes
New dependents (365 days)Not measuredYes
Peak active dependentsNot measuredYes
Active dependents as a share of the peakNot measuredYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 9 years ago8 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2017-08-03GitHub repositoryYes
Latest releaseNot measuredYes
First releaseNot measuredYes
Latest versionNot measuredYes
Days the oldest outside issue waits for a reply0GitHub repositoryYes
Maintainer replies over 365 days0GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repoNot measuredYes
Published docsNot measuredYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityNot measured
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windowNot measuredYes
RustSec unmaintained advisoryNot measuredYes
Deprecation noticeNot measuredYes
Deprecated requirementNot measuredYes
Distribution0 binary downloads over the last 3 releases10 not measured
Distribution measurements
SignalValueSourceFetchedCounts
ReleasesNot measuredYes
Downloads over 30 daysNot measuredYes
Binary downloads over the last 3 releases0GitHub releasesYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleaseNot measuredYes
Every version 0.0.xNot measuredYes
Every version yankedNot measuredYes
Crate deleted from crates.ioNot measuredYes
Repository24 stars, 3 forks, 1 contributors, 114 commits. Stars alone never qualify a project.1 not measured
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars24GitHub repositoryYes — one part of the repository route
GitHub forks3GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account1GitHub contributorsYes — one part of the repository route
Commits on the default branch114GitHub repositoryNo
Repository's main crate left out of the entryNot measuredYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseNone statedGitHub repositoryNo
Runs on, from listed crates and their direct dependenciesNot measuredNo
What shows each backendNot measuredNo
Native code, from listed crates and their dependenciesNot measuredNo
Python bindings, from direct dependencies of listed cratesNot measuredNo
Crates that depend on a listed crate directlyNot measuredNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.