From RoboWiki
Revision as of 20:35, 10 August 2017 by MultiplyByZer0 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Design - Troubleshooting
Author(s) Kawigi
Extends AdvancedRobot
Targeting GuessFactor Targeting
Movement Random Movement
Current Version 2.0
Code License Public domain
[Link is broken and no mirror can be found. If you have a copy of the JAR, please share it.] Download]

Background Information

FloodGrapher is a graphing utility to help people optimize their movement against GuessFactor Targeting. It lets you analyze your Movement Profile.

The first FloodGrapher was a hack to look at the data files saved by FloodMini 1.3. I originally made it to both debug FloodMini's gun and FloodHT's movement. I made small changes to it a few times, Jim started using it, and eventually I released a version that has since become probably more widely used than Iiley's SmogPainter, and became the base of PEZ's RoboGrapher. It was sloppily coded and not really meant to do anything besides read FloodMini's data, but the options available made it one of the most useful robot development tools available. The main disadvantage as it gained usage is that FloodMini became "The Test Bot" - every new robot would spend thousands of rounds fighting FloodMini before even being tested against other bots, which meant that many bots were somewhat optimized specifically against FloodMini, which doesn't do much for FloodMini's ratings :-p.

Version 2.0

This is the version of FloodGrapher that is meant to be used. As useful as the original was, it wasn't really written to be used by other people, and it lacks extensibility. The new graphing utility was completely written from the bottom up as basically a new program under the same name (but a different package), and it will hopefully grow to become the ultimate Robot development utility (and won't be bound to FloodMini, so hopefully people will stop releasing bots that beat it. Fat chance, eh?)


To install FloodGrapher, just extract it into your robot directory. It will extract most of its files into kawigi\tools\ and kawigi\resource\, and then it will leave a .sh file and a .bat file in the robot directory to run the program. The startup files assume that robocode.jar and codesize.jar are in the parent directory of the robots directory where FloodGrapher was extracted, so if that's not the case, you'll have to change the script you use.

Support for Multiple Graphs

Any number of graphs can be displayed on the new FloodGrapher at the same time, on top of each other. These graphs could be on different segments and come from different bots.

Extensibility / Plugin support

This version was also made with extensibility in mind. It has a plugin interface which can be made to make it open files saved by other robots. All you need to do is write a class that manages the UI for each segmentation axis and one to open the file and convert it to a data object (which mostly involves converting the data into a multi-dimensional array of doubles and saying what order the segmentations are in by creating the other objects). I suspect it will take about 30 minutes to an hour for most people, depending on how familiar they are with Swing components and GUI design. I recommend taking a look at how I did it with FloodMini to help you get started. Hopefully, a lot of people will write modules for it, while they're at it.
Aside from file formats, there is also a plugin interface for the GUI, allowing people to write useful little tools and integrate them with FloodGrapher.

A New Robot

A new robot (which has been designed but not yet written) will come with the grapher and will probably be the most readily configurable robot ever written. It will have a config file that can be used to change distancing, movement, energy management, and data segmentation. New segmentations, movements, and power management schemes can be written and added to the robot without changing or recompiling the robot. They are configured by editing the robot.ini file in its data directory, using "FloodScript", FloodGrapher's configuration "language".

Other utilities?

There is room for more modules and utilities to be built into FloodGrapher. Included with it currently are:
  • The Grapher (of course)
  • A plugin configurator
  • A FloodScript editor (edit the FloodGrapher configuration language with text hilighting and everything :-) )
  • A Codesize monitor (open your classes and hit refresh to see their new codesize - now you don't need to open the console to do it)
  • A Help browser (I wouldn't mind someone going through and editing the HTML help files to make it more complete, I tried to document the most confusing parts myself)
In the future, I could see such expansions as:
Please feel free to give suggestions, ask questions, etc. here on the wiki.

A Request

Now, I have one simple request for those that have used FloodGrapher and will use this one - please contribute! If you're testing and you write your own file format classes for your own robots, send them over. If you have an idea for a GUI module, try writing it and send it my way for the next release. If you find little problems, report them, or even fix them yourself and tell me how you did it. If you're experimenting with new segmentations, submit them for the next release. Many such things could be added with very little effort, just as you see the need for them.
On a side, just because I'm curious, let me know if you've used it and what robots' movement has somehow been a product of FloodGrapher.

Version History

  • Version 2.0 - first version using Swing and the new, fully pluggable design. Features FloodScript configuration files in a format I just made up. Modules that came with it:
    • Segmentations / grapher segmentations: distance, bullet flight time, lateral velocity, acceleration, walls
    • Movements: FloodMini movement (not quite equivalent, but close), FhqwhgadsMovement (same), an oscillating movement I was experimenting with, stationary. The moving movements take a parameter for the distancing algorithm (dynamic or static within a given range).
    • Energy Management: FloodHT 0.8 power, FloodMini power (same as I use in several bots), power 3 only.
    • File formats: FloodGrapher format (for the robot that comes with it), FloodMini 1.4 format, "dummy" file format (for files you can't read but want to delete periodically)
    • GUI plugins - the Grapher (of course), plugin manager, FloodScript editor, codesize monitor, help browser (most help files so far are for extending FloodGrapher, more to come hopefully).
  • Version 2.1 - soon to come. Time for some bug fixes, a few more little options that might help people testing and also getting it to run more stably, I'm planning on two new GUI parts - one that runs test battles (basically done) and an ELO calculator (not sure how many features I'll cram in there yet, I might make it a simple spreadsheet sort of program to calculate your projected rating from results against several bots, maybe with the option to download current rankings from the RR@H). I also plan on including new file formats people have implemented, Wodan and StatistRobot and whatever else seems appropriate, as long as their authors don't object. And any others I can coax people into writing soon. Any other utilities / modules that should be included here?
Personal tools