**6. The human-robot interaction**

**5.6. The autonomous neural controller**

134 Human-Robot Interaction - Theory and Application

sensors, 16 outputs are derived.

creating a mechanical wave running through the robot's body.

weights with a selected set of neurons (**Figure 9**).

robot's body.

Our next step is to assemble the above-defined neural devices into an integrated autonomous neural controller (ANC) that combines the different capacities of the participant networks. As shown in **Figure 9**, a five-flop is established as a basal behavior initiator, where neuron 1 is connected with a positive weight to a constant output, becoming the neuron with the highest probability to win, assuming the role of a default network. When the ball presence network becomes active, the state 3 may become a winner activating the three-flop, which feeds random values to the wave generator producing a random moving wave. Notice that a single event (ball presence) activates a complex assembly of neural devices that work by themselves,

**Figure 7.** The position predictor is trained to indicate the position of the sensed ball in terms of a joint number. From 48

To promote complex behaviors, a set of selected outputs are allowed to have connecting

**Figure 8.** The ball presence detector is trained to indicate that the ball is touching the sensors somewhere along the

Once the autonomous neural controller (ANC) begins to behave like an orchestra conductor, issuing timing signals to coordinate activities among different control regions, humans begin to interact with the robot through a keyboard and a visual interface (**Figure 10**). Humans are asked to play the coconut dance game, in which a couple tries, without using their hands, to move upward a coconut placed between them at their waist level; in our case, the human player uses the robot as dancing partner. We choose this activity because it requires a close, coordinate interaction between the two participants, and it doesn't have a trivial solution. The coconut (ball) is subjected to gravity force and is released somewhere between the dancers. The human, represented by a flexible wall, must use the keyboard to move toward the robot and trap the ball between the two bodies; he/she then uses the keyboard to manipulate a moving body bending that pushes the ball up. The game is won when the ball is pushed up, out of the body's reach.

Animated by internal n-flops, the robot behaves proactively, burning energy and initiating behaviors independently of the outside world.

*timer--*

*else > fitness=0*

*get fitness*

*timer=p;*

*use stored move*

*} until timer>0*

 *₋ hi>0 ) fitness= h<sup>f</sup>*

*get coconut final vertical position h<sup>f</sup>*

 *₋ h<sup>i</sup>*

but show little or null body wave activity.

*do{*

 *play timer--*

*{*

*}*

*if ( hf*

*else > fitness=0*

*}*

*if ( hf*

*} until timer>0*

 *₋ hi>0 ) fitness= h<sup>f</sup>*

*get coconut final vertical position h<sup>f</sup>*

 *₋ h<sup>i</sup>*

mutation rate and is here maintained in 10%.

**8. Results: the quick evolution**

**8.1. Experiment 1. High human activity**

a given time period, in pseudo-code:

*store initial coconut vertical position hi*

Mutation is implemented by iterating all bits in the chromosome and randomly adding a small value (positive/negative) to them. The probability of changing one weight is called the

Autonomous Robots and Behavior Initiators http://dx.doi.org/10.5772/intechopen.71958 137

Several human players interact with the robot. His/her moves (keyboard inputs) are stored in a vector with fixed time sampling. The fitness is measured in how much the coconut raises in

After using this fitness formula with the genetic algorithm of Section 7 and after about 5000 accepted mutations, the kind of individual shown in **Figure 11a** evolved. Since humans do most of the active part, the evolved robots learn to stay upright, facilitating the human actions,

**Figure 10.** Human-robot interaction. Humans play the coconut dance game by using the robot as dancing partner. This activity requires a close, coordinate interaction between the two participants, and it doesn't have a trivial solution. The coconut, pulled down by gravity, is released somewhere between the dancers. The human (flexible wall) must use the keyboard to trap the ball between the two bodies and then manipulate a moving body bending, to push the ball up and out of the body's height.
