Task objects abstract away the difficulties of actually carrying out the tasks, and allow a uniform interface to the controller and memory across different platforms.

Task objects define a .step() method; on each iteration through the main agent loop, the Task is stepped, and the Task Stack steps its highest priority Task. The Task objects themselves are not generic across agents; and can be heuristic or learned. In the current droidlet agent controller, they are registered here, here and here

class base_agent.task.Task[source]

This class represents a Task, the exact implementation of which will depend on the framework and environment. A task can be placed on a task stack, and represents a unit (which in itself can contain a sequence of s smaller subtasks).

Variables
• ~Task.memid (string) – Memory id of the task in agent’s memory

• ~Task.interrupted (bool) – A flag indicating whetherr the task has been interrupted

• ~Task.undone (bool) – A flag indicating whether the task was undone / reverted

• ~Task.throttling_tick (int) – The threshold beyond which the task will be throttled

• ~Task.stop_condition (Condition) – The condition on which the task will be stopped (by default, this is NeverCondition)

Examples::
>>> Task()

add_child_task(t, agent, pass_stop_condition=True)[source]

check_finished()[source]

Check if the task has mark itself finished

Returns

Return type

bool

interrupt()[source]

Interrupt the task and set the flag

step(agent)[source]

The actual execution of a single step of the task is defined here.

The Task Stack is maintained by the Memory system, and provides methods for examining and manipulating Task Objects. See the task_stack functions in memory.