class TargetScorer: def score(self, profile): # ----------------------------- # THERMAL RISK SCORE (0–100) # ----------------------------- thermal = ( profile["peak_temp"] * 0.5 + profile["avg_temp"] * 0.5 ) # ----------------------------- # COST SCORE # ----------------------------- cost = profile["duration"] * (1 - profile["cache_ratio"] + 0.1) # ----------------------------- # STABILITY SCORE # ----------------------------- instability = profile["failures"] * 10 return { "thermal": thermal, "cost": cost, "instability": instability }