Saving data in 2017?
The highlighted comment was created in this revision.
Saving data between battles seems to be something that a lot of old bots did, but it's not common nowadays. Is it still possible?
Does anybody have a currently working code snippet for saving data?
I tried to make it work a few times, but I never managed to overcome those security exceptions...
DrussGT and Neuromancer both do this at the top level to log any exceptions to file. You can look at them for examples. They don't however read any data back.
Well you have to use RobocodeFileOutputStream and robot.getDataFile in recent versions of robocode...
Anyway, since kd-trees are already learning super fast, maybe saving data is only very useful for the first 4 shots ;)
Anyway, using saved data could always make the evaluation harder, since your score is increasing over battles, but even after ~5000 battles, each bot is battled only 5 times (in 1v1).
So I personally discourage the use of saved data in robocode — except for debugging purpose.
Anyway, since there are already a lot of bots relying on saved data, we may never change that in the future ;)