diff --git a/pybop/optimisers/_random_search.py b/pybop/optimisers/_random_search.py index e8b794dc6..0a52f42cc 100644 --- a/pybop/optimisers/_random_search.py +++ b/pybop/optimisers/_random_search.py @@ -18,9 +18,8 @@ class RandomSearchImpl(PopulationBasedOptimiser): References: - The Random Search algorithm implemented in this work is based on principles outlined - in: - Introduction to Stochastic Search and Optimization: Estimation, Simulation, and Control - - by Spall, J. C. (2003). + in "Introduction to Stochastic Search and Optimization: Estimation, Simulation, and + Control" by Spall, J. C. (2003). The implementation leverages the pints library framework, which provides tools for population-based optimization methods. """ @@ -30,7 +29,7 @@ def __init__(self, x0, sigma0=0.05, boundaries=None, population_size=None): self._dim = len(x0) # Initialize _dim first super().__init__(x0, sigma0, boundaries=boundaries) - + # Population size, defaulting to a suggested value self._population_size = population_size or self._suggested_population_size() self.step_size = self._sigma0 @@ -70,7 +69,7 @@ def tell(self, replies): """ if not self._ready_for_tell: raise RuntimeError("Optimiser not ready for tell()") - + self._iterations += 1 self._ready_for_tell = False diff --git a/pybop/optimisers/pints_optimisers.py b/pybop/optimisers/pints_optimisers.py index d40a95788..33ed02593 100644 --- a/pybop/optimisers/pints_optimisers.py +++ b/pybop/optimisers/pints_optimisers.py @@ -688,9 +688,8 @@ class RandomSearch(BasePintsOptimiser): """ Adapter for the Random Search optimiser in PyBOP. - Random Search is a simple optimisation algorithm that samples parameter - sets randomly within the given boundaries and identifies the best solution - based on fitness. + Random Search is a simple optimisation algorithm that samples parameter sets randomly + within the given boundaries and identifies the best solution based on fitness. Parameters ----------