Organism #2¶
-
class
sensorimotor_dependencies.organisms.Organism2(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 2 (inherits from
Organism1):This time, to spice things up: we introduce nonspatial body changes thanks to pupil reflex, and nonspatial changes in the environment via varying light intensities.
The default values that have changed compared to Organism 1 are the following ones:
- The arm has
\(10\) joints
\(4\) eyes, each of which as a diaphragm \(d_i\) reducing the light input so that the total illumination of the eye remains constant (equal to 1). That is, for eye \(i\):
$$\sum\limits_{ k } S_{i, k}^e = 1$$
i.e.:
$$d_i ≝ \sum\limits_{ k } \left(\sum\limits_{ j}\frac{θ_j}{\Vert P_i + Rot(a_i^θ, a_i^φ, a_i^ψ) \cdot C_{i,k}-L_j\Vert^2}\right)^{-1}$$
- the motor command is \(100\)-dimensional
- the environment consists of:
- \(5\) lights, of varying intensities
Parameter Value Dimension of motor commands M_sizeDimension of environmental control vector E_sizeNumber of eyes nb_eyesNumber of joints nb_jointsDimension of proprioceptive inputs proprio*nb_jointsDimension of exteroceptive inputs extero*nb_eyesDiaphragms Reflex Number of lights nb_lightsLight luminance Variable -
get_sensory_inputs(M, E, d=None)[source]¶ Compute sensory inputs for motor command
Mand environment positionE.The diaphragms \(d_i\) is now satisfy:
$$\sum\limits_{ k } S_{i, k}^e = 1$$
that is:
$$d_i ≝ \sum\limits_{ k } \left(\sum\limits_{ j}\frac{θ_j}{\Vert P_i + Rot(a_i^θ, a_i^φ, a_i^ψ) \cdot C_{i,k}-L_j\Vert^2}\right)^{-1}$$
to keep the total illumination of the eye remains constant equal to \(1\) (same as notations as Organism 1).
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