Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A Python library for Cartesian genetic programming.

Project description


A Python library for Cartesian genetic programming.

Unit tests

Run python -m unittest discover -v in the root folder.

Getting Started

Install the package using pip pip install cgpy

The following code creates a random CGP and evaluates its function

op_table = [Operation("+"), Operation("*"), Operation("sin")]

dims = 2
nr_of_parameters = 0
nr_of_nodes = 5
cgp = create_random_cgp(dims, nr_of_parameters, op_table, nr_of_nodes)

pnt = [0.5, 1.5]

See more examples in the example folder and the documentation at

Project details

Download files

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

Files for cgpy, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size cgpy-0.0.5-py3-none-any.whl (11.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size cgpy-0.0.5.tar.gz (8.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page