stepCountIs

Stop the tool loop after a number of steps.

The stop condition you will use most. Caps how many times the loop may call the model, which bounds both cost and the chance of an agent spinning.

stopWhen: [stepCountIs(5)]

Signature

func stepCountIs(
    _ count: Int
) -> StopCondition

Defined in Sources/AI/Core/StepControl.swift.

Parameters

ParameterTypeDefault
_Intrequired

Returns

A StopCondition.

See also