gemla 0.1.32

Using evolutionary computation to generate machine learning algorithms
Documentation
//! # Gemla
//!
//! **Gemla** is a Rust library for simulating and evolving populations using genetic algorithms. It provides a flexible framework for evolutionary computation, supporting custom node types, tournament bracket simulations, and persistent state management.
//!
//! ## Features
//! - Tournament-style genetic algorithm simulation evaluating populations via nodes
//! - Asynchronous and concurrent simulation using Tokio
//! - Customizable node logic via the [`GeneticNode`] trait
//! - Persistent, file-backed simulation state with the `file_linked` crate
//! - Utilities for binary tree management
//!
//! ## Modules
//! - [`tree`]: Defines an unbalanced binary tree structure and macros for tree construction.
//! - [`core`]: Contains the main simulation logic, including the [`Gemla`] struct, configuration, and node management.
//! - [`error`]: Provides unified error types and logging utilities for the crate.
//!
//! ## Example
//! ```rust,ignore
//! # use gemla::core::{Gemla, GemlaConfig};
//! # use gemla::core::genetic_node::{GeneticNode, GeneticNodeContext};
//! # use file_linked::constants::data_format::DataFormat;
//! # use std::path::PathBuf;
//!
//! #[derive(Clone, Debug)]
//! struct MyNode { /* ... */ }
//! // Implement GeneticNode for MyNode...
//!
//! #[tokio::main]
//! async fn main() {
//!     let mut gemla = Gemla::<MyNode>::new(
//!         &PathBuf::from("state.json"),
//!         GemlaConfig { overwrite: true },
//!         DataFormat::Json,
//!     ).await.unwrap();
//!     // Grows simulation tree by 5 levels
//!     gemla.simulate(5).await.unwrap();
//! }
//! ```
//!
//! ## Crate Organization
//! - All core simulation logic is in [`core`].
//! - Tree structures and macros are in [`tree`].
//! - Error types and helpers are in [`error`].
//!
//! ## Getting Started
//! 1. Define your node type and implement the [`GeneticNode`] trait.
//! 2. Create a [`Gemla`] instance and run simulations.
//! 3. Use the provided error handling and tree utilities as needed.
//!
//! [`Gemla`]: crate::core::Gemla
//! [`GeneticNode`]: crate::core::genetic_node::GeneticNode
//! [`tree`]: crate::tree
//! [`core`]: crate::core
//! [`error`]: crate::error

#![warn(missing_docs)]

#[macro_use]
pub mod tree;
pub mod core;
pub mod error;