9 unstable releases (3 breaking)
0.4.1 | Oct 1, 2022 |
---|---|
0.4.0 | Sep 29, 2022 |
0.3.0 | Sep 22, 2022 |
0.2.4 | Jul 30, 2022 |
0.1.0 | Jul 23, 2022 |
#817 in Machine learning
35 downloads per month
Used in entity-gym-rs
165KB
2K
SLoC
RogueNet Rust
The rogue-net crate provides a pure Rust implementation of the RogueNet neural network. It can be used to load agents created with the Entity Neural Network Trainer and use them inside Rust applications.
use std::collections::HashMap;
use ndarray::prelude::*;
use rogue_net::RogueNet;
let rogue_net = RogueNet::load("checkpoint-dir");
let mut entities = HashMap::new();
entities.insert("Head".to_string(), array![[3.0, 4.0]]);
entities.insert("SnakeSegment".to_string(), array![[3.0, 4.0], [4.0, 4.0]]);
entities.insert("Food".to_string(), array![[3.0, 5.0], [8.0, 4.0]]);
let (action_probs, actions) = rogue_net.forward(&entities);
Dependencies
~13–24MB
~373K SLoC