Adaptive parameter resolution for the engine.
A rate field in a config can hold a constant, a function of the
generation, or a decay strategy tuple. resolve/2 returns the number
to use for a given generation. The two factories build the built-in
decay strategies; the tuples are sugar for them.
Summary
Functions
Builds an exponential decay starting at start, multiplied by rate
each generation, never dropping below min_val.
Builds a linear decay from start to finish over max_gen
generations. The value stays at finish once max_gen is passed.
Returns the parameter value for generation.
Resolves the adaptive fields of config for generation, returning a
config with numbers in place of functions and decay tuples. Fields
holding constants pass through unchanged, and fields absent from the
config (gaussian_sigma on encodings without it) are left alone.
Functions
Builds an exponential decay starting at start, multiplied by rate
each generation, never dropping below min_val.
Builds a linear decay from start to finish over max_gen
generations. The value stays at finish once max_gen is passed.
Returns the parameter value for generation.
Constants pass through unchanged, functions are called with the generation, and decay strategy tuples expand through their factory.
Resolves the adaptive fields of config for generation, returning a
config with numbers in place of functions and decay tuples. Fields
holding constants pass through unchanged, and fields absent from the
config (gaussian_sigma on encodings without it) are left alone.