|
QDpy
|
Executable active graph with structural descriptors and JSON export. More...
Public Member Functions | |
| act (self, observation) | |
| Return one scalar per output node in output order. | |
| save (self, path) | |
| Write an inference policy as versioned JSON. | |
| load (cls, path) | |
| Reload and validate a saved graph without the optimizer. | |
Executable active graph with structural descriptors and JSON export.
Evaluate an acyclic graph of built-in scalar operations on one observation. Inputs and intermediate values are clipped to ±1e6. A protected division returns its numerator at a near-zero denominator. Above-zero, below-zero, and comparison primitives return 0 or 1. Output clipping to the environment's action bounds belongs to the caller. :param space: CartesianGraphSpace defining the genotype. :param genome: Flat sequence of validated integer genes.
Definition at line 112 of file graph_qd.py.
| qdpy.algorithms.graph_qd.CartesianGraphPolicy.act | ( | self, | |
| observation ) |
Return one scalar per output node in output order.
Evaluate each reachable node once so shared operands can be reused.
Definition at line 147 of file graph_qd.py.
| qdpy.algorithms.graph_qd.CartesianGraphPolicy.load | ( | cls, | |
| path ) |
Reload and validate a saved graph without the optimizer.
Rebuild an inference policy from its versioned JSON representation.
Definition at line 172 of file graph_qd.py.
| qdpy.algorithms.graph_qd.CartesianGraphPolicy.save | ( | self, | |
| path ) |
Write an inference policy as versioned JSON.
Save only the genotype, operation names, constants, and graph dimensions.
Definition at line 162 of file graph_qd.py.