RegisterBruteforceEvaluation Function

Registers a bruteforce evaluation function. The function will be called on each simulation step which returns what actions to take next. See Custom BruteforceEvaluation for an example of how to use this function.

Syntax

void RegisterBruteforceEvaluation(
const string&in identifier,
const string&in title,
OnBruteforceEvaluate@ callback,
RenderBruteforceEvaluationSettings@ renderCallback = null
)

Parameters

const string&in identifier
A unique identifier for this bruteforce evaluation. This identifier will be used to set the bf_target variable.

const string&in title
The title that will be displayed in the optimization target combo control in the bruteforce tab.

OnBruteforceEvaluate@ callback
The function that will be called on each simulation step.

RenderBruteforceEvaluationSettings@ renderCallback = null
Optional. A function that will be called to render the settings for this bruteforce evaluation.

Return value

None.

Remarks

The evaluation function’s task is to return an action that the bruteforce algorithm should take next. Modifying the simulation state will invalidate internal state of bruteforce, therefore your function must not modify any current simulation state. The state should be treated as completely read-only and changing any state will result in undesired behavior. This includes calling SimulationManager::RewindToState or changing the state in place through properties like SimulationManager::Dyna.