2.7 Programming multi-tasking communicating robotic agents using task atomic TeleoR procedures

We now had a very expressive and clean language for programming multi-threaded communicating robotic agents. A typical agent architecture comprised three threads. One thread, programmed using QuLog action rules, was dedicated to receiving percept facts and atomically updating the agent’s beliefs. Another handled all incoming messages from other agents, atomically updating the agent’s beliefs, and/or sending reply messages, as required. The third evaluated a single TeleoR procedure call. The call was re-evaluated each time the agent’s beliefs were updated, as required by the TeleoR operational semantics Unique operational semantics of a TeleoR procedure call, and periodically new action commands were sent out to the controlled external robotic devices.

The TeleoR call evaluation thread could be extended to interleave the evaluation of more than one TeleoR procedure call providing each call was controlling a quite different robotic device. For example, there could be two calls, two TeleoR tasks, each controlling a different mobile robot. This is an alternative to have a separate agent for each robot. It has the advantage that all sense data percepts from both robots can be accessed by each TeleoR task without the need for inter-agent communication.

Our next enhancement was to allow agent’s to be programmed that could multi-task where the tasks fairly shared the robotic resources with just one task in control of each resource at any given time. This required the declaration of the robotic resources that could be shared by the tasks, and the declaration of certain TeleoR procedures as task atomic. No task can enter a task atomic procedure call until all the robotic resources it might use are free, and no other task has been waiting longer for one of the resources. The resources become free when the call is no longer active in that task. This is the TeleoR described in this manual.


On This Site