dcgp
dcgp: Differentiable Cartesian Genetic Programming made easy. - Published in JOSS (2020)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
1 of 9 committers (11.1%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Scientific Fields
Repository
Implementation of a differentiable CGP (Cartesian Genetic Programming)
Basic Info
Statistics
- Stars: 112
- Watchers: 9
- Forks: 29
- Open Issues: 8
- Releases: 12
Metadata Files
README.md
dCGP
Implementation of differentiable Cartesian Genetic Programming (dCGP)
The dCGP is a development in the field of Genetic Programming that adds the information about the derivatives of the program output with respect to the input values and various parameters (weights, biases, etc..). In doing so, it enables a number of new applications currently the subject of active research.
- The representation of deep neural networks using a dCGPANN allows the whole network to be encoded and evolved, including the connection topology, the weights, the biases, etc, .... as well as to learn the weights and biases using backpropagation.
- The solution to boundary values problems, differential equations etc. can be encoded in a dCGP and evolved against different boundary conditions or initial conditions
- Prime integrals of motion can be represented by a dCGP and learned
- Symbolic regression tasks can learn ephemeral constants using backprop or even higher order methods.
Please quote the use of differentiable Cartesian Programming as:
Izzo, Dario, Francesco Biscani, and Alessio Mereta. "Differentiable Genetic Programming." arXiv preprint arXiv:1611.04766 (2016).
Please quote the use of the software here provided as:
Izzo, Dario, Francesco Biscani (2020). dcgp: Differentiable Cartesian Genetic Programming made easy. Journal of Open Source Software, 5(51), 2290, https://doi.org/10.21105/joss.02290
Preliminary documentation can be found at http://darioizzo.github.io/dcgp/
A web based version of an early dCGP version can be found here: https://esa.github.io/dcgp-web/ thanks to Mike Heddes!
Installation guide
C++
dCGP is a header-only library which has the following third party dependencies:
- Boost, various C++ utilities (>=1.72).
- Eigen, linear algebra library (>=3.3.0)
- Pagmo, parallel optimization library (>=2.15).
- tbb, lets you easily write parallel C++ programs that take full advantage of multicore performance (>=2020.1).
- AuDi, high order automated differentiation library (>=1.8).
- Symengine, symbolic manipulation of math expressions (>=0.6).
In case you plan to use the package manager conda to install the necessary dependencies, the following packages will be required:
boost-cpp, eigen, pagmo-devel, tbb, audi, symengine, obake-devel
while we also suggest to install:
cmake, cxx-compiler
After making sure the dependencies above are installed and found in your system, you may download the latest dCGP code via git:
bash
git clone https://github.com/darioizzo/dcgp.git
and configure your build using CMake.
When done, type (in your build directory):
bash
make
When finished, to run the tests type:
bash
make test
If succesfull, you may now install cgp:
bash
make install
The headers will be installed in the CMAKEINSTALLPREFIX/include directory.
Python
The main functionalities of dCGP are exposed into a Python module called dcgpy which
can be installed from conda (OSx, linux and Win), pip (only linux) or by building the module.
Installing with conda
dcgpy is available in the conda <https://conda.io/en/latest/>__ package manager
from the conda-forge <https://conda-forge.org/>__ channel. A single package is available:
dcgp-python <https://anaconda.org/conda-forge/dcccgp-python>__, which contains thedcgpypython module.
In order to install dcgpy via conda, you just need
to add conda-forge to the channels:
conda config --add channels conda-forge
conda install dcgp-python
Please refer to the conda documentation <https://conda.io/en/latest/>__ for instructions
on how to setup and manage your conda installation.
You may test the successfull installation by running the python tests typing:
python -c "from dcgpy import test; test.run_test_suite(); import pygmo; pygmo.mp_island.shutdown_pool(); pygmo.mp_bfe.shutdown_pool()"
Installing with pip (deprecated)
We also provide the pip packages (mainly for linux 64 bit architectures and versions <= 1.4.1).
Check on the PyPi dcgpy page <https://pypi.org/project/dcgpy/>_ if the needed package is provided.
pip install dcgpy
Building
To build the module you need to have the Boost Python libraries installed and to activate the BUILDDCGPY option from within CMake (and deselect BUILDDCGP)
Check carefully what Python version is detected and what libraries are linked to. In particular select the correct boost_python according to the Python version (2 or 3) you want to compile the module for.
The CMAKEINSTALLPREFIX will be used to construct the final location of headers and Python module after install.
When done, type (in your build directory):
make install
To check that all went well fire-up your Python console and try the example in :ref:quick-start example <getting_started_py>.
Other CGP libraries
Comparison to the CGP-Library
If all below statements are true: * You do not care about knowing derivatives of your encoded program * You do not care about run-time capabilities * You do not care about the Python module * You do not care about the possibility of defining your kernel functions as complex functors (e.g. CGP expressions.) * You do not care about thread-safety
then you should consider using, instead, Andrew Turner's CGP-Library (http://www.cgplibrary.co.uk/files2/About-txt.html) which is, roughly, twice as fast to compute a CGP expression as it makes use of function pointers rather than a type-erased function wrapper to define the kernel functions.
Community guidelines
Report bugs
Please submit any bugs as an issue to https://github.com/darioizzo/dcgp/issues.
It would be greatly appreciated if the issue templates we provide can be used.
Contributing
If anyone wishes to contribute to this project, please submit early on a pull request marked as "(WIP) - pull request title". We will be then discussing how to implement the desired functionality directly on the PR.
A guide on how to submit pull requests can be found on https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request.
Owner
- Name: Dario Izzo
- Login: darioizzo
- Kind: user
- Location: Noordwijk
- Company: European Space Agency
- Website: www.esa.int/act
- Repositories: 15
- Profile: https://github.com/darioizzo
JOSS Publication
dcgp: Differentiable Cartesian Genetic Programming made easy.
Authors
Max Planck Institute for Astronomy (Heidelberg, D)
Tags
Python genetic programming cartesian genetic programming symblic regression neural networksGitHub Events
Total
- Watch event: 5
- Fork event: 1
Last Year
- Watch event: 5
- Fork event: 1
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Dario Izzo | d****o@g****m | 590 |
| Francesco Biscani | b****i@g****m | 46 |
| Yawgmoth90 | y****0@g****m | 28 |
| mikeheddes | m****s@g****m | 15 |
| CoolRunning | m****x@g****m | 7 |
| hejung | h****g@b****e | 5 |
| nullptr | x****e@g****m | 2 |
| Markus Quade | m****e@g****m | 1 |
| Alessio Mereta | a****o@d****t | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 34
- Total pull requests: 63
- Average time to close issues: 4 months
- Average time to close pull requests: 14 days
- Total issue authors: 13
- Total pull request authors: 8
- Average comments per issue: 3.71
- Average comments per pull request: 0.63
- Merged pull requests: 60
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- CoolRunning (9)
- MilesCranmer (5)
- AlOa (4)
- shah314 (4)
- Ohjeah (2)
- hejung (2)
- darioizzo (2)
- FuhgJan (1)
- Armavica (1)
- BernardoGO (1)
- sarmbruester (1)
- ragnorc (1)
- arita37 (1)
Pull Request Authors
- darioizzo (32)
- Yawgmoth90 (9)
- mikeheddes (6)
- hejung (5)
- bluescarni (4)
- CoolRunning (4)
- 0x0L (2)
- Ohjeah (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 7
conda-forge.org: dcgp-python
- Homepage: http://darioizzo.github.io/dcgp/
- License: GPL-3.0-only OR LGPL-3.0-only
-
Latest release: 1.4.3
published almost 6 years ago
Rankings
Dependencies
- JamesIves/github-pages-deploy-action 4.1.4 composite
- actions/checkout v2 composite
- actions/checkout v2 composite
- actions/checkout v2 composite
- actions/checkout v2 composite
- conda-incubator/setup-miniconda v2 composite
- microsoft/setup-msbuild v1.0.2 composite
