cgpy
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]
print(cgp.eval(pnt))
See more examples in the example folder and the documentation at www.cgpy.org
Cgpy is developed by Viktor Wase with contributions and assistance from John Brynte Turesson and Johannes Wennberg.
Release files for cgpy 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cgpy-0.0.6.tar.gz | 9.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cgpy-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.6 kB
Release files / cgpy-0.0.6.tar.gz
| Download URL | cgpy-0.0.6.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3ac65b5c40abc4f73e887b676f0bcbcecea250fac9b3334ab295f0a2108b404
|
|
BLAKE2b-256 checksum How to use checksums |
4fbfec73343c0767ee8e1283a11745821c3cd440b4e743933a886b2b831aa79f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.7
|
Release files / cgpy-0.0.6-py3-none-any.whl
| Download URL | cgpy-0.0.6-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67c0ab4eef2cfd06005d7c13c0908f1374db3277e864170646d2bee81c258c39
|
|
BLAKE2b-256 checksum How to use checksums |
4d6818058034b575c8f0fa8434977fedc69bfa869068449205178fb158c1d1db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.7
|