Use a more conservative heuristic
This commit is contained in:
parent
c31b532a88
commit
8904060f3a
6
world.py
6
world.py
|
@ -255,7 +255,7 @@ class World:
|
|||
|
||||
The following assumptions are made to speed up the process, at the cost of
|
||||
accuracy:
|
||||
- All tiles have the exact same movement speed (600 milliseconds / meter)
|
||||
- All tiles have the exact same movement speed (500 milliseconds / meter)
|
||||
- All tiles are in-bounds
|
||||
- All tiles are at the same elevation
|
||||
|
||||
|
@ -269,7 +269,7 @@ class World:
|
|||
|
||||
>>> world = World([], lon_scale = 500, lat_scale = 400)
|
||||
>>> world.heuristic(Point(0, 0), Point(3, 5))
|
||||
1632000
|
||||
1360000
|
||||
"""
|
||||
|
||||
# Taxicab distance in each direction
|
||||
|
@ -290,7 +290,7 @@ class World:
|
|||
|
||||
# TODO: Test whether adding in elevation is beneficial
|
||||
|
||||
estimated_speed = 600 # milliseconds / meter = microseconds / millimeters
|
||||
estimated_speed = 500 # milliseconds / meter = microseconds / millimeters
|
||||
|
||||
return estimated_speed * total_flat_distance
|
||||
|
||||
|
|
Loading…
Reference in a new issue