A Python library for Cartesian genetic programming.
Project description
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cgpy-0.0.6.tar.gz.
File metadata
- Download URL: cgpy-0.0.6.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3ac65b5c40abc4f73e887b676f0bcbcecea250fac9b3334ab295f0a2108b404
|
|
| MD5 |
30b1cf19fe07d7e6d1e2e477ab8e2d68
|
|
| BLAKE2b-256 |
4fbfec73343c0767ee8e1283a11745821c3cd440b4e743933a886b2b831aa79f
|
File details
Details for the file cgpy-0.0.6-py3-none-any.whl.
File metadata
- Download URL: cgpy-0.0.6-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67c0ab4eef2cfd06005d7c13c0908f1374db3277e864170646d2bee81c258c39
|
|
| MD5 |
6957b6c2bd06a576be78ac7a146effd3
|
|
| BLAKE2b-256 |
4d6818058034b575c8f0fa8434977fedc69bfa869068449205178fb158c1d1db
|