Repository navigation
Allow Hide Names in Rumble - #117
Conversation
The engine, the battle dialog and .battle files can already hide enemy names from robots, but the rumble client always ran battles with names shown, so a competition could not use it. With HIDENAMES=YES in a rumble's configuration, the client runs its battles with hidden names and adds hidenames=YES to each upload, so a server can refuse results from a client that did not. The default is NOT.
A hidden name was built again on every call, so each event carried a new String. Real names are one object, and many robots compare them with == or !=.
There was a problem hiding this comment.
🟡 Changes recommended
Queued results can be mislabeled after HIDENAMES changes because retries use the current configuration instead of the battle’s original setting, which must be persisted per result.
1 open issue
What changed in this PR
This PR adds optional hidden enemy names to the RoboRumble client and stabilizes anonymous name objects for robots that compare names by reference.
Changes:
- Adds a
HIDENAMESoption to rumble configurations and passes it into battle setup. - Includes hidden-name mode in result uploads.
- Caches anonymous names and adds a regression test for name hiding and reference identity.
| File | Description |
|---|---|
robocode.tests/src/test/java/net/sf/robocode/test/robots/TestHiddenNames.java |
Tests hidden names and stable object identity. |
robocode.tests.robots/src/main/java/tested/robots/HiddenNames.java |
Adds a robot that reports names and reference changes. |
robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/ResultsUpload.java |
Adds hidden-name mode to upload data. |
robocode.roborumble/src/main/java/net/sf/robocode/roborumble/battlesengine/BattlesRunner.java |
Applies HIDENAMES when creating battles. |
robocode.core/src/main/java/net/sf/robocode/host/RobotStatics.java |
Reuses a cached anonymous name object. |
robocode.content/src/main/resources/roborumble/twinduel.txt |
Documents HIDENAMES, disabled by default. |
robocode.content/src/main/resources/roborumble/teamrumble.txt |
Documents HIDENAMES, disabled by default. |
robocode.content/src/main/resources/roborumble/roborumble.txt |
Documents HIDENAMES, disabled by default. |
robocode.content/src/main/resources/roborumble/meleerumble.txt |
Documents HIDENAMES, disabled by default. |
Review effort: Balanced
The upload read HIDENAMES from the configuration, but results can wait in the results file until a later upload. If the setting changed in between, those results were labelled with the new setting instead of the one they were played with. BattlesRunner now saves the setting in each battle's header, and the upload reads it from there. A header saved by an earlier client has no setting, which counts as NOT. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, this is great work. Merged, with a small follow-up:
We've also proposed both as per-rumble settings in LiteRumble (robo-code/literumble#9), so its existing rumbles only take results with them off. This ships as 1.12.0, so AutoRumble's |

This PR makes hidden names available to the rumble client and fixes a bug for names relating to certain ways robots compare names (RougeDC willow is one such robot massively negatively effected without this bug fix).