Repository navigation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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).