KD Tree

Jump to navigation Jump to search

Just curious, were you not using any kind of KD tree before? I haven't done any tests, but I'm fairly sure that Levy's tree is slower than Rednaxela's Gen3 tree.

Skilgannon07:43, 10 October 2011

For several versions now, I have been using a tree to store data, but it was something I wrote myself that was less precise and less efficient than a KD Tree (and it only did nearest neighbor, no distance or range search). I was hoping switching to a true KD Tree would improve both CPU performance and competition performance, though so far, only the former has been true.

Perhaps it is a dumb reason, but I've been trying to stay away from feeling as though I am copying other top robots, which is why I didn't look at any of the KD Tree implementations from other Robocoders. I thought about trying to write my own, but I'm already spending too much time on Robocode to reinvent another wheel just so I can slap my own label on it. Originally, I didn't even want to use a KD Tree, but after digging through my text books and other sources, a KD Tree was the perfect fit for what we are doing, so I couldn't say no.

Now if I could just figure out how to make it work better in my drive...I think I may have to drop to the level of carefully picking apart another open source top robot to figure out what they are doing that allows them to score 95 against robots I can only manage an 80 or 85 on. Those are the ones that are killing my APS.

Skotty16:56, 10 October 2011