AbstractWModel#

class ioh.iohcpp.problem.AbstractWModel(self: ioh.iohcpp.problem.AbstractWModel, problem_id: int, instance: int, n_variables: int, name: str, dummy_select_rate: float = 0.0, epistasis_block_size: int = 0, neutrality_mu: int = 0, ruggedness_gamma: int = 0)#

Bases: IntegerSingleObjective

An abstract W-model class. Please apply the WModelOneMax and WModelLeadingOnes classes.

W-model problems applies four basic transformations: reduction of dummy variables, neutrality, epistasis, and fitness perturbation on benchmark problems. Each transformation is configured by the corresponding argument dummy_select_rate, epistasis_block_size, neutrality_mu, and ruggedness_gamma.

The details of the transformations can be found in https://www.sciencedirect.com/science/article/pii/S1568494619308099

We have acknowledged Thomas Weise, proposing the original W-model https://dl.acm.org/doi/abs/10.1145/3205651.3208240 and having discussions supporting this work.

[WeiseW18] Thomas Weise and Zijun Wu. “Difficult features of combinatorial optimization problems and the tunable w-model benchmark problem for simulating them.” Proc. of the Genetic and Evolutionary Computation Conference Companion, 1769-1776, 2018

[DoerrYHWSB20] Carola Doerr, Furong Ye, Naama Horesh, Hao Wang, Ofer M. Shir, Thomas Bäck. “Benchmarking discrete optimization heuristics with IOHprofiler.” Applied Soft Computing, 88: 106027, 2020

Attributes Summary

bounds

The bounds of the problem.

constraints

The constraints of the problem.

log_info

The data is that being sent to the logger.

meta_data

The static meta-data of the problem containing, e.g., problem id, instance id, and problem's dimensionality

optimum

The optimum and its objective value for a problem instance

problems

state

The current state of the optimization process containing, e.g., the current solution and the number of function evaluated consumed so far

Methods Summary

__call__

Evaluate the problem.

add_constraint

add a constraint

attach_logger

Attach a logger to the problem to allow performance tracking.

create

Create a problem instance

detach_logger

Remove the specified logger from the problem.

enforce_bounds

Enforced the bounds (box-constraints) as constraint :param weight: :type weight: The weight for computing the penalty (can be infinity to have strict box-constraints) :param how: :type how: The enforcement strategy, should be one of the 'ioh.ConstraintEnforcement' options :param exponent: :type exponent: The exponent for scaling the contraint

remove_constraint

remove a constraint

reset

Reset all state variables of the problem.

wmodel_evaluate(self, arg0)

Attributes Documentation

bounds#

The bounds of the problem.

constraints#

The constraints of the problem.

log_info#

The data is that being sent to the logger.

meta_data#

The static meta-data of the problem containing, e.g., problem id, instance id, and problem’s dimensionality

optimum#

The optimum and its objective value for a problem instance

problems#
state#

The current state of the optimization process containing, e.g., the current solution and the number of function evaluated consumed so far

Methods Documentation

__call__()#

Evaluate the problem.

Parameters:

x (list) – the search point to evaluate. It must be a 1-dimensional array/list whose length matches search space’s dimensionality

Returns:

The evaluated search point

Return type:

float

Evaluate the problem.

Parameters:

x (list[list]) – the search points to evaluate. It must be a 2-dimensional array/list whose length matches search space’s dimensionality

Returns:

The evaluated search points

Return type:

list[float]

add_constraint()#

add a constraint

attach_logger()#

Attach a logger to the problem to allow performance tracking.

Parameters:

logger (Logger) – A logger-object from the IOHexperimenter logger module.

static create()#

Create a problem instance

Parameters:
  • problem_name (a string indicating the problem name.) –

  • instance_id (an integer identifier of the problem instance, which seeds the random generation) – of the tranformations in the search/objective spaces

  • dimension (integer, representing the dimensionality of the search space) –

Create a problem instance

Parameters:
  • problem_id (the index of the problem to create.) –

  • instance_id (an integer identifier of the problem instance, which seeds the random generation) – of the tranformations in the search/objective spaces

  • dimension (integer, representing the dimensionality of the search space) –

detach_logger()#

Remove the specified logger from the problem.

enforce_bounds()#

Enforced the bounds (box-constraints) as constraint :param weight: :type weight: The weight for computing the penalty (can be infinity to have strict box-constraints) :param how: :type how: The enforcement strategy, should be one of the ‘ioh.ConstraintEnforcement’ options :param exponent: :type exponent: The exponent for scaling the contraint

remove_constraint()#

remove a constraint

reset()#

Reset all state variables of the problem.

wmodel_evaluate(self: ioh.iohcpp.problem.AbstractWModel, arg0: List[int]) int#