Inteligentna_smieciarka/heuristicfn.py

3 lines
182 B
Python
Raw Permalink Normal View History

def heuristicfn(startx, starty, goalx, goaly):
return abs(startx - goalx) + abs(starty - goaly)
# return pow(((startx//50)-(starty//50)),2) + pow(((goalx//50)-(goaly//50)),2)