pub trait Featurizable {
    fn num_feats() -> usize;
    fn feature_names() -> Vec<String>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
; fn featurize(&self) -> Vec<f32>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
    A: Allocator,
; fn name() -> &'static str; }
Expand description

A data structure that can be serialized into a data format that can be processed by a neural network.

Can be derived for structs where all fields are numeric, boolean, or Featurizable.

Example

use entity_gym_rs::agent::Featurizable;

#[derive(Featurizable)]
struct Player { x: i32, y: i32, is_alive: bool }

Required Methods

Returns the number of features after conversion to a vector.

Returns a list of human readable labels corresponding to each feature.

Serializes the entity into a vector of features.

Returns a human readable name for the entity.

Implementations on Foreign Types

Implementors