I am using Robocode to develop GA tanks that evolve to give better performance (achieving highest fitness levels) and in order to do that I need to store information about each tank in one file.
The class Tank will have several variables such as:
- Speed
- Angular Momentum
- Fire power
- Scan Rate
I would like a way to be able to save these variables in a file called "settings.txt" and to be able to update them after a battle.
I would like the file to be formatted like:
robot(1):
speed=12
angMomentum=6
firePower=2
scanRate=10
robot(2):
speed=8
angMomentum=4
firePower=3
scanRate=13
What would be the best way to write a file like this and to be able to easily update the variable values after each battle?
Many Thanks.