Build the deterministic decision at the end of a tiny MLP: choose the largest logit, with first-index tie breaking.
Required APIdef predict_digit(logits):
return class_indexBehaviorThink through the mechanism first if you want the extra reasoning step. It never blocks the editor.
predict_digit([0.1, 0.7, 0.2])prediction is the argmax class
predict_digit([0.5, 0.5])ties must be deterministic
2 hidden edge tests run after the visible contract passes.
Run Tests to see the contract verdicts here.