I made another prove. Query in a 500*500 grid. Reference value is 500. The point close to 500 get the lowest score.