It's not available yet. When I'm satisfied with it, I'll release the source. |
PluggableRobot/Source |
How competitive is it?It's not a competition bot. You extend it to make your own. How does it move?It doesn't. How does it fire?It doesn't. How does it dodge bullets?It doesn't. How does the melee strategy differ from one-on-one strategy?There is no strategy. The robot by itself does nothing. How does it select a target to attack/avoid in melee?It doesn't. |
How competitive is it? How does it move? How does it fire? How does it dodge bullets? How does the melee strategy differ from one-on-one strategy? How does it select a target to attack/avoid in melee?It's just an architecture upon which a robot can be built. Without extension, it's pretty much indistinguishable from SittingDuck. |
Sure, when I release it. Hopefully that will be soon. |
Sure, help yourself to the source code. I would like to be able to make this into a JAR that can just be dropped into another project, but Robocode doesn't seem to let you do this in development mode. :( |
I built its features as I needed them for RabidWombat. There are a few areas that I didn't need that I should round out for completeness's sake. In particular, there are some events that RabidWombat doesn't use that I should create listeners for. |
The componentization, EventManagement and debug graphics parts are all done. I may want to include some persistence code. |
None directly, although I've culled a couple of ideas from the wiki. The EventManagement page shows some discussion I had with others here that resulted in code that went into it, but PluggableRobot is basically an original creation. |
None directly, although I've culled some ideas from the wiki. The EventManagement page shows some discussion I had with others here that resulted in code that went into it, but PluggableRobot is basically an original creation. |
Yeah, it does not surprise me that modularity would be a popular topic. Here's a bit more about how PluggableRobot works. Basically, PluggableRobot allows you to register Listeners, Components and Painters. * I define a listener interface for each of the Robocode events, and any objects which implement the interfaces and register themselves with the bot will be notified of those events. The really nice thing is that PluggableRobot gives much better control over the order in which notifications are given; listeners are notified of events in the order that they are registered, and each listener gets the events in the order that the corresponding listener interfaces are declared. So a class with a declaration like public class MyClass implements EventListener.ScannedRobot, EventListener.Deathwill get notified of the ScannedRobotEvent *before* the DeathEvent?. Pretty handy. All of this happens inside a custom event test as discussed on the EventManagement page. I don't actually make the robot do anything at this stage; this is just for data collection and processing. * Components are where I actually make the robot do stuff. Each component has a go() method that gets executed in the main loop of the robot. Like the event listeners, they get called in the order that they were registered. * Similarly, painters have a paint() method that gets called when it's time to paint debug graphics. In the onPaint() method on the robot I inject the Graphics2D object into a custom object I've created called the Hud, which takes care of icky stuff that Graphics2D expects, like downcasting (Is that a word?) from double to int, translating angles to degrees, etc. * Pluggable robot also defines initializeBattle() and initializeRound() methods. -- RobertWalker |
It's not too surprising that the same people that enjoy programming for fun would also tend to build their bots with more modular designs, though some are certainly more "pluggable" than others. (Dookious is pretty clean code, IMO, but it would be easier to implement a new Wave-based gun than a new PatternMatching gun.) In addition to all the usual reasons for doing so (ie, in a profession), with Robocode it has the additional benefit of keeping me more motivated to work on my bots. PrairieWolf is a classic (one of the Ancients) that uses some kind of pluggable design for its MultiMode strategies. -- Voidious
Yeah, it does not surprise me that modularity would be a popular topic. Here's a bit more about how PluggableRobot works. Basically, PluggableRobot allows you to register Listeners, Components and Painters.
public class MyClass implements EventListener.ScannedRobot, EventListener.Deathwill get notified of the ScannedRobotEvent *before* the DeathEvent?. Pretty handy. All of this happens inside a custom event test as discussed on the EventManagement page. I don't actually make the robot do anything at this stage; this is just for data collection and processing.