Skip to main content

The package for PyGEVO

Project description

PyGEVO: a pythonic Grammatical Evolution framework

PyGEVO is a pythonic low-code framework for Grammatical Evolution. Minimalistic, efficient and powerful, this framework aims to enable non-expert users to easily wrap up a GE experiment in a few lines of codes:

from core.domain.population import Population
from core.domain.algorithms import Algorithms
from core.fitnessFunctions.syntheticFunctions import FitnessFunctions

population = Population(numberIndividuals=6, individualSize=8).generatePop()
population = Algorithms("grammar_ANSI_C.bnf", initBNF=56).evolveWithGE(population, FitnessFunctions.griewank, gen=30, porcentSelect=0.2, staticSelection=100,validIndividuals=True, orderedByFitness=True)
population.showTopTen()

PyGEVO has also the capability to cythonize the whole project, in order to have better performance. For this we call the Compiler and indicate it to compile the project (to import Cython classes is always recommended to use pyximport):

from compiler import Compiler
Compiler.enableCython()
Compiler.compile()

import pyximport
pyximport.install()
from core.domain.population import Population
from core.domain.algorithms import Algorithms
from core.fitnessFunctions.syntheticFunctions import FitnessFunctions

population = Population(numberIndividuals=6, individualSize=8).generatePop()
population = Algorithms("grammar_ANSI_C.bnf", initBNF=56).evolveWithGE(population, FitnessFunctions.griewank, gen=30, porcentSelect=0.2, staticSelection=100,validIndividuals=True, orderedByFitness=True)
population.showTopTen()

This is inspired in the work from Prof. Conor Ryan [1]

PyGEVO is still in an ALPHA stage

Primary Authors

Acknowledgements

References

[1] Conor Ryan, J. J. Collins, and Michael O’Neill. 1998. Grammatical Evolution: Evolving Programs for an Arbitrary Language. In EuroGP (Lecture Notes in Computer Science), Wolfgang Banzhaf, Riccardo Poli, Marc Schoenauer, and Terence C.Fogarty (Eds.), Vol. 1391. Springer, 83–96

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

PyGEVO-0.0.2.tar.gz (24.7 kB view hashes)

Uploaded Source

Built Distribution

PyGEVO-0.0.2-py3-none-any.whl (37.8 kB view hashes)

Uploaded Python 3

Supported by

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