www.pudn.com > Product_Submit2004.rar > Walker.h, change:2004-04-22,size:1653b


#ifndef WAKLER_H 
#define WALKER_H 
 
#include "Dude.h" 
#include "../TOOLS/Utilities.h" 
 
class Walker : public Dude { 
 
#define stepFreqIndex 0 
#define maxForwardIndex 1 
#define maxBackIndex 2 
#define fshIndex 3 
#define ffoIndex 4 
#define fsoIndex 5 
#define fhIndex 6 
#define bshIndex 7 
#define bfoIndex 8 
#define bsoIndex 9 
#define bhIndex 10 
 
#define dataSize  11 
 
#define HILLCLIMBING 0 
#define HILLCLIMBING2 1 
 
public: 
	Walker(); 
  ~Walker(); 
 
	virtual void NewReadyModel(); 
	virtual void NewPlayingModel(); 
 
  void StartTimer(); 
  void EndTimer(bool); 
 
  void ChangeParameters(bool); 
 
  void WriteConfigFile(); 
 
  void HillClimbing(bool); // Inline 
  void HillClimbing2(bool); // 1-alpha use of prevoious step 
 
  double GaussianDistribution(double); 
  double CauchyDistribution(); 
 
  struct ParameterSet { 
    double data[dataSize]; 
    int time; 
  }; 
 
private: 
  bool learnType; 
 
  int runCount; 
  int unsucCount; 
  Utilities utils; 
  VisionObject* targetBeacon; 
  bool targetGP;  
  bool inPlaying; 
  bool paramLearning; 
  bool locusFrontLearning; 
  bool locusBackLearning; 
  double multiplier; 
  double maxLocusChange; 
 
  int startFrame; 
  int endFrame; 
 
  ParameterSet currentSet; 
  ParameterSet lastSet; 
  ParameterSet bestSet; 
  ParameterSet change; 
 
  double **currFrontLocus; 
  double **currBackLocus; 
  double **bestFrontLocus; 
  double **bestBackLocus; 
 
  double alpha; 
  double maxAlpha; 
  bool decreaseAlpha; 
  double decreaseAlphaRate; 
   
  double beaconDistance; 
  int beaconCount; 
  double prevBeaconDistance; 
  double prevWalkDistance; 
}; 
 
#endif