Probabilistic algorithms for Ising machines from optimization to generative AI Nature