SkillAgentSearch skills...

Crux.jl

Julia library for deep reinforcement learning

Install / Use

/learn @sisl/Crux.jl
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Crux.jl

Documentation Build Status Code Coverage

Deep RL library with concise implementations of popular algorithms. Implemented using Flux.jl and fits into the POMDPs.jl interface.

Supports CPU and GPU computation and implements deep reinforcement learning, imitation learning, batch RL, adversarial RL, and continual learning algorithms. See the documentation for more details.

Citation

If you use this package for research purposes, please cite the following:

status

@article{moss2026crux,
  title = {{Crux.jl}: Deep Reinforcement Learning in Julia},
  author = {Robert J. Moss, Anthony Corso, Mykel J. Kochenderfer},
  journal = {Journal of Open Source Software},
  year = {2026},
  volume = {11},
  number = {119},
  doi = {10.21105/joss.09620}
}

Reinforcement Learning

Imitation Learning

Batch RL

Adversarial RL

Continual Learning

Installation

To install the package, run:

] add Crux

Usage

Basic Example (Pure Julia)

A minimal example using DQN to solve a GridWorld problem:

using Crux

mdp = SimpleGridWorld()
S = state_space(mdp)

A() = DiscreteNetwork(Chain(Dense(2, 8, relu), Dense(8, 4)), actions(mdp))

solver = DQN(π=A(), S=S, N=100_000)
policy = solve(solver, mdp)

See the documentation for more examples and details.

Gym Environments

For OpenAI Gym environments like CartPole, install POMDPGym.jl:

] add https://github.com/ancorso/POMDPGym.jl

Note: POMDPGym requires Python with Gymnasium installed (pip install gymnasium).

using Crux, POMDPGym

mdp = GymPOMDP(:CartPole)
as = actions(mdp)
S = state_space(mdp)

A() = DiscreteNetwork(Chain(Dense(dim(S)..., 64, relu), Dense(64, length(as))), as)

solver = REINFORCE(S=S, π=A())
policy = solve(solver, mdp)

See the installation documentation for more details on how to install POMDPGym for more environment.

View on GitHub
GitHub Stars81
CategoryEducation
Updated12d ago
Forks20

Languages

Julia

Security Score

95/100

Audited on Mar 28, 2026

No findings