Adding a system to compare two AI implementations (AIPlayerBaka and AIPlayerBakaB). This can be used to make sure a change to the AI is not making the AI weaker, for example.

This commit is contained in:
wagic.the.homebrew
2011-09-20 11:32:24 +00:00
parent 4c45e971c6
commit 44d9951246
14 changed files with 1921 additions and 19 deletions
+8
View File
@@ -16,6 +16,7 @@
#define _IAPLAYER_H
#include "Player.h"
#include "config.h"
#include <queue>
using std::queue;
@@ -68,7 +69,9 @@ public:
class AIPlayer: public Player{
protected:
bool mFastTimerMode;
queue<AIAction *> clickstream;
int clickMultiTarget(TargetChooser * tc,vector<Targetable*>&potentialTargets);
int clickSingleTarget(TargetChooser * tc,vector<Targetable*>&potentialTargets, MTGCardInstance * Choosencard = NULL);
@@ -93,6 +96,8 @@ public:
int isAI(){return 1;};
void setFastTimerMode(bool mode = true) { mFastTimerMode = mode; };
};
@@ -100,6 +105,9 @@ public:
class AIPlayerFactory{
public:
AIPlayer * createAIPlayer(MTGAllCards * collection, Player * opponent, int deckid = 0);
#ifdef AI_CHANGE_TESTING
AIPlayer * createAIPlayerTest(MTGAllCards * collection, Player * opponent, int deckid = 0);
#endif
};