QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.geometric_encoding.GENEEncoding Class Reference

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.

Detailed Description

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.

Member Function Documentation

◆ decode()

qdpy.algorithms.geometric_encoding.GENEEncoding.decode ( self,
genome )

Decode into the dense parameter order used by QDpy feedforward policies.

Parameters
genomeFlat coordinates in layer order followed by flat non-input biases.
Returns
Float64 weights in target-by-source order, alternating with biases.
Return a flat NumPy vector of weights and biases as float64.

Definition at line 54 of file geometric_encoding.py.

◆ genome_size()

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.

◆ parameter_count()

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.


The documentation for this class was generated from the following file: