I know that both of them select K randomly, and then choose the best K, as I understand the best K call the others to find the goal, so what is the exact difference between Local beam search and Stochastic beam search ? Please help me and correct to me if I am wrong
Stochastic pretty much means randomized in some way. One of the major issues with beam search is that it tends to get stuck into local optima instead of the global optimum. To avoid that stochastic search gives some(most often small) probability of the solution to choose the step that is not optimal at a given moment. You can think of that as "adding randomness". A bit better approach would be simulated annealing where the chance to take suboptimal choice decreases with time.
Local search on the other hand will always choose the best K neighbours, never allowing to deviate from a local optimum if you happen to hit one.
I think that the only difference is that in the Stochastic beam search, the successors of K are chosen at random versus calling K's successor with K in the local beam search. At least that's what I gathered from this SOURCE
Great question!
Edit: Here is another source that goes into a little more detail about those differences
© 2022 - 2024 — McMap. All rights reserved.