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.4

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

Rust

[dependencies]
radiate = { version = "1.2.14", features = ["gp", "serde", "rayon"] }

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, allowing you to run evaluations in parallel across multiple threads. 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 performanec between running with and without Rayon is negligible for most use cases, so you can safely run without it if you prefer.