-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fin du debogage, création des premières stratégies
- Loading branch information
1 parent
a81f040
commit a87ef9f
Showing
21 changed files
with
274 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
/* | ||
* main.cpp | ||
* | ||
* Created on: 9 févr. 2018 | ||
* Created on: 9 f�vr. 2018 | ||
* Author: et | ||
*/ | ||
|
||
#include <vector> | ||
#include <iostream> | ||
|
||
#include "StratChoix1.h" | ||
#include "Strat01.h" | ||
#include "StratRep.h" | ||
#include "StratOpp.h" | ||
#include "StratOpport.h" | ||
#include "AGContreStratFixe.h" | ||
#include "Jeu.h" | ||
|
||
int main(int argc, char *argv[]) { | ||
std::vector<int> matriceGains; | ||
matriceGains.push_back(-1); | ||
matriceGains.push_back(-1); | ||
matriceGains.push_back(-10); | ||
matriceGains.push_back(0); | ||
matriceGains.push_back(0); | ||
matriceGains.push_back(-10); | ||
matriceGains.push_back(-10); | ||
matriceGains.push_back(0); | ||
matriceGains.push_back(-5); | ||
matriceGains.push_back(-5); | ||
Jeu jeu(matriceGains); | ||
StratChoix1 strat; | ||
StratOpport strat; | ||
AGContreStratFixe algo(strat, jeu, 20, 20, 4); | ||
algo.affichage(); | ||
algo.doOneGeneration(); | ||
algo.affichage(); | ||
algo.doGenerations(200); | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Strat01.cpp | ||
* | ||
* Created on: 14 févr. 2018 | ||
* Author: emacedegastines | ||
*/ | ||
|
||
#include "Strat01.h" | ||
|
||
Strat01::Strat01():m_etat(1) { | ||
// TODO Auto-generated constructor stub | ||
|
||
} | ||
|
||
Strat01::~Strat01() { | ||
// TODO Auto-generated destructor stub | ||
} | ||
|
||
int Strat01::actionSuivante(){ | ||
m_etat = 1 - m_etat; | ||
return m_etat; | ||
} | ||
|
||
void Strat01::memoriser(const int uneAction){ | ||
|
||
} | ||
|
||
void Strat01::reinitialiser(){ | ||
m_etat = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Strat01.h | ||
* | ||
* Created on: 14 févr. 2018 | ||
* Author: emacedegastines | ||
*/ | ||
|
||
#ifndef SRC_STRAT01_H_ | ||
#define SRC_STRAT01_H_ | ||
|
||
#include "Strategie.h" | ||
|
||
class Strat01 : public Strategie{ | ||
int m_etat; | ||
public: | ||
Strat01(); | ||
virtual ~Strat01(); | ||
int actionSuivante(); | ||
void memoriser(const int uneAction); | ||
void reinitialiser(); | ||
|
||
}; | ||
|
||
|
||
#endif /* SRC_STRAT01_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* StratOpp.cpp | ||
* | ||
* Created on: 14 févr. 2018 | ||
* Author: emacedegastines | ||
*/ | ||
|
||
#include "StratOpp.h" | ||
|
||
StratOpp::StratOpp(): m_dernierChoix(0){ | ||
// TODO Auto-generated constructor stub | ||
|
||
} | ||
|
||
StratOpp::~StratOpp() { | ||
// TODO Auto-generated destructor stub | ||
} | ||
|
||
|
||
int StratOpp::actionSuivante(){ | ||
return (1 - m_dernierChoix); | ||
} | ||
|
||
void StratOpp::memoriser(const int uneAction){ | ||
m_dernierChoix = uneAction; | ||
} | ||
|
||
void StratOpp::reinitialiser(){ | ||
m_dernierChoix = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* StratOpp.h | ||
* | ||
* Created on: 14 févr. 2018 | ||
* Author: emacedegastines | ||
*/ | ||
|
||
#ifndef STRATOPP_H_ | ||
#define STRATOPP_H_ | ||
|
||
#include "Strategie.h" | ||
|
||
class StratOpp : public Strategie{ | ||
int m_dernierChoix; | ||
|
||
public: | ||
StratOpp(); | ||
virtual ~StratOpp(); | ||
int actionSuivante(); | ||
void memoriser(const int uneAction); | ||
void reinitialiser(); | ||
}; | ||
|
||
#endif /* STRATOPP_H_ */ |
Oops, something went wrong.