Skip to contents

Optimizer that samples configurations with a SpaceSampler from a candidate pool when the objective has the "pool_restricted" property (typically by inheriting from ObjectivePoolAbstract), or from the full grid of a completely discrete search space (where all parameters are paradox::p_int, paradox::p_fct, or paradox::p_lgl).

When the search space is continuous (not fully discrete) and the objective is not pool-restricted, this optimizer samples directly from the search space.

Creates a new instance of this R6 class.

Arguments

space_sampler

(SpaceSampler)
Sampler used to draw each batch. Default is SpaceSamplerUniform.

grid_expansion_limit

(integer(1))
Upper limit on the number of rows to materialize for the full grid for discrete search spaces in Objectives that are not pool-restricted. An error is raised if the full grid would exceed this limit. This is to protect against accidental usage of too much memory. Default is 1e7L.

Fields

space_sampler

(SpaceSampler)
Wrapped sampler.

param_set

(paradox::ParamSet)
Combined parameter set of this optimizer and the wrapped sampler.

Parameters

batch_size

integer(1)
Number of configurations per batch. Inf evaluates the entire remaining pool in a single batch when replace_samples = "never", or the full pool in each batch when replace_samples = "between_batches". Inf is forbidden when the objective is not pool-restricted and the search space is not fully discrete. Default is 1.

max_batches

integer(1)
Maximum number of batches to evaluate. Inf means no batch limit (termination is governed solely by the instance's terminator). Default is Inf.

replace_samples

character(1)
Controls duplicate handling across evaluations:

  • "never": configurations already present in the archive are excluded from sampling. The pool shrinks as evaluations accumulate.

  • "between_batches": each batch is sampled from the full pool, but previous batches do not affect future sampling.

Default is "never".

pass_known_pool

logical(1)
Whether evaluated configurations from the archive are passed to the SpaceSampler's sample() method as known_pool. Default is TRUE.

The wrapped sampler's parameters are exposed with a space_sampler. prefix.