Saving Gun Data

From RoboWiki
Jump to: navigation, search

In Robocode, robots are allowed to read from and write to files on the local disk, up to a certain amount of disk space. Targeting information gathered in one match can be extremely valuable in a later match, especially against the many robots that do not use adaptive movement. Since there is a limit on how much data can be saved, deciding what to save and how to save it is very important.

Technical details

The default disk space quota for a robot is 200 kilobytes. This quota can be changed by adding robocode.robot.filesystem.quota=SIZE_IN_BYTES to the file (currently under robocode/config, formerly in robocode root directory). It is also possible to package your robot with data already in its data directory.

In the RoboRumble, matches are run on many different machines, so the value of data saving is greatly diminished; if your bot faces an enemy that it has already faced, there is no guarantee that it will be on the same machine as the original battle (where it wrote the data). In addition, because there are so many bots in the RoboRumble, it is very difficult to manage your 200 kb quota so that you keep the most valuable information. Many robots cannot fit targeting data for 500+ opponents in 200 kb, so they are forced to delete some old data when writing new data. It is against the rules of the RoboRumble to package your bot with more than 200 kb of data.

Notable methods of saving gun data

Arguably the most potent method of saving gun data is Wiki Targeting, so named because it arose out of a discussion among several people on the wiki. Research showed that a large percentage of data collected by a visit count stats gun was located in relatively few segments (e.g., a few hundred segments in a gun with many thousands of segments), called super nodes. By saving only the most visited bin for the most visited segments (super nodes), you can retain accurate targeting data for a large percentage of the enemy's movements in a small amount of space.

Many bots use two or more virtual guns. Saving the accumulated ratings of these guns takes very little space (small enough to store it for every RoboRumble opponent), but can be very valuable information to have at the start of a match.

See also

Personal tools