Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Tools/DynamicTeamTactic/TacticChooser.h

Go to the documentation of this file.
00001 /**
00002 * @file TacticChooser.h
00003 * 
00004 * This file contains a generic class for Tactic Choosing.
00005 * @author <A href=mailto:jochen@kerdels.de>Jochen Kerdels</A>
00006 */
00007 
00008 #ifndef __TacticChooser_h_
00009 #define __TacticChooser_h_
00010 
00011 #include "Modules/BehaviorControl/BehaviorControl.h"
00012 #include "CollectedBeliefs.h"
00013 #include "RateableOptions.h"
00014 #include "GlobalAnalyser.h"
00015 #include "ChooserRaterInterfaces.h"
00016 
00017 
00018 #include "Modules/BehaviorControl/GT2004BehaviorControl/GT2004DTT/DefGlobalAnalyser.h"
00019 
00020 /**
00021 * @class TacticChooser 
00022 *
00023 * The Base class for tactic choosing
00024 *
00025 * It is the task of tactic choosing to choose one option from all avaible options.
00026 */
00027 class TacticChooser :  public BehaviorControlInterfaces
00028 {
00029 protected:
00030 
00031   CollectedBeliefs& collectedBeliefs;
00032 
00033   // TacticChooser engine(s)
00034   GlobalAnalyser* globalAnalyser[RateableOptions::numOfGlobalAnalysers];
00035 
00036   /**
00037   * Structure to communicate between TacticChooser und OptionRater 
00038   */
00039   ChooserRaterInterfaces& chooserRaterInterfaces;
00040   
00041 public:
00042 
00043   /**
00044    * Constructor.
00045    * @param interfaces The parameters of the OptionRating module.
00046    * @param collectedBeliefs The collected-Beliefs to work on.
00047    * @param chooserRaterInterfaces We want to talk to the Option-Rating.
00048 
00049    */
00050   TacticChooser(const BehaviorControlInterfaces& interfaces,
00051                 CollectedBeliefs& collectedBeliefs,
00052                 ChooserRaterInterfaces& chooserRaterInterfaces)
00053     : BehaviorControlInterfaces(interfaces),
00054       collectedBeliefs(collectedBeliefs),
00055       chooserRaterInterfaces(chooserRaterInterfaces)
00056   {
00057     // register global analysers ..
00058 
00059     // DefGlobalAnalyser Engine..
00060     globalAnalyser[RateableOptions::defaultGlobalAnalyser] =
00061       new DefGlobalAnalyser(interfaces);
00062 
00063   }
00064   
00065   /** Destructor */
00066   virtual ~TacticChooser()
00067   {
00068     // freeing Global Analysers ..
00069     delete(globalAnalyser[RateableOptions::defaultGlobalAnalyser]);
00070   }
00071 
00072 
00073   /** This method should be implemented by descendants */
00074   virtual RateableOptions::OptionID chooseOption() = 0;
00075 
00076   /** 
00077   * Is called for every incoming debug message.
00078   * @param message An interface to read the message from the queue
00079   * @return if the messag was read
00080   */
00081   virtual bool handleMessage(InMessage& message) {return false;}
00082 
00083 };
00084 
00085 #endif // __TacticChooser_h_
00086 
00087 /*
00088  * Change log :
00089  * $Log: TacticChooser.h,v $
00090  * Revision 1.3  2004/07/22 22:38:35  kerdels
00091  * added DTT used by Open Challenge, RIP and Xabsl-Options will follow
00092  *
00093  *
00094  */

Generated on Thu Sep 23 19:57:37 2004 for GT2004 by doxygen 1.3.6