pathfinding algorithm and node map generation in map.py