Skip to main content

EvoFlow - Evolutionary algorithms for humans

TensorFlow Numpy

You have just found EvoFlow

EvoFlow is a modern hardware accelerated genetic algorithm framework that recast genetic algorithm programing as a dataflow computation on tensors. Conceptually is very similar to how Tensorflow & Keras are approaching deep-learning so if you have experience with any of those you will feel right at home.

Under the hood, EvoFlow leverage Tensorflow or Cupy to provide hardware accelerated genetic operations. If you don't have a GPU, you can run EvoFlow on Google Colab or it will just work fine on your CPU.

Getting started in 30 seconds

  1. Install EvoFlow: pip install evoflow
  2. Head to our hello world notebook that will shows you how to use EvoFlow to solve the classic MaxOne problem.

Tutorials

The following tutorials are availables

Problem Description Key concepts showcased
MaxOne Maximize the number of ones in a chromosome
  • EvoFlow core API
  • RandomMutation OP
  • UniformCrossOver Op
  • Evolution model construction
  • Results basic usage
Travel Salesman problem Visit each city once while minimizing the distance traveled
  • Custom Fitness function
  • Genes permuting Ops: Shuffle and Reverse
  • Evolution model programatic construction

Genetic Algorithm are used to solve a wide variety of problems

Deep-learning versus Evoluationary algorithms

Generally you want to use Deep-learning when the problem is continious/smooth and evoluationary algorithms when the problem is discrete. For example voice generation is smooth and solving (non-linear) equations is discrete.

Concretely this means that the fitness functions you use to express what constraint to solve are very similar to the loss functions in deep-learning except they don't need to be differentiable and therefore can perform arbitrary computation.

However the cost of fitness function increased expressiveness and flexibility compared to neural network loss is that we don't have the gradients to help guide the model convergence and therefore coverging is more computationaly expensive which is why having a hardware accelerated framework is essential.

Genetic Algorithm terminology

  • Gene: atomic unit. Equivalent to a neuron in deep-learning.
  • Chromosome: ordered list of gene(s).
  • Genotype: collection of chromosome(s). Used when the problem requires to maximizes multiples fitness function at once.
  • Population of x: collection of chromosomes or genotypes. That is what makes a Tensor.
  • Generation: One round of evolution. Equivalent to an epoch in deep-learning.
  • Fitness function: Function that evaluate how good/fit a given chromosome is. this is equivalent to the loss function in deep learning except it doesn't need to be differentiable and aim to be maximized.

EvoFlow Terminology

  • Evoluation op: Operation performed on a population of chromosome to make them evolve. Common ops includes various type of Chromosomal crossovers and Chromosomal mutations. Equivalent to deep-learning layers (e.g a convolution layer).

  • Evolution model: Directed graph of evolutionary ops that is used to evolve the population. This is equivalent to a model architecture in deep-learning settings.

Disclaimer

This is not an official Google product.

Metadata

Release files for evoflow 0.4.1-1590128302

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evoflow 0.4.1-1590128302
File Size Uploaded
evoflow-0.4.1-1590128302.tar.gz 38.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for evoflow 0.4.1-1590128302
File Interpreter ABI Platform
evoflow-0.4.1.post1590128302-py3-none-any.whl Python 3 none any Details

Total release size: 125.5 kB

Release files / evoflow-0.4.1-1590128302.tar.gz

Download URL evoflow-0.4.1-1590128302.tar.gz
Size 38.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cea9ac7647e63ef6055dfc0d8288aacbf8fec96e5fe4dd73935b541a447e1121
BLAKE2b-256 checksum
How to use checksums
b4af35dbd18a14e54ffc41632fefd679aa8c99dc1f8e68fbe1c3b78dfc6cbf81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release files / evoflow-0.4.1.post1590128302-py3-none-any.whl

Download URL evoflow-0.4.1.post1590128302-py3-none-any.whl
Size 87.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c40c2d8be1a25ba0c8a62340d9b75a89a1916fbf54b55fbe833eb900322dc5d4
BLAKE2b-256 checksum
How to use checksums
a3a7e862560a60a0df0a585b90c3b15989be9e269c8bc081a9289c6d0f680e84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.4.1-1590128302 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page