<br><br>On Friday, June 2, 2017, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com">teeemcee@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 3 June 2017 at 07:02,  <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','subversion@hamsterrepublic.com');" target="_blank">subversion@hamsterrepublic.co<wbr>m</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">james<br>
2017-06-02 12:02:15 -0700 (Fri, 02 Jun 2017)<br>
50<br>
Pathfinding now breaks ties with distance squared<br>
---<br>
U   wip/pathfinding.bas<br>
U   wip/<a href="http://pathfinding.bi" rel="noreferrer" target="_blank">pathfinding.bi</a></blockquote><div><br></div><div>You didn't notice that I added v_heappush and v_heappop?<br><br></div></div></div></div></blockquote><div><br></div><div>I noticed, but wasn't sure what to do with them.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Also, I didn't notice before that your cost_before_node function is insane. You need to store the cost of the node in the node, not recompute it constantly. That is why pathfinding is so incredibly slow.<br></div></div></div></div></blockquote><div><br></div><div>Oh, yes! You are right. The A* reference article I was working from even told me to do that, but I totally forgot. Thanks!</div><div><br></div><div>You know, I'll bet I had the same problem in my python A* implementation for Bob the Hamster Dirt Dig. That sounds like exactly the sort of thing I would do twice ;)</div><div><br></div><div>---</div><div>James</div><div> </div>