You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the explicit information in the tutorial example.
class RandomSearch:
'Simple random search algorithm'
def __init__(self, n: int, length: float = 0.0):
self.n: int = n
self.length: float = length
def __call__(self, problem: ioh.problem.RealSingleObjective) -> None:
'Evaluate the problem n times with a randomly generated solution'
best_fitness = 99999 <-- for minimisation
for _ in range(self.n):
# We can use the problems bounds accessor to get information about the problem bounds
x = np.random.uniform(problem.bounds.lb, problem.bounds.ub)
self.length = np.linalg.norm(x)
fitness = problem(x) <-- get fitness
if fitness < best_fitness: <-- explicit minimisation
best_fitness = fitness <-- explicit asignation
The text was updated successfully, but these errors were encountered:
Please add explicitly in these tutorials whether it is a minimization or maximization problem.
https://github.com/IOHprofiler/IOHexperimenter/blob/master/example/example_star_discr.ipynb
https://github.com/IOHprofiler/IOHexperimenter/blob/master/example/example_sbox.ipynb
https://github.com/IOHprofiler/IOHexperimenter/blob/master/example/example_submodular.ipynb
Add the explicit information in the tutorial example.
The text was updated successfully, but these errors were encountered: