Skip to content

auto_glossary_1

github-actions[bot] edited this page Jul 23, 2026 · 2 revisions

Snippet from Glossary.md

# Snippet: Compute Sample Free Energy
# U = alpha*quality - beta_t*latency - beta_c*(cost+model.cost) - beta_d*distance + beta_s*evidence
# (see docs/Certificate-Schema.md for the certificate's utility_components field)

components = {"quality": 0.8, "latency": 0.2, "cost": 0.1, "distance": 0.15, "evidence": -0.05}
weights = {"alpha": 0.4, "beta_t": 0.2, "beta_c": 0.15, "beta_d": 0.15, "beta_s": 0.1}

E = (
    weights["alpha"] * components["quality"]
    - weights["beta_t"] * components["latency"]
    - weights["beta_c"] * components["cost"]
    - weights["beta_d"] * components["distance"]
    + weights["beta_s"] * components["evidence"]
)

print(f"E: {E:.3f}")  # Negative ideal; ties to shadow sensitivity.

Clone this wiki locally