Dodging Performance Anomaly?

Jump to navigation Jump to search

Dodging Performance Anomaly?

I have recently discovered robocode, and I made a relatively simple bot using DookiCape movement and a simple but somewhat unique segmented GF gun(distance, lateralV, advancingV). I don't know if you are still interested in improving your robot, but I noticed that after a while in a 1000 battle of my bot vs Pris my hit rate went much higher than it should have, all the way up to 20%. I don't know why my targeting is working so well, I don't even decay old data right now. You may want to look into Pris' surfing for bugs etc. P.S. (My bot won the 1000 round battle with a 78% score share. By comparison, my bot scores 35% vs Shadow in a 1000 round battle)

Straw (talk)01:52, 16 November 2013

Unfortunately, I don't think Darkcanuck comes around here any more. That is interesting though. I wonder if something about the neural net gets corrupted? I remember that TheBrainPi, which saves its neural net to disk between matches, had a bug that was solved by deleting its neural net data file (so it could start fresh, I guess).

It's also worth noting that RoboRumble matches are 35 rounds, so that's what many of us use in most or all of our testing. I bet a lot of top bots have issues in 1000 round battles.

And welcome to the wiki. ;)

Voidious (talk)02:02, 16 November 2013

Thanks for the amazingly fast reply. And for the movement system, I've only been working on robocode for about a month, and I started on targeting first. Another interesting thing is that DrussGT only scores 73% with a 17% hitrate against Pris, worse than mine, yet it totally trounces my bot in a direct battle. Has anybody thought about using Random Forest for movement or targeting? It uses an ensemble of decision trees for classification. Its slow to generate a forest, but running data through one is pretty fast. I could imagine a robot which only retrained a few of the trees in a forest every tick. Seems somewhat similar to what people are doing with K nearest neighbor classification.

Straw (talk)02:37, 16 November 2013
Edited by author.
Last edit: 22:18, 16 November 2013

I've looked at random forests before, another one which interested me was Extreme Learning Machines which are feed-forward NNs working in an ensemble. The trouble I found was that even though these methods are fast when compared to other machine learning techniques (K-means, feedback NN, SVM), they are still much slower than a single KNN call in a Kd-Tree just because of the amount of data they need to touch for each 'event'. A Kd-Tree trains incrementally in O(logN) and classifies in O(logN), with N being the number of items in the tree. I think the only thing faster would be a Naive Bayes classifier.

Feel free to prove me wrong though =) I'd love something which works well beyond the ubiquitous Kd-Tree!

Another thing to consider is how you are going to pose the question. A lot of the successful NN-based approaches have used a bunch of classifiers, one for each potential firing angle, and shooting at the one with the highest probability. Others have tried posing it as a straight regression problem, but I don't think those worked as well, possibly because of the high noise (against top bots you are lucky to get a 10% hitrate).

I'd be interested to hear what you end up trying, and how it works out.

Skilgannon (talk)11:06, 16 November 2013

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:Talk:Pris/Dodging Performance Anomaly?/reply (6).

Recurrent NN uses a lot of memory and processing power, both of which are fairly limited in the RoboCode setting. Speed is definitely the main issue, particularly when a lot of the time is already taken doing predictions to give more relevant features for classification. Even with spreading calculations over multiple ticks many popular techniques Just Wouldn't Work.

If you can't get multiple outputs out of the RF, just run a bunch of them, one in each bin, and choose the bin with the highest probability. Ie, each bin is a different class and you choose the most probable class. Quick and dirty regression without inter-dependency. I've actually thought about trying a Naive Bayes like this, just for kicks. I think Pris and a few others do their NN classifications this way.

Skilgannon (talk)22:27, 16 November 2013

Running 50+ random forests with 50 trees each would be a lot of computation. I am first going to try seeing how well one RF predicts a GF or bearing offset.

Straw (talk)23:22, 16 November 2013

Executing one tree classification is pretty fast though, isn't it? I don't think 2500 of them per tick seems unreasonable. Or is it many times more than that? My main 1v1 gun does up to 13k loop iterations for its kernel density calculation, and that's on top of the kd-tree search for 225 nearest neighbors among up to ~25k data points. And the gun is the fast part of the bot. :-)

Voidious (talk)23:56, 16 November 2013

The problem would be training the forests, which is much slower. Training one forest would be much easier, allowing you to do more training and perhaps have a higher tree count. I plan to eventually try both anyway, but I am doing the easier approach first.

Straw (talk)03:24, 17 November 2013
 
 
 
 
 

I've looked at random forests before, but only briefly, and only because I saw on Wikipedia that they are like the state of the art in machine learning classification algorithms. :-P The other classification system I've always wanted to tinker with was Support Vector Machines, which I learned about in school and seemed really cool/versatile.

My main efforts to top KNN have been clustering algorithms, mainly a dynamic-ish k-means and one based on "quality threshold" clustering. I managed to get hybrid systems (meaning they use KNN until they have some clusters) on par with my KNN targeting, but getting the same accuracy at a fraction of the speed wasn't useful.

KNN really is fast as heck and just seems perfectly suited to the Robocode scenario. But Pris is pretty damn impressive with the neural nets and I'm sure someone could do better.

Voidious (talk)20:32, 16 November 2013
 

Even in a 35 round battle, my robot still barely wins at 51%, which is far higher than its score against comparable bots in the rumble. This is also with no preloaded GF data, it blindly fires HOT at first.

Straw (talk)02:44, 16 November 2013