Introduction
MRB's Documentation
Walkthrough
    The General Idea
    MasterControl
    The Modules
    The World
Design Suggestions Modified MRB Source

Code Walkthrough: The Modules

All modules except for tactical module are basically the same.  Each module includes the module class.  That class has a ModuleInfo member variable that is used to communicate messages to the soccer server (although it only has one member variable and no member functions?).  Each module can except messages from the soccer server (feedbackAudio) and create messages to send to the server (getSayMsg).  The feedbackWorld function updates the modules snapshot member variable to the current state of the world.  

The evaluate and act functions of the modules are the most interesting.  The evaluate function grades a given module on its suitability to the information presented by snapshots of the world and tactical snapshots, and the act function uses the player's skills object to tell the soccer server the necessary moves to accomplish the module's behavior.

 

Previous: MasterControl Next: The World