Organism #3

class sensorimotor_dependencies.organisms.Organism3(seed=1, retina_size=1.0, M_size=40, E_size=40, nb_joints=10, nb_eyes=4, nb_lights=5, extero=20, proprio=4, nb_generating_motor_commands=100, nb_generating_env_positions=50, neighborhood_size=1e-08, sigma=<ufunc 'tanh'>)[source]

Organism 3 (inherits from Organism2):

Same as the previous one, except that the diaphragms are controlled by the organism (and not reflex-based anymore).

Note that it should add a dimension to the group of compensated movements: on top what we had earlier, we now have diaphragm closing and opening compensating luminance variations.
get_sensory_inputs(M, E, d=None)[source]

Compute sensory inputs for motor command M and environment position E.

As \(\mathbf{d}\) is under control of the organism, the diaphragms \(d_i\) now satisfy:

$$(Q,P,a,d)=σ\left(\begin{pmatrix}W_1 \\ W_1^{(d)}\end{pmatrix} \cdot σ\left(\begin{pmatrix}W_2 \\ W_2^{(d)}\end{pmatrix}\cdot M −\begin{pmatrix}μ_2 \\ μ_2^{(d)}\end{pmatrix}\right) −\begin{pmatrix}μ_1 \\ μ_1^{(d)}\end{pmatrix}\right)$$

where for all \(i∈ \lbrace 1, 2 \rbrace\), \(W_i\) (resp. \(μ_i\)) is self.W_i (resp self.μ_i)

Parameters:
  • M ((M_size,) array) – Motor command vector
  • E ((E_size,) array) – Environmental control vector
Returns:

Concatenation of proprioceptive and exteroceptive sensory inputs

Return type:

(proprio*nb_joints + extero*nb_eyes,) array

Example

>>> organisms.Organism3().get_dimensions()
(10, 9, 5, 4)