Advertisement
BeneFager

Untitled

Dec 13th, 2022
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. enum E_Selection : int
  2. {
  3.     roulette,
  4.     tournament
  5. };
  6.  
  7. struct Population
  8. {
  9. public:
  10.     //int generation;
  11.     float maxFitness;
  12.     float minFitness;
  13.     float avgFitness;
  14.     float totalFitness;
  15.  
  16.     int numElites; //bästa boisen
  17.     float crossRate;
  18.     float mutRate;
  19.     float mutMax;
  20.  
  21.     std::string name;
  22.  
  23.     E_Selection selection;
  24.     std::vector<Gene> genes;
  25.  
  26. };
  27.  
  28. struct Gene
  29. {
  30. public:
  31.     float fitness;
  32.     int index;
  33.     std::vector<float> weight;
  34. };
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement