MASON Multiagent Simulation Toolkit on the NetBeans Platform
By Geertjan on May 04, 2010
The above text comes directly from the MASON homepage.
The site includes instructions for getting started with the project in NetBeans IDE. Download the sources as instructed and set everything up as described then run the project from the IDE and you'll see this:
Select one of the simulations and read about it, as shown here:
Then click "Select" and the dialog above closes, while the two below open at the same time, where you can perform the simulation of your choice:
Since each simulation is provided by a different author, wouldn't it be cool to have a pluggable container, rather than the fixed situation which MASON currently has? And wouldn't it be nice if you could see multiple simulations simultaneously? And wouldn't it be handy if you could throw away a lot of the boilerplate code and centrally register the actions?
Here's the result of the above ruminations, i.e., I ported the application to the NetBeans Platform, focusing on two of the many simulations, which are now available in the new application:
Looks better than the original, is easier to use, and the structure of the sources is nicer (i.e., rather than the looong list of packages of the original, the modular structure enables a far smaller codebase per module, making the application as a whole more manageable):
Porting simulations from the old structure to the new one is trivial. Create a new module, copy the simulation (i.e., each simulation in the original application is in its own package, which is handy) into the new module, set dependencies on the other modules (which contain utility classes and the console view), add a new action that opens the simulation, and then you're done.
As a result, each existing simulation can be ported to the new infrastructure in under 5 minutes of work, which is the time it took for me to port the Keep Away Soccer simulation into the new application:
And, two or three clicks later, without any coding in any shape or form, Office LAF can be added to the application:
I think all of this is a significant improvement to the architecture, functionality, and usability of MASON, enabling it to be far more maintainable and user friendly than it currently is... for almost no work at all.