get_or_create_schema


Description:

public Schema get_or_create_schema (WorldState preconditions, Action action, WorldState postconditions, bool? use_action = true)

Retrieves a schema with the specified preconditions, action and postconditions if one exists, otherwise creates a new schema.

Parameters:

preconditions A WorldState specifying the desired schema's preconditions.
action An Action this schema should perform.
postconditions A WorldState specifying the desired schema's postconditions.
useAction A boolean stating whether the supplied action should be used when searching for schemas (optional).

Returns:

Either an existing schema found to be matching the provided conditions or a new schema.