Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: OT(ish) - Best Search Algorithm

by lima1 (Curate)
on Oct 15, 2007 at 09:10 UTC ( #644871=note: print w/replies, xml ) Need Help??


in reply to OT(ish) - Best Search Algorithm

Maybe http://en.wikipedia.org/wiki/Dijkstra's_algorithm?

Seems to be implemented in Boost::Graph. Update: Sorry, haven't read the part you mentioned the A* algorithm :( .

Replies are listed 'Best First'.
Re^2: OT(ish) - Best Search Algorithm
by Melly (Hermit) on Oct 15, 2007 at 09:27 UTC

    Thanks - I'll take another look at Dijkstra (I think it was the first algo I found, and led me to A*)

    map{$a=1-$_/10;map{$d=$a;$e=$b=$_/20-2;map{($d,$e)=(2*$d*$e+$a,$e**2 -$d**2+$b);$c=$d**2+$e**2>4?$d=8:_}1..50;print$c}0..59;print$/}0..20
    Tom Melly, pm@tomandlu.co.uk
      To use Dijkstra's you'd have to modified it accept the start as the destination, ensured all positive weights (doesn't work for negative cycles), and progressively updated the weights on the edges that you've already found to be part of a cycle so they wouldn't be detected again; but then some edges will be part of other cycles..and on and on and on - in other words, it would be a very BAD way to find all of your circles of friends.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://644871]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2021-04-15 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?