Saving data in 2017?

Jump to navigation Jump to search

Saving data in 2017?

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

Cb (talk)19:25, 12 October 2017

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.

Skilgannon (talk)20:22, 12 October 2017

Well, I’m also doing this after experencing some higgs-bugson.

Xor (talk)02:36, 13 October 2017
 

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

Xor (talk)03:35, 13 October 2017