Skip to content

Exogenous Functions & Sensing

Victor Mataré edited this page May 22, 2023 · 1 revision

Exogenous Functions

An exogenous function can be called by the agent like a regular function, but its result is not defined by the golog++ program. Instead, the call is passed on to the platform backend, which is then responsible for producing a result. This implies that the agent has no knowledge about the relation between the current world (fluent) state and the return value of any given exog_function.

A typical use case for calling an exog_function anywhere in a golog++ program is to read a sensor input that is always available (encoders, battery charge, etc.).

Syntax

TYPE exog_function NAME(ARGS...) // No body, implementation lives in the platform backend

Sensing Actions

If a certain action has to be performed before some sensor can produce a sensible result (e.g. to move a sensor closer to an object), a sensing action should be used. A sensing action is a regular action with a senses: field, which specifies an assignment from an exog_function to some fluent, which is executed when the action completes.

Clone this wiki locally