Python version of the ParadisEO framework for metaheuristic optimization
Project description
Table of Contents
Installation
For now, PyParadiseo is only available for Python 3.6.
You can install PyParadiseo with pip
pip install pyparadiseo
Getting Started
The documentation of PyParadiseo is available here
Example of running EO's simple GA (SGA) for the One-Max test problem
from pyparadiseo import Pop
from pyparadiseo.evaluator import FitnessEval,PopLoopEval
from pyparadiseo import evaluator
from pyparadiseo import operator
from pyparadiseo import population
from pyparadiseo import initializer
from pyparadiseo.eo import algo,select_one,continuator
import numpy as np
if __name__ == "__main__":
#set solution type globally
config.set_solution_type('bin')
#make pyparadiseo evaluator from python function
eval = evaluator.fitness(lambda sol: np.count_nonzero(sol))
#generate and evaluate population
init = initializer.random(size=20)
pop = population.from_init(25, init)
pop_eval=evaluator.pop_eval_from_fitness(eval)
pop_eval(pop,pop)
#assemble simple GA
sga = algo.simpleGA(
select_one.det_tournament(4),
operator.OnePtBitCrossover(),.1,
operator.DetBitFlip(),.7,
eval,
continuator.max_generations(self.NGENS)
)
#run algo on pop and print best individual
sga(pop)
print(pop.best())
Components
- EO (Population-based single-objective)
- MO (Trajectory-based single-objective)
- MOEO (Multi-objective)
- Encodings : Binary, Integer, Real, Permutation, Custom
- Genetic Operators : ...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for pyparadiseo-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc61817c69b13b3d1633c2d83e4d5ad5bf78f318f408b53ef78c6df041c0295d |
|
MD5 | 90e5263a64855c7daa61547f7a91f13c |
|
BLAKE2b-256 | 7346d2b56a46b172c74792e955625b1ae69ada0b1039dc886c37b5d316dc0118 |
Close
Hashes for pyparadiseo-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43caf3bed429e09d1753399e22dbdf0445d8df4e7a98e72a2e2f7c0c94b2676b |
|
MD5 | f2e5b56da7e5e485d9ca14885e71f21e |
|
BLAKE2b-256 | 454d70b6f9bec780fcd986a0236f32f8044ec698e827d0d0770e223a6071b2c6 |
Close
Hashes for pyparadiseo-0.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47189ed4bf2f78e1332e6269e95a3d9b8b921dad400e76422af063f627fba8df |
|
MD5 | 2f8d37ddd7b0ee405d64857672ce34db |
|
BLAKE2b-256 | 99813e5c819be4eb5857fd9a4def9814468088d7182bdcbaae00c1e925482788 |
Close
Hashes for pyparadiseo-0.3.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e63309feb88ec9d9a4abbf4d30ef27ff9c48169a741de411acf9b2f6f51eed9 |
|
MD5 | 48dab0622a303980625de543ecdec4ff |
|
BLAKE2b-256 | b555a2ab0751e3de7ca43418988c31e5ec8cea26102a1f690cafb3d817b4495a |
Close
Hashes for pyparadiseo-0.3.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3de4481611dae889854ae3e58cbd091632991bb273e270492cce23c0e0a67d12 |
|
MD5 | 9e35f862d31b0ba2ba3f62e7a0da20ba |
|
BLAKE2b-256 | c8faca3b258c364ab2ed079c661518de8723b903538c44b09f78a02af2ce4603 |