In this algorithm, it holds k number of states at any given time. At the start, these states are generated randomly. The successors of these k states are computed with the help of objective function. If any of these successors is the maximum value of the objective function, then the algorithm stops.
Otherwise the (initial k states and k number of successors of the states = 2k) states are placed in a pool. The pool is then sorted numerically. The highest k states are selected as new initial states. This process continues until a maximum value is reached.
function BeamSearch( problem, k), returns a solution state.
start with k randomly generated states
generate all successors of all k states
if any of the states = solution, then return the state
else select the k best successors
- Freelancers, Crypto Payments, and Taxes: An Ultimate Guide - March 17, 2023
- Freelance Environmental Consultant for Corporations: 4 FAQs About the Role Answered - February 11, 2023
- The Benefits of Taking Your Business Online With Print on Demand - January 20, 2023