Skip to content

Getting Started

Installing

Installing Radiate is straightforward. Below are the instructions for each language - use whichever applicable package manager you prefer.

pip install radiate
cargo add radiate -F gp

# Or Cargo.toml
[dependencies]
radiate = { version = "x", features = ["gp", ...] }

Importing

To use Radiate, simply import it in your project as such:

import radiate as rd
use radiate::*;

Feature Flags

By installing the above, you will get the core library. However, Radiate has a few optional features that you can enable to extend its functionality.

Python

# requirements.txt
radiate=0.0.9

Python's radiate package does not have any optional features - it is a single package that includes all functionality.

Rust

[dependencies]
# Include the radiate crate with all optional features enabled.
radiate = { version = "1.2.19", features = ["gp", "serde", "rayon", "pgm"] }

opt-in features include:

  • gp: Enables the genetic programming features, allowing you to work with tree and graph-based representations.
  • serde: Enables serialization and deserialization features, allowing you to save and load the Ecosystem state to/from disk. This is useful for long-running evolutionary processes or for resuming experiments.
    • Includes support for: Ecosystem, Population, Species, Phenotype, Genotype, all Chromosomes and their associated Genes, plus gp's Graph and Tree structures.
  • rayon: Enables parallel processing through the Rayon library. Radiate can run in parallel without this feature, but this is included due to its popularity and ease of use.
    • Note that the difference in performance between running with radiate's internal threadpool vs. Rayon is negligible for most use cases, so you can safely run without it if you prefer.
  • pgm: This is an EXPERIMENTAL feature which enables probabilistic graphical models evolution. This is an add-on to the gp feature that allows Ops to hold tree structures, which enable nested graphical models.
    • This feature is still under active development and may change in future releases.
    • This feature also automatically enables the gp feature.