https://www.redblobgames.com/pathfinding/a-star/introduction.html Эта же статья на русском https://habr.com/ru/post/331192/