Selecting lowest position from 'array'
Some thoughts from a non-game-developer:


The second and subsequent if lowestKey should use elif to short-circuit the evaluation when it finds a match.
I believe algorithms such as A* (A-star) are very well suited to find the shortest path between two points on a 2-dimensional map.
Running this code through a linter such as flake8 will show how to make your code more pythonic.