rogue-net

Crates.iorogue-net
lib.rsrogue-net
version0.4.1
sourcesrc
created_at2022-07-23 01:31:45.505809
updated_at2022-10-01 01:29:47.997143
descriptionPure Rust implementation of the RogueNet neural network
homepage
repositoryhttps://github.com/entity-neural-network/rogue-net-rs
max_upload_size
id631230
size307,053
Clemens Winter (cswinter)

documentation

README

RogueNet Rust

Crates.io MIT/Apache 2.0 Crates.io Discord Actions Status

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);
Commit count: 43

cargo fmt