• Keine Ergebnisse gefunden

Proactive interaction

5.3 Trigger state determination

Proactive and in-time reactions from the robot are important for intuitive HRI. The procedure given in Figure 5.3 describes the method to enable the robot to respond as quickly as possible by selecting the earliest possible trigger states of the FSMi, i=1,...,n. The trigger state is the end state which corresponds to the state that finishes the intention recognition process. The intention recognition process [12] is discussed in detail in Chapter 3. The FSMi, i=1,...,n represent the human intentions. The input to the procedure in Figure 5.3 consists of all the previous FSMi and FSMn+1 that may be added to a group of Finite State Machines (FSMs).

74

Figure 5.3: Trigger state determination algorithm

75

The trigger state of FSMn+1 is selected with respect to all the already existing FSMi. The output of the procedure corresponds to the possible new groups of FSMs, discussed later in this section and the update of the trigger state of the FSMi within the exiting groups and / or without the groups. The trigger state is represented by Strigger. In Figure 5.3, the function ψindex maps the state S to its index I in a FSM, i.e., ψindex : S → I .The index I corresponds to the position of the state S in a FSM. Similarly the function ψsize maps a FSM to the number of states, i.e., N, present in the FSM, i.e., ψsize : FSM → N. The function ψstate maps a FSM to its state S at the position j, i.e., ψstate : FSM, j Sj . The function ψtrigger-state assigns a state S of a FSM as the trigger state Strigger of the FSM, i.e., ψtrigger-state : S Strigger . The function ψ ¬trigger-state does the reverse of ψtrigger-state ,i.e., it converts the trigger state Strigger into a normal state S.

The function ψreturn-trigger-state returns the trigger state Strigger of a FSM.

In this procedure, the FSMn+1 is added by comparing with all the already existing FSMi. Initially the start state of FSMn+1 is considered as the trigger state (Line 1). The comparison between FSMn+1 and FSMi is performed by comparing the transition conditions of the states of both the FSMs, i.e., FSMn+1 and FSMi, in a sequence (Lines 2-20). If during the comparison of FSMn+1 and FSMi (Line 4) the state index j of FSMn+1 increases than the size of FSMi then update of trigger state is performed for FSMn+1 and FSMi (Lines 16-17). If FSMi belongs to a group Gk, discussed later in Section 5.3, i.e., FSMiGk then FSMn+1 is added to that group (Lines 27-30). The intention prior values of the FSMs belonging to the group Gk are updated. The intention priors correspond to the prior probabilities of concerning FSMs ∈Gk. If FSMi does not belong to a group then a new group is created (Lines 33-37). If a mismatch occurs (Line 5) then the trigger state assignment is performed for the FSMn+1 (Line 8). The trigger state of the FSMi is also updated if necessary (Lines 10-14). If the state index j corresponding to the last successful comparison between FSMi and FSMn+1 is greater than the current trigger state index of FSMi (Line 10) then the update is performed for the trigger state for FSMi. Otherwise no update of trigger state is performed for the FSMi. The trigger state always moves toward the actual end state of FSMi during the process of comparison. The lines 22-25 correspond to the situation if FSMn+1 and FSMi are same and are of same size then FSMn+1 is removed and procedure exits (Line 24). The lines 21, 26-37 correspond to the situation if FSMn+1 and FSMi are same and one is of bigger in size form the other. The procedure stops if initial part of FSMi matches to complete FSMn+1 or vice versa and if there exists a group Gk such that FSMiGk (Line 27) then FSMn+1 is assigned to that group Gk. Otherwise a new group Gk+1 is created and FSMn+1 and FSMi are assigned to that group. The matching of initial part of FSMi to FSMn+1 means that the sequence from the start state of FSMi to some intermediate state of FSMi matches to FSMn+1 from the start state to the end state with respect to the state transition conditions. The matching can also occur in the reverse manner, i.e., initial part of FSMn+1 matches to a complete FSMi.

A group G of FSMs is only created if there is a FSMi and FSMn+1 such that they exactly match with each other and one is bigger than the other and already no group exists (Lines 33-37). In case, if a group already exists then FSMn+1 is simply added to that group (Lines 27-31). If a group is constructed then a common trigger state is nominated for the group that is the actual end state of the smallest FSM in the group. If that trigger state is reached then the intention selection in the group is performed depending on the intention priors of the FSMs in the group, i.e., FSMs ∈Gk. Initially if the intention priors are uniform (Line 35) then the intention selection is performed randomly and the switch between the different intentions (represented by different FSMs∈Gk) in the group is performed by the human interruption. After an

76

intention is recognized the intention priors are updated accordingly, e.g., if we suppose there are three FSMs in a group Gk that initially have the uniform priors of 1/|FSMs| then if the intention concerning FSM1 out of three in the group is recognized then the priors will be updated as given in Figure 5.4. The term |FSMs| corresponds to the number of FSMs. In the update step (Figure 5.4) the prior of the FSM concerning the recognized intention (FSM1) is increased. The increment is performed by adding the uniform prior. Afterwards the

The best case occurs if FSMn+1 already exist or it belongs to some already existing group. The normal case involves FSMn+1 that does not belong to any existing group. The worst case occurs if all the state machines FSMi have the same initial part as the FSMn+1 till the second last state of FSMn+1.

Figure 5.4: Update of the intention priors

The Figure 5.5 shows the recognition of the intention depending upon the priors of the FSMs in case if common end state relating to a group is reached.

Initialization of finite state machines

Observation

Weighting of the finite state machines

Observation Likelihood for a finite state machine

Intention recognized Weight of the finite state machine

yes

State transition in the finite state machine

Low High

Final state of a finite state machine reached No

Low High

More than one FSM Yes No

FSM with highest Prior Initialization of finite state machines

Observation

Weighting of the finite state machines

Observation Likelihood for a finite state machine

Intention recognized Weight of the finite state machine

yes

State transition in the finite state machine

Low High

Final state of a finite state machine reached No

Low High

More than one FSM Yes No

FSM with highest Prior

Figure 5.5: Updated flow of intention recognition algorithm

77