jorgenkg / python-algorithms

Python algorithms: A*, GA, SA, HMM, DP-KP and more
39 stars 12 forks source link

Beam search #1

Open littlewine opened 4 years ago

littlewine commented 4 years ago

Hi, is/was the beam search (ever) functional? For me it surely doesnt work out of the box, but also after trying to modify a few things I am still struggling to make it work. Was this ever functional or is it some abandoned code?

Thanks!

littlewine commented 4 years ago

Specifically, the problem seems to be here.

First, you are doing a filtering that (probably) should be saved into node_list . In addition to that however, the filter returns always an empty list.

Or maybe Im missing something on how heapQ works in general. Any help would be appreciated, thanks!