Thread history
Time | User | Activity | Comment |
---|---|---|---|
No results |
No problem. Ahh, well as a note, DrussGT is not the easiest surfer to read IMO.
Hmm.. for the questions:
1) A kd-tree is a data structure used to do a "k-nearest-neighbor" search fast. What the "k-nearest-neighbor" search does, is it allows you to search a history for the past situations most similar to the current situation. You give numeric values to different aspects of the situation, and it finds the most similar several past situations, and this can be used in either targeting or movement to predict the opponent, based on the premise that they'll react to the situation similarly both times.
2a) To save between rounds, you just use a "static" variable in Java. The "static" keyword makes it so the value is is common between all instances of a class, such as between separate rounds. Basically all bots that learn use this.
2b) To store between matches you need to use some robocode APIs for writing and reading files. I don't like using it because it makes a bot rank more favorably in the rumble if fewer clients are running at a time, due to learned information being separate between each client. Note that LittleBlackBook is different because it only reads this way, because it's whole strategy is having a pre-written data file. I would also note that relatively few robots use cross-round data saving.
3) Well... my first robot was a weird multi-mode thing that took several weeks to make, but I never released it. The first bot I ever released was LunarTwins. For LunarTwins it took 24 hours for "the inspiration to ferment", and the first released version of the code was finished within a 36 hour period of time. Really though, LunarTwins was fast to write because it's a non-learning robot. My second publicly released robot was RougeDC which was my first surfer. I don't remember how long that bot took, but I know I spent most of Summer 2008 working on various versions of it.