I have a function that generates a value for a coordinate (latitude, longitude). I want to find the coordinate on the world map that has the lowest value.
What's the best way to do this?
I don't think typical search algorithms (such as binary sort) would work considering that there are two planes to deal with and the accuracy can be improved each time (by adding more decimal places to the coordinates).
I've tried to obtain the lowest value through randomly generating coordinates but as you can guess it's too inefficient:
import random
shortest = [500, 0, 0]
while True:
lat = (random.random()*180)-90
lon = (random.random()*360)-180
value = compute(lat, lon) #function which obtains the value
if value < shortest[0]:
shortest = [value, lat, lon]
print(shortest)