[Ohrrpgce] SVN: teeemcee/8849 Get rid of closelist in A* implementation; providing a good speedup.

subversion at HamsterRepublic.com subversion at HamsterRepublic.com
Fri Jun 9 11:28:26 PDT 2017


teeemcee
2017-06-09 11:28:25 -0700 (Fri, 09 Jun 2017)
719
Get rid of closelist in A* implementation; providing a good speedup.

Actually, I left it in, but commented out, in case there's some future need for
a list of closed nodes. Delete those lines if you don't think so.
I renamed safety to nodes_closed because that's what it was, and got rid
of the special-case way that the initial cursor was added to the closed list.

The nodes() map is sufficient to track whch nodes are closed. Actually, for the
same reason, there's no justification for nodes() and openlist to both use the
same AStarNode UDT. Using the same in both places means extra memory usage and
overhead, and confusion over which data fields are set in nodes() or in
openlist, and uninitialised in the other.
---
U   wip/pathfinding.bas
U   wip/pathfinding.bi


More information about the Ohrrpgce mailing list