Thursday, 17 January 2013

First result! Evolution of sensorimotor contingencies.


Evolution discovers a smc (sensorimotor contingency) between motor action and the gyroscope sensor. 

Download Code here: https://github.com/ctf20/DarwinianNeurodynamics/tree/master/MB12

This was unexpected for me, but makes sense in retrospect.

After 529 generations, with the fitness function being mutual information between a sensory stream and motor command stream, the following motor-sensor pairs were evolved, with maximum fitness 1.57... Note that 37 is the most common sensor to be predicted, and that is the GYROSCOPE.

This makes perfect sense when you think about it. Many motors influence the gyroscope, and units with the gyroscope are more robust to mutation of the motor because many motors will influence the gyroscope. The gyroscope is a very broad and general sensor.

To do:
1. The resolution of the discretization from continuous sm streams to bins must be increased (perhaps incrementally)
2. A mechanism needs to be in place to store high fitness solutions into a long term memory and punish reinvention of the same solution. This can be achieved by an explicit fitness cost to producing solutions SIMILAR to solutions in LTM.


Gen 529 Num 0 1.570950594  Sens in [[27  37] Motor 5 Sensor 37
529 1 1.570950594  [[27  37] 2 37
529 2 1.570950594  [[27  37] 11 37
529 3 1.570950594  [[27  37] 2 37
529 4 1.570950594  [[27  37] 13 37
529 5 1.570950594  [[27  37] 2 37
529 6 1.570950594  [[27  37] 12 37
529 7 1.570950594  [[27  37] 2 37
529 8 1.570950594  [[27  37] 13 37
529 9 1.570950594  [[27  37] 25 37
529 10 1.570950594  [[27  37] 2 37
529 11 1.570950594  [[27  37] 2 37
529 12 1.570950594  [[27  37] 13 37
529 13 1.570950594  [[27  37] 11 37
529 14 1.570950594  [[27  37] 2 37
529 15 1.570950594  [[27  37] 11 37
529 16 1.570950594  [[27  37] 2 37
529 17 1.570950594  [[27  37] 13 37
529 18 1.570950594  [[27  37] 13 37
529 19 1.570950594  [[27  37] 11 37
529 20 1.570950594  [[27  37] 13 37
529 21 1.570950594  [[27  37] 25 37
529 22 1.570950594  [[27  37] 13 37
529 23 1.570950594  [[27  37] 14 37
529 24 1.570950594  [[27  37] 13 37
529 25 1.570950594  [[27  37] 20 37
529 26 1.570950594  [[27  37] 5 37
529 27 1.570950594  [[27  37] 20 37
529 28 1.570950594  [[27  37] 13 37
529 29 1.570950594  [[27  37] 11 37
529 30 1.570950594  [[27  37] 2 37
529 31 1.570950594  [[27  37] 13 37
529 32 1.570950594  [[27  37] 13 37
529 33 1.570950594  [[27  37] 5 37
529 34 1.570950594  [[27  37] 6 37
529 35 1.570950594  [[27  37] 25 37
529 36 1.570950594  [[27  37] 13 37
529 37 1.570950594  [[27  37] 23 37
529 38 1.570950594  [[27  37] 12 37
529 39 1.570950594  [[27  37] 25 37
529 40 1.019973094  [[27  37] 25 15
529 41 0.970950594  [[27  37] 25 15
529 42 0.970950594  [[23  40] 8 37
529 43 0.695461844  [[36  28] 13 37
529 44 0.695461844  [[40  23] 13 37
529 45 0.619973094  [[4  39] 11 37
529 46 0.419973094  [[33  11] 13 37
529 47 0.419973094  [[0  19] 11 37
529 48 0.419973094  [[39  12] 19 37
529 49 0  [[27  37] 2 30
530 0 1.570950594  [[34  19] 5 37
530 1 1.570950594  [[27  37] 19 37
530 2 1.570950594  [[27  37] 13 37
530 3 1.570950594  [[27  37] 2 37
530 4 1.570950594  [[27  37] 13 37
530 5 1.570950594  [[27  37] 13 37
530 6 1.570950594  [[27  37] 11 37
530 7 1.570950594  [[27  37] 5 37
530 8 1.570950594  [[27  37] 10 37
530 9 1.570950594  [[27  37] 11 37
530 10 1.570950594  [[27  37] 25 37
530 11 1.570950594  [[27  37] 13 37
530 12 1.570950594  [[27  37] 4 37
530 13 1.570950594  [[27  37] 2 37
530 14 1.570950594  [[27  37] 5 37
530 15 1.570950594  [[27  37] 2 37
530 16 1.570950594  [[27  37] 13 37
530 17 1.570950594  [[27  37] 2 37
530 18 1.570950594  [[27  37] 13 37
530 19 1.570950594  [[27  37] 2 37
530 20 1.570950594  [[27  37] 5 37
530 21 1.570950594  [[27  37] 13 37
530 22 1.570950594  [[27  37] 25 37
530 23 1.570950594  [[27  37] 13 37
530 24 1.570950594  [[27  37] 13 37
530 25 1.570950594  [[27  37] 25 37
530 26 1.570950594  [[27  37] 2 37
530 27 1.570950594  [[27  37] 25 37
530 28 1.570950594  [[27  37] 11 37
530 29 1.570950594  [[27  37] 11 37
530 30 1.570950594  [[27  37] 13 37
530 31 1.570950594  [[27  37] 13 37
530 32 1.570950594  [[27  37] 9 37
530 33 1.570950594  [[27  37] 11 37
530 34 1.570950594  [[27  37] 25 37
530 35 1.570950594  [[27  37] 13 37
530 36 1.570950594  [[27  37] 11 37
530 37 1.570950594  [[27  37] 2 37
530 38 1.570950594  [[27  37] 11 37
530 39 1.570950594  [[27  37] 2 37
530 40 1.570950594  [[27  37] 11 37
530 41 1.570950594  [[27  37] 5 37
530 42 1.246439345  [[27  37] 20 14
530 43 0.895461844  [[42  18] 5 11
530 44 0.695461844  [[36  28] 13 37
530 45 0.495461844  [[36  28] 13 37
530 46 0.495461844  [[4  14] 0 37
530 47 0.095461844  [[29  2] 11 37
530 48 0  [[29  38] 13 37
530 49 0  [[31  30] 25 37
531 0 1.570950594  [[27  37] 25 37
531 1 1.570950594  [[27  37] 25 37
531 2 1.570950594  [[27  37] 10 37
531 3 1.570950594  [[27  37] 13 37
531 4 1.570950594  [[27  37] 4 37
531 5 1.570950594  [[27  37] 8 37
531 6 1.570950594  [[27  37] 25 37
531 7 1.570950594  [[27  37] 13 37
531 8 1.570950594  [[27  37] 11 37
531 9 1.570950594  [[27  37] 2 37
531 10 1.570950594  [[34  19] 5 37
531 11 1.570950594  [[27  37] 25 37
531 12 1.570950594  [[27  37] 13 37
531 13 1.570950594  [[27  37] 11 37
531 14 1.570950594  [[27  37] 13 37
531 15 1.570950594  [[27  37] 2 37
531 16 1.570950594  [[27  37] 9 37
531 17 1.570950594  [[27  37] 13 37
531 18 1.570950594  [[27  37] 0 37
531 19 1.570950594  [[27  37] 13 37
531 20 1.570950594  [[27  37] 19 37
531 21 1.570950594  [[27  37] 11 37
531 22 1.570950594  [[27  37] 11 37
531 23 1.570950594  [[27  37] 2 37
531 24 1.570950594  [[27  37] 13 37
531 25 1.570950594  [[27  37] 25 37
531 26 1.570950594  [[27  37] 5 37
531 27 1.570950594  [[27  37] 16 37
531 28 1.570950594  [[27  37] 2 37
531 29 1.570950594  [[27  37] 2 37
531 30 1.570950594  [[27  37] 2 37
531 31 1.570950594  [[27  37] 23 37
531 32 1.570950594  [[27  37] 13 37
531 33 1.570950594  [[27  37] 2 37
531 34 1.570950594  [[27  37] 4 37
531 35 1.570950594  [[27  37] 25 37
531 36 1.570950594  [[27  37] 25 14
531 37 1.570950594  [[27  37] 11 37
531 38 1.570950594  [[27  37] 11 37
531 39 1.570950594  [[34  19] 5 37
531 40 0.809986547  [[5  20] 11 37
531 41 0.695461844  [[5  0] 2 37
531 42 0.695461844  [[27  37] 5 41
531 43 0.695461844  [[27  37] 13 41
531 44 0.695461844  [[27  37] 20 14
531 45 0.495461844  [[36  28] 13 37
531 46 0.321928095  [[30  23] 13 37
531 47 0  [[34  19] 5 35
531 48 0  [[26  6] 9 37
531 49 0  [[27  37] 25 33

4 comments:

  1. Those zeros are looking real sexy. I believe NAO is learning about balance!

    ReplyDelete
  2. A short addition to this result. When I allow 20 bins of discretization and increase the period to 20 time samples for a particular kind of action, then I evolved the majority of units that 'predicted' 2 axes of the accelerometer sensors with motor actions from many different joint motors. Rather, this organisation robustly (i.e. robustly to mutation and environmental noise) maximised the mutual information between sensors and motors.

    ReplyDelete
  3. Next step for tomorrow, adding taboo search methods by storing already good solutions in LTM.

    ReplyDelete