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

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 a given time period, in pseudo-code:

*get fitness*

*{*

*}*

**7. Genetic algorithms**

136 Human-Robot Interaction - Theory and Application

out of the body's height.

initial random value between +0.5 and −0.5.

[26] and in pseudo-code can be written as:

*store initial coconut vertical position hi*

Section 5.1.

*get fitness*

*timer=p;*

*use stored move*

*do{*

*play*

*{*

Genetic algorithms are search algorithms used to find near-optimal solutions in arbitrarily created search spaces [24]. Applications in robot control have been reported in [25]. In this work, the search space is defined by a chromosome formed with the 192 weights defined in

**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

The 144 weight values obtained in the trained process in Section 5.2, corresponding to the wave generator's hidden layer, are left untouched but subjected to possible future changes. The 48 weight values corresponding to the ball position predictor and the 3-flop are given

For the purposes of this chapter, we will use an evolutive approach where only mutation and selection are put to work. This kind of process plays a dominant role in bacterial evolution

Genetic algorithms have three main operators: selection, crossover, and mutation.

```
 timer=p;
 store initial coconut vertical position hi
 do{
 use stored move
 play
 timer--
 } until timer>0
get coconut final vertical position hf
if ( hf
     ₋ hi>0 ) fitness= hf
                      ₋ hi
else > fitness=0
```
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, but show little or null body wave activity.

Complex behaviors are codified in one single chromosome with 198 genes.

changes in the mutated individual, which enriches the search for solutions.

robot learning, then the robot will pick up to the hard part of the job.

\*Address all correspondence to: ochang@yachaytech.edu.ec

3 Prometeo Project, SENESCYT, Republic of Ecuador

evolving idea. Neuroimage. 2007;**37**(4):1083-1090

plex things.

effect.

**Author details**

Oscar Chang1,2,3\*

Studies Program, Venezuela

nal.pone.0000443

Ecuador

**References**

013.37

180-190

This satisfies one of the basic rules of evolution: Few genetic information unravels into com-

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

It seems reasonable to conclude that in a compact gene, small mutations produce enormous

At least for our model of ANC, a successfully interaction with humans depends on the human attitude, if the humans put too much emphasis on the robot to learn to stay quiet. On the other hand, if human stays quiet but the basic rules of the game (lift the ball) is passed on to the

As in biology our robots, concerning behavior initiation, do throw the dice, but they keep and attractively control over when, where, and how this random event will be put into

1 Yachay Tech. School of Mathematical Sciences and Information Technology, Republic of

2 Universidad Central de Venezuela (UCV), School of Electrical Engineering, Graduate

[1] Maye A, Chih-hao H, Sugihara G, Brembs B. Order in spontaneous behavior. PLoS One. 2007;**10**(1371). (Online). Available: http://www.plosone.org/article/info:doi/10.1371/jour-

[2] Brembs B. Genetic Analysis of Behavior in Drosophila. Cognition and Behavioral Neuroscience. Online Publication. Date: Feb 2017. DOI: 10.1093/oxfordhb/9780190456757.

[3] Ichle M, Marcus E, Snyder AZ. A default mode of brain function: a brief history of an

[4] Raichle ME. Two views of brain function. Trends in Cognitive Sciences. 2010;**14**(4):

**Figure 11.** Evolved autonomous robots. (A) When human do most of the active part of the game, the evolved robots learn to stay upright, facilitating the human actions, but show little or null body wave activity. (B) When the human provides little game action and puts the coconut-lifting responsibility in the robot, evolution teaches the robot the connotation of the game. The evolved robot develops an autonomous dynamic response that learned to produce its own mechanical moving body bending and uses it to push the coconut all the way up.

## **8.2. Experiment 2. Low human activity**

For this setting, the human players stay mostly inactive, as a passive wall whose only function is to get the coconut pressed against the robot.

By using the same fitness formula of experiment 1, a quite different outcome is obtained. Although the human provides little action to the game, the fitness formula put all the coconutlifting responsibility in the robot. In other words, evolution teaches the robot the connotation of the game. The final evolutive result, after about 19,000 mutations, is a robot with an autonomous dynamic response that learned to produce its own moving body bending and uses it to push the coconut all the way up, out of the body's gap (**Figure 11b**).
