They emphatically do not search the space like some brute-forcing algorithm and presenting them as such produces a faulty mental model which keeps you back. It’s not nearly so clean as you present it and that’s not just a bunch of semantics or technicalities. They fundamentally work differently than this there is is just no way around it.
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.