79562284

Date: 2025-04-08 14:14:34
Score: 1.5
Natty:
Report link

So after a week of tinkering. I do believe I have cracked the nut!

The tutorial that I was trying to follow lead me around in circles and eventually I gave up on trying to update nodes G value as stated in the tutorials. Instead, I created a new hybrid cost value, I call the Bcost. Because I'm Brett ;P. I wont post the entire code here, but I will post a link to the test session where you can launch it in Android Studio and try it for yourself. The new Bcost makes the algorithm way more efficient and as you'll see, it barely ever chooses a node that isnt the best next node. I think it's probably 50-100% faster. However, my nextnodes() function is horribly bloated and if anyone wants to take a stab at making that method cleaner. I would love to see how you accomplish that.

http://nexxiom.com/android/AstarTesting.zip

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Brett Ezra