Thread history

From Talk:Saving Gun Data
Viewing a history listing
Jump to navigation Jump to search
Time User Activity Comment
05:33, 21 December 2013 Straw (talk | contribs) New thread created  
06:18, 21 December 2013 Rednaxela (talk | contribs) New reply created (Reply to Help saving data?)
06:22, 21 December 2013 Rednaxela (talk | contribs) Comment text edited  
09:59, 21 December 2013 Straw (talk | contribs) New reply created (Reply to Help saving data?)
19:44, 21 December 2013 Tmservo (talk | contribs) New reply created (Reply to Help saving data?)
19:53, 21 December 2013 Tmservo (talk | contribs) Comment text edited  
19:53, 21 December 2013 Tmservo (talk | contribs) Comment text edited  
19:54, 21 December 2013 Tmservo (talk | contribs) Comment text edited  
20:35, 21 December 2013 Tmservo (talk | contribs) Comment text edited  
20:36, 21 December 2013 Tmservo (talk | contribs) Comment text edited  
22:14, 21 December 2013 Rednaxela (talk | contribs) New reply created (Reply to Help saving data?)
22:24, 21 December 2013 Straw (talk | contribs) New reply created (Reply to Help saving data?)
22:29, 21 December 2013 Straw (talk | contribs) New reply created (Reply to Help saving data?)
22:30, 21 December 2013 Tmservo (talk | contribs) Comment text edited  
22:34, 21 December 2013 Tmservo (talk | contribs) New reply created (Reply to Help saving data?)

Help saving data?

I don't know java files very well, and I want to have a bot record some data for research. Whenever I try to make a file to record stuff in, robocode stops the bot. I am trying to create a file in the robot's data directory, but I must be doing something wrong. How do you specify a path to a directory in which you are allowed to write?

Straw (talk)05:33, 21 December 2013

You can use AdvancedRobot.getDataDirectory() to get the path you're allowed to write in. Alternatively, you can use AdavancedRobot.getDataFile(String filename)

To enforce the write quota, Robocode also requires that you write to the file using RobocodeFileOutputStream or RobocodeFileWriter (instead of FileOutputStream or OutputStreamWriter)

(and, as is mentioned on Saving Gun Data of course you can adjust the write quota)

Rednaxela (talk)06:18, 21 December 2013

Thanks.

Straw (talk)09:59, 21 December 2013
Edited by author.
Last edit: 22:30, 21 December 2013

Straw the write quota has to be 200 kb or below in order to roborumble P.S what data is saved P.P.S what K-D-tree are you using

Tmservo (talk)19:44, 21 December 2013

This doesn't have anything to roborumble. I'm sure Straw understands that non-default quotas only apply to one's own robocode install.

Rednaxela (talk)22:14, 21 December 2013

Yeah I am only using this to get data for experimentation and debugging, not to save data between battles in the rumble.

Straw (talk)22:24, 21 December 2013
 

I am using a modified version of Skilgannon's kD-Tree which supports dynamic reweighting.

Straw (talk)22:29, 21 December 2013

can you open source that version

Tmservo (talk)22:34, 21 December 2013