mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 02:58:50 +00:00

* added policy_gradient, modified main, ddpg and README * fixed typo in README * removed unnecessary imports * small refactor * Use clap for picking up the subcommand to run. --------- Co-authored-by: Laurent <laurent.mazare@gmail.com>
24 lines
688 B
Markdown
24 lines
688 B
Markdown
# candle-reinforcement-learning
|
|
|
|
Reinforcement Learning examples for candle.
|
|
|
|
This has been tested with `gymnasium` version `0.29.1`. You can install the
|
|
Python package with:
|
|
```bash
|
|
pip install "gymnasium[accept-rom-license]"
|
|
```
|
|
|
|
In order to run the examples, use the following commands. Note the additional
|
|
`--package` flag to ensure that there is no conflict with the `candle-pyo3`
|
|
crate.
|
|
|
|
For the Policy Gradient example:
|
|
```bash
|
|
cargo run --example reinforcement-learning --features=pyo3 --package candle-examples -- pg
|
|
```
|
|
|
|
For the Deep Deterministic Policy Gradient example:
|
|
```bash
|
|
cargo run --example reinforcement-learning --features=pyo3 --package candle-examples -- ddpg
|
|
```
|