beam search using norvig impl and cooke parameters