pg.geno¶
Program genome and genotypes.
Program genome (DNA) is a representation for encoding actions for manipulating
symbolic objects. Genotypes (pg.DNASpec) are the specification on
how to generate them. Genotypes are separated from their corresponding hyper
values (pyglove.HyperValue) which generate client-side objects, in the
aim to decouple the algorithms that generate genomes from the ones that consume
them. As a result, the algorithms can be applied on different user programs
for optimization.
![digraph genotypes {
node [shape="box"];
edge [arrowtail="empty" arrowhead="none" dir="back" style="dashed"];
dna_spec [label="DNASpec" href="dna_spec.html"]
space [label="Space" href="space_class.html"];
dp [label="DecisionPoint" href="decision_point.html"];
choices [label="Choices" href="choices.html"];
float [label="Float" href="float.html"];
custom [label="CustomDecisionPoint" href="custom_decision_point.html"];
dna [label="DNA", href="dna.html"]
dna_spec -> space;
dna_spec -> dp;
space -> dp [arrowtail="diamond" style="none" label="elements"];
dp -> choices;
choices -> space [arrowtail="diamond" style="none" label="candidates"];
dp -> float;
dp -> custom;
dna -> dna [arrowtail="diamond" style="none" label="children"];
dna -> dna_spec [arrowhead="normal" dir="forward" style="none"
label="spec"];
}](../../../_images/graphviz-042f6de33d086e669382318d84f600c41e659c13.png)
Genotypes map 1:1 to hyper primitives as the following:
Genotype class |
Hyper class |
|---|---|