Neither does AlphaZero; the point is that you need a well defined outcome that can be automatically verified; Lean math proofs have that property. Many other problems do not.
OP’s analogy is correct.