|
QDpy
|
Encode layer weights with neuron coordinates and store biases directly. More...
Public Member Functions | |
| genome_size (self) | |
| parameter_count (self) | |
| decode (self, genome) | |
| Decode into the dense parameter order used by QDpy feedforward policies. | |
Encode layer weights with neuron coordinates and store biases directly.
Decode a flat genome to alternating row-major weights and biases. A genome stores all neuron coordinates in layer order followed by the biases of all non-input layers. A weight is the L2 distance between connected neurons multiplied by the coordinate difference product clipped to [-1, 1]. Biases use direct encoding. :param layer_sizes: Width of each layer, including input and output. :param coordinate_size: Number of geometric coordinates per neuron.
Definition at line 19 of file geometric_encoding.py.
| qdpy.algorithms.geometric_encoding.GENEEncoding.decode | ( | self, | |
| genome ) |
Decode into the dense parameter order used by QDpy feedforward policies.
| genome | Flat coordinates in layer order followed by flat non-input biases. |
Return a flat NumPy vector of weights and biases as float64.
Definition at line 54 of file geometric_encoding.py.
| qdpy.algorithms.geometric_encoding.GENEEncoding.genome_size | ( | self | ) |
Return the number of evolved coordinates and bias values.
Definition at line 42 of file geometric_encoding.py.
| qdpy.algorithms.geometric_encoding.GENEEncoding.parameter_count | ( | self | ) |
Return the number of parameters in the decoded dense actor.
Definition at line 47 of file geometric_encoding.py.