search trees

Dar Scott dsc at swcp.com
Sat May 21 11:32:49 EDT 2005


On May 21, 2005, at 8:20 AM, Eric Engle wrote:

> Does anyone know of any implementations of depth first, breadthe 
> first, or a*
> tree search algorithms using transcript, metatalk, or hypertalk?

For depth first, use the natural recursive invocation allowed in 
Transcript.  For breadth first, ping pong between two lists of things 
to work on, copying from one to the other each generation.  For A*, you 
can keep a list & sort it, but that sounds expensive.  If you can 
figure out a trick to get and delete the first element of an array, 
then use an array such that the key sorts the same as best.

Dar
-- 
**********************************************
     DSC (Dar Scott Consulting & Dar's Lab)
     http://www.swcp.com/dsc/
     Programming and software
**********************************************



More information about the use-livecode mailing list