06-30-2005, 11:46 PM
sure it is.
the working( 0 ) is the f variable, the 10 is the g variable, and the sqr( ( cx - ex ) ^ 2 + ( cy - 1 - ey ) ^ 2 ) * 10 is the h variable. i used a standard distance formula instead of the "manhattan method" because it's faster. the last part is a weighted - probability thing i added to it so it wouldn't get stuck in holes.
Code:
working( 0 ) = 10 + sqr( ( cx - ex ) ^ 2 + ( cy - 1 - ey ) ^ 2 ) * 10 + timesvisited( cx, cy - 1 )
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side...phear