GeekToo wrote:Update of Convoy:
Recent developments ( especially the different behaviour of IsBuildable ) did make the pathfinding of the previous Convoys pretty useless ( as is: not able to find a route ). I tried integrating the BinHeap of the library, as it was better coded than my version ( that is, being a much more pure Container class), but unfortunately, the performance was a lot worse than in my previous Convoy version. Main reason: the Exists function, which does compare a complete node. Suggestion to the devs: add an id to the Insert parameter list.
So for now, I still use my own BinHeap.
Lots of things have improved since the previous version, and I realise lots of things still have to be done.
Nice job I will run it on the tournament server soon
About the Binary Heap: the Exist() function is identical to yours ... so why don't you just insert the index? Via the index you can find back your node by your own... I mean, easy as pie Adding something like an other 'id' field to the list, only makes it less of a Binary Heap, and makes it break/slow for other routines This is the most pure implementation you can get (as it doesn't assume anything about the outside world )
Also, if you need Exist() in the first please, a Binary Heap is not what you need Binary Heap is to sort, and find the lowest value If you want to avoid double entries, I suggest using AIList, or create an other kind of list Binary Heap is _not_ your friend (Exist() is always O(n)). If you use it for any AyStar alike routine, I suggest looking at the AyStar library Hehe
Either way, please let me know how you estimated the 'performance' of your own routine against the one in SVN.