Does anyone have a backup of Rednaxela's updated KD tree?

125 views
Skip to first unread message

Matthew Gomes

unread,
Jun 11, 2021, 1:43:24 PM6/11/21
to Robocode
All of the links on the RoboWiki seem to be broken, and only the code for an older version which does not include the nearest-neighbor iterator.

Thanks!

fnl

unread,
Jun 11, 2021, 1:51:33 PM6/11/21
to Robocode
You are right that the links are broken :\

I found this source file from Rednaxela for a KdTree:

Alex Schultz

unread,
Jun 13, 2021, 8:44:38 AM6/13/21
to Robocode
Hi all!

Indeed seems those links are down. Thanks to fnl for forwarding this along to me.

The version from Gaussian's source there is just the "2nd gen" version that is the same version as is directly pasted onto the Robowiki page. The newer "3rd gen" one was the one behind the broken link.

I went into my old backups, found the Mercurial repo, converted it to git, and re-hosted it:

Also updated the Robowiki page accordingly.

Best Regards,
Rednaxela

Gustaf Andersson

unread,
Sep 9, 2021, 4:59:07 PM9/9/21
to Robocode
Hi,

Is there any license associated with the 3rd gen kd-tree? I can't seem to find one. Is it available for commercial use? 

It would be useful to save/load the tree to/from a file, would that be possible to implement? 

Thanks!

Best,
Gustaf

Alex Schultz

unread,
Sep 9, 2021, 6:03:26 PM9/9/21
to robo...@googlegroups.com
Hi Gustaf,

Back in 2010 I said the same modified zlib license I used for my 2nd gen tree works ( see here: https://robowiki.net/wiki/User_talk:Rednaxela/kD-Tree#3rd_gen_tree_licence ) and I stand by that, but never got around to adding the notice to the code. Just added the notices in the gitlab repo now. That license does allow commercial use.

Simplest way to implement saving/loading would be to add "implements Serializable" to KdNode and use Java serialization, though that wouldn't be the most efficient of course. Plenty of other ways to handle saving/loaded of course. I personally don't have plans to work on adding such myself though. Could also be an argument that it's better to not save the tree itself, and instead just save the points that went into making the tree. This tree was designed for adding points one by one at runtime to have low overhead, but if you're loading a bunch of existing points at once you can make a much better balanced tree. If one wanted to adapt this code to make a better tree from a bulk list of loaded points, the simplest route would likely involve modifying KdNode to allow larger nodes to be temporarily instantiated, and proceed to run the splitting until getting to nodes that fit the normal bucket size settings.

Best Regards,
Alex

--
You received this message because you are subscribed to the Google Groups "Robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robocode/19cace31-8591-4889-a3e2-e9f775fb9fb2n%40googlegroups.com.

Gustaf Andersson

unread,
Sep 11, 2021, 11:55:50 AM9/11/21
to Robocode
Hi,

Thank you for the quick response and help!


Best,
Gustaf
Reply all
Reply to author
Forward
0 new messages