A* Pathfinder | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

A* Pathfinder

how can you make an A* pathfinder find the longest path instead of shortest. I tried making it pick the biggest F value at the beginning and smallest at the end, but that didn't work. any ideas?

25th Dec 2020, 4:13 PM
Kirill
Kirill - avatar
5 Answers
+ 4
Kirill Vidov , your descriptions sounds confusing to me. Can you please rework your question, also please show us your attempt and a sample with input and desired output. Thanks!
25th Dec 2020, 5:23 PM
Lothar
Lothar - avatar
+ 1
Lothar i don't have an example, and I don't need a written code as an answer, I just need a general idea on how to make A* Pathfinder find the longest path
25th Dec 2020, 5:44 PM
Kirill
Kirill - avatar
+ 1
Kirill Vidov I don't know the answer, but maybe you can get inspiration by watching A* in action using this amazing implementation. https://code.sololearn.com/Wj92b2V80y7d/?ref=app
25th Dec 2020, 8:02 PM
Brian
Brian - avatar
0
Brian thanks
25th Dec 2020, 9:45 PM
Kirill
Kirill - avatar