Control principles based on Motion Description Language

 

BIOS provides an interface to MDLe and can execute MDL's high-level command. In this way, each user who chooses the MDLe description gets advantage of a high-level description and its universality. However it has a price that consists in larger code (at least from the experience with other high-level description languages).

Firstly, the proposed MDL2e is not the pure MDLe proposed by Manikonda et al. It is a more general version, extended to be more usable as a behaviour description language. To get some insights into the original MDLe we suggest to read the main work about MDLe.

The differences between the original MDLe and MDL2e arise from the fact that MDLe is very theoretical and MDL2e tries to break the tie between theoretical and practical issues. However, it is still one purpose of MDL2e to follow the original MDLe. So MDLe could be seen as a subset of MDL2e.

The structure of MDL2e consists of two main building blocks: The behaviour and the atom. Atoms are the very basic primitives that could perform anything one wants, for instance moving forward or sending a message. They could be arranged together to get a behaviour. Behaviours and atoms could again be arranged together to get a higher level behaviour. Atoms and behaviours have timers and interrupts that control the execution flow. In MDL2e an atom looks like:

<ATOM name=<string>' interrupt=<string>' duration=''<long>'/>

The name of an atom is a unique name that should describe what to execute e.g. AMOVE. The name of the interrupt defines the interrupt that should be checked if the atom is active. An interrupt could be a boolean expression combining basic interrupts (Basic interrupts are treated like boolean variables. Interrupts are boolean expressions with basic interrupts as variables) like IOBSTACLE. Therefore, the boolean operators AND, OR and NOT are implemented (Currently only implemented in the AVR-C code generator not in the simulation part), see the following Table




An interrupt must be logical 1 to be active.

The duration describes how long an atom should be executed if the interrupt is active. For instance the atom

<ATOM name=AMOVE interrupt=NOT(IOBSTACLE) duration=15/>

would make the robot move forward for 15 time steps if there is no obstacle. A behaviour in MDL2e has the following form:

<BEHAVIOUR name=<string> nterrupt=<string> duration=<long>>
...
...
</BEHAVIOUR>

A very easy behaviour for avoidance could be

<BEHAVIOUR name=BAVOID interrupt=ITRUE duration=infinite>
<ATOM name=AMOVE interrupt=NOT(IOBSTACLE) duration=infinite/>
<ATOM name=ATURNRIGHT interrupt=IOBSTACLE duration=10/>
</BEHAVIOUR>.

As one could see we used predefined words infinite for an infinite execution and ITRUE to state that this behaviour/atom will always be executed.

Having a look at the behaviour we could see that performing loops or doing something randomly is missing. Therfore we introduce two new symbols for the MDL2e flow control. Multiplicity (MULT) for
loops and UNION for randomness (Those names were chosen to state the tight connection between MDL2e and regular expressions. Even the concatenation in a regular expression (regexp) is present. It is expressed through the order of atoms, behaviours, multiplicities and unions. The latter behaviour could be written in an MDLe-regexp as: ((AMOVE, NOT(IOBSTACLE), \infty) . (ATURNRIGHT, IOBSTACLE, 10), ITRUE, \infty)).

We have to augment the behaviour and the atom with an extra argument, the ``probability'' v_p to be able to use unions. This argument is a number that does not state the real probability between 0.0 and 1.0; it just helps to calculate the probability distribution within a union. The distribution is
calculated the following way:



Whereas v_p(i) is the ``probability'' value of the i-th member of the union and N is the number of members. Other calculations could be possible, e.g. \epsilon-greedy for Reinforcement Learning. The extended BEHAVIOUR, ATOM and UNION commands have the following form:



The MULT expression will loop over the internal expressions. The number of loops is controlled by the ``multiplicity'' argument.



A multiplicity could for instance be useful for repeated broadcasting a message with no acknowledge or until an acknowledge appears.
jkhjkhkjh