Package gmisclib :: Module beamsearch
[frames] | no frames]

Module beamsearch

source code

Functions
 
beamsearch(cost, extra, initial, B, E)
A breadth-first beam search.
source code
Variables
  __package__ = None
hash(x)
Function Details

beamsearch(cost, extra, initial, B, E)

source code 

A breadth-first beam search. B = max number of options to keep, E = max cost difference between best and worst threads in beam. initial = [ starting positions ] extra = arbitrary information for cost function. cost = fn(state, extra) -> (total_cost, [next states], output_if_goal)