eta.core.planning.expand_repetition_step

expand_repetition_step(event, ds, schema=None)[source]

Expand a step containing a repetition eventuality depending on the truth value of its condition.

Parameters:
  • event (Repetition) – The repetition eventuality to expand.

  • ds (DialogueState) –

  • schema (Schema, optional) – The schema (if any) to inherit from when instantiating the sub-eventualities.

Returns:

The updated plan, if successful.

Return type:

PlanNode or None

Notes

TODO: some modifications still need to be made to the method of unbinding local variables, since it may be possible that a variable within a :repeat-until section of a schema first appeared within an episode outside of the :repeat-until section, yet not within the participants list of the schema. This means that these variables will be unbound in memory following execution of the repeating episode, although typically the repetition itself still executes as intended.