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

View File

@@ -1729,7 +1729,10 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
void AIPlayerBaka::initTimer()
{
timer = 0.1f;
if (mFastTimerMode)
timer = 0;
else
timer = 0.1f;
}
int AIPlayerBaka::computeActions()
@@ -2243,12 +2246,16 @@ int AIPlayerBaka::Act(float dt)
oldGamePhase = currentGamePhase;
timer -= dt;
if (mFastTimerMode)
timer -= 1;
else
timer -= dt;
if (timer > 0)
{
return 0;
}
initTimer();
if (combatDamages())
{
return 0;