Skip to main content

Genetic Algorithms for humans

Project description

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 shows you how to use EvoFlow to solve the classic MaxOne problem.

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

  • evoluationary 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).

  • evoluationary 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evoflow-0.3.1589590038.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evoflow-0.3.1589590038-py3-none-any.whl (76.7 kB view details)

Uploaded Python 3

File details

Details for the file evoflow-0.3.1589590038.tar.gz.

File metadata

  • Download URL: evoflow-0.3.1589590038.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for evoflow-0.3.1589590038.tar.gz
Algorithm Hash digest
SHA256 01163ead37cd7a094cf7200c70b27f0c8a7488325283442d067bc6c7f1696464
MD5 6ff91bc6b00498629ddc74589bae8461
BLAKE2b-256 32aa5e480697eb7b6f653591487aef070c5a19e6ece9889420d2abe15cfc8557

See more details on using hashes here.

File details

Details for the file evoflow-0.3.1589590038-py3-none-any.whl.

File metadata

  • Download URL: evoflow-0.3.1589590038-py3-none-any.whl
  • Upload date:
  • Size: 76.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for evoflow-0.3.1589590038-py3-none-any.whl
Algorithm Hash digest
SHA256 d7f6605f244b8fb4f1140a39b32db55344a8b1348bc9b865262fb50a76592ed7
MD5 6c78c6816cd16f219d40d2b1c350614b
BLAKE2b-256 2f56beda962f6e6bbd752aa71c5906a377f23a1e55bd1124a3346d10d7d8fdac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page