rlkit 0.0.3

A deep reinforcement learning library based on Rust and Candle, providing complete implementations of Q-Learning and DQN algorithms, supporting custom environments, various policy choices, and flexible training configurations. Future support will include more reinforcement learning algorithms, such as DDPG, PPO, A2C, etc.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::io;
mod env;
mod train_q_learning;
mod train_dqn;

fn main() {
    println!("请输入要使用的算法 (1: Q学习, 2: DQN):");
    let mut input = String::new();
    io::stdin()
       .read_line(&mut input)
       .expect("读取输入失败");

    match input.trim() {
        "1" => train_q_learning::train_with_q_learning(),
        "2" => train_dqn::train_with_dqn(),
        _ => println!("无效输入,请输入 1 或 2"),
    }
}