Library for the use of various variants of the Gene-pool Optimal Mixing Evolutionary Algorith (GOMEA).
Reason this release was yanked:
Error when building using source distribution.
Project description
README
The Gene-pool Optimal Mixing Evolutionary Algorithm (GOMEA) is a state-of-the-art Model-Based Evolutionary Algorithm (MBEA) with an ongoing line of research into various domains of (evolutionary) optimization. The initial release of the GOMEA library (v1.0.0) is described in the publication:
The current release of the GOMEA library supports optimization in the following domains:
- Discrete single-objective optimization
- Real-valued single-objective optimization Support for multi-objective optimization in both of these domains is planned for a future release.
Relevant most recent publications are the following:
- Dushatskiy, A., Virgolin, M., Bouter, A., Thierens, D., & Bosman, P.A.N. (2021). Parameterless Gene-pool Optimal Mixing Evolutionary Algorithms. arXiv preprint arXiv:2109.05259.
- Bouter, A., Alderliesten, T., & Bosman, P.A.N. (2021). Achieving highly scalable evolutionary real-valued optimization by exploiting partial evaluations. Evolutionary computation, 29(1), 129-155.
INSTALL
The most straightforward installation option is through pip, as follows.
pip install gomea
To build from source, execute the following in the root GOMEA folder.
make install
RUN
Running a simple benchmark problem, e.g., the Rosenbrock function, can be done as follows:
import gomea
frv = gomea.fitness.RosenbrockFunction(10,value_to_reach=1e-10)
lm = gomea.linkage.Univariate()
rvgom = gomea.RealValuedGOMEA(fitness=frv, linkage_model=lm, lower_init_range=-115, upper_init_range=-100)
result = rvgom.run()
Plotting a simple convergence plot can then be done using:
import matplotlib.pyplot as plt
plt.grid()
plt.yscale('log')
plt.xscale('log')
plt.xlabel('Number of evaluations')
plt.ylabel('Best objective value')
plt.plot(result['evaluations'],result['best_obj_val'])
Rather than using a predefined fitness function, it is also possible to define your own custom fitness function for Black-Box Optimization (BBO) or Gray-Box Optimization (GBO). The definition of a custom (real-valued) BBO function can be done as follows.
class CustomRosenbrockFunction(gomea.fitness.BBOFitnessFunctionRealValued):
def objective_function( self, objective_index, variables ):
f = 0
for i in range(len(variables)-1):
x = variables[i]
y = variables[i+1]
f += 100*(y-x*x)*(y-x*x) + (1.0-x)*(1.0-x)
return f
dim = 10
f_rosenbrock = CustomRosenbrockFunction(dim,value_to_reach=1e-10)
The definition of a GBO function requires defining the input and output of each subfunction. Thorough definitions of this are given in the EvoSOFT workshop paper. An example of the Rosenbrock function defined in a GBO setting is as follows:
class CustomRosenbrockFunction(gomea.fitness.GBOFitnessFunctionRealValued):
def number_of_subfunctions( self ):
return self.number_of_variables-1
def inputs_to_subfunction( self, subfunction_index ):
return [subfunction_index, subfunction_index+1]
def subfunction(self, subfunction_index, variables):
x = variables[subfunction_index]
y = variables[subfunction_index+1]
return 100*(y-x*x)*(y-x*x) + (1.0-x)*(1.0-x)
dim = 10
f_rosenbrock = CustomRosenbrockFunction(dim,value_to_reach=1e-10)
Further examples are given in the demos directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for gomea-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 516fa927e04596861fdc76a65357eefa0d9acedd4ded4c58a209fa6324b215c6 |
|
MD5 | d723a7a9f82461e760dbb0913c91538b |
|
BLAKE2b-256 | ec66fa24993249d4550ec5551e46b20eb86f749bf705e5e14c2216d32cdd7e76 |
Hashes for gomea-1.0.1-cp311-cp311-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0b9d9d4edb9c7371a99a4fbf7655b46f3612ba5020dc6e15799f001bd537e43 |
|
MD5 | a536b32c411ecf9087fbeaf66eb9209f |
|
BLAKE2b-256 | adc8afe6b7bfaecaf1acb4bb3785ecf37bee7bd057a5ab97cca771f462fa7d6c |
Hashes for gomea-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ffae02cfb26df6de56fae7c773d0d5c56d8477b5bff94fbeb7b1136c8873c41 |
|
MD5 | 5a2494ede8b8e5d05e97623e0c0d2d5b |
|
BLAKE2b-256 | b7accac77dd99cb12017be11a06fa6cb0eb63183c037f069a21dcf31752521f1 |
Hashes for gomea-1.0.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc9ee441e368c40f8c099adf6fe7b3afc5e0540e62f911fa061a143de071d01b |
|
MD5 | 0bba20faa1a16c515a8e8e50975006e1 |
|
BLAKE2b-256 | be41a27db34eb445d151e14ea156ef0b633bd1148aaf903dba67f32c3be30487 |