Remove bots with underscores in version numbers?

Jump to navigation Jump to search

Remove bots with underscores in version numbers?

It seems that roborumble thinks SimpleBot 0.023h_knn to be a bot named "SimpleBot_0.023h" with version number "knn", and failed to retire it from the rumble.

How can I remove it anyway from the rumble?

Xor (talk)06:56, 26 August 2017

Do not worry, it is already gone. It just take a bit of time for rumble to process it.

By the way, you can add flag for your bot.

Beaming (talk)07:37, 26 August 2017

No it is still there. And it is not removed because the literumble says ERROR. name/game does not exist: aaa.SimpleBot_0.023h knn/roborumble

If you see, and search, there will be 3 SimpleBot, as the old ones are failed to remove.

the problem is not in roborumble@home, as the request body is version=1&game=roborumble&name=aaa.SimpleBot_0.023h_knn&dummy=NA which is raw data.

But the server handles version numbers with underscores badly, the server thinks it is "aaa.SimpleBot_0.023h knn".

Xor (talk)07:49, 26 August 2017

Hmm, yeah, LiteRumble itself seems to see the versions correctly. The rankings, anyway. I'm not sure if it's a client bug encoding the URL or the bot removal endpoint on the server that has a parsing bug (or both, even). In any case, I think we may need Skilgannon to manually retire the old bots, or maybe tell us how to do it.

Voidious (talk)15:33, 26 August 2017

Hey, sorry for the delay. This has been a longstanding problem with the rumble client. In some interfaces it replaces the spaces with underscores, and in others it doesn't and expects the server to do it. In order to be compatible I had to replace the last _ with a space in the server. It can't be the first _, because many bots have _ in their names. However I hadn't considered what would happen if we have _ in the version. Manually removing is a little complicated, I think I'd actually have to patch the code. However that doesn't prevent this from happening again.

I guess maybe I need some more intelligent logic in splitting the version and the name. Maybe this should be done as a challenge? It is a fairly 'soft' problem, and we have a bunch of input data (the rumble population) that we can verify the algorithm on. Bonus points if it is written in Python.

So the basic requirements are:

  • Has the same behavior as 'replace last _ with space' for the current rumble population
  • If you add an _suffix in the version number of any of the current bots, correctly detect that it is in the same prefix version, and the suffix you add is part of the version.
Skilgannon (talk)20:47, 27 August 2017

However I think this problem can be solved by simply trying all of the combinations when failed to remove a bot ;) As the problem seams to happen mostly on removing bots.

When removing bots, first try the canonical method, if failed, try everything that matches the name where '_' are replaced by `[ _]` (regex that matches space or underscore).

Say, if it failed to remove "SimpleBot_0.023h knn", try /^SimpleBot[ _]0\.023h[ _]knn$/ until success ;)

Xor (talk)04:56, 28 August 2017

Finally had a free moment to work on this, done! If there is more than 1 underscore I iteratively test replacing each with a space and the first which matches a bot gets used.

Skilgannon (talk)15:31, 3 September 2017

Thanks a lot!

Xor (talk)16:37, 3 September 2017

How did you even get an underscore in the version field?

The robot packager says "Please enter a version number for this robot (up to 10 word chars: letters, digits, dots, but no spaces)", and greys out the "Next" button if you type an underscore.

MultiplyByZer0 (talk)21:36, 27 August 2017

I never tried package my bot with robocode ;) I use a utility which transpiles my bot to Java 6 (I'm using Java 8 and it's features) and package it at the same time.

Xor (talk)04:48, 28 August 2017

> I use a utility which transpiles my bot to Java 6

You can just compile with:

javac -target 1.5 -source 1.5 [...]
MultiplyByZer0 (talk)05:09, 28 August 2017

This won't work as I'm using Java 8 features, etc. default methods, which can only be transpiled with some tricks.

Xor (talk)05:15, 28 August 2017