home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 11 Learning / 04 Mommersteeg / Predictors / SelfAdjustingPredictor.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-24  |  1.3 KB  |  37 lines

  1. //----------------------------------------------------------------------------------------------
  2. // Sequential Prediction Demo: The positioning pattern
  3. // 
  4. // Author:  Fri Mommersteeg
  5. // Date:    10-09-2001
  6. // File:    SelfAdjustingPredictor.h
  7. //----------------------------------------------------------------------------------------------
  8.  
  9. #ifndef __SELFADJUSTINGPREDICTOR_H
  10. #define __SELFADJUSTINGPREDICTOR_H
  11.  
  12. //----------------------------------------------------------------------------------------------
  13. // Include files
  14. //----------------------------------------------------------------------------------------------
  15.  
  16. #include "improvedpredictor.h"
  17.  
  18. //----------------------------------------------------------------------------------------------
  19. // CSelfAdjustingPredictor: automatically adjusts the performance indicator
  20. //----------------------------------------------------------------------------------------------
  21.  
  22. class CSelfAdjustingPredictor : public CImprovedPredictor {
  23. public:
  24.  
  25.     CSelfAdjustingPredictor() { m_EstimatedCorrect = false; }
  26.  
  27.     virtual void    Update(int NextElement);
  28.     virtual bool    GetPrediction(int &Prediction);
  29.  
  30. protected:
  31.  
  32.     bool            m_EstimatedCorrect;
  33.  
  34. };
  35.  
  36. //----------------------------------------------------------------------------------------------
  37. #endif // __SELFADJUSTINGPREDICTOR_H