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

@@ -801,6 +801,10 @@ void GameStateMenu::ButtonPressed(int controllerId, int controlId)
if (Rules::getRulesByFilename("testsuite.txt"))
subMenuController->Add(SUBMENUITEM_TESTSUITE, "Test Suite");
#endif
#ifdef AI_CHANGE_TESTING
subMenuController->Add(SUBMENUITEM_TESTAI, "AI A/B Testing");
#endif
currentState = MENU_STATE_MAJOR_SUBMENU | MENU_STATE_MINOR_NONE;
}
break;
@@ -877,7 +881,16 @@ void GameStateMenu::ButtonPressed(int controllerId, int controlId)
#endif //NETWORK_SUPPORT
currentState = MENU_STATE_MAJOR_MAINMENU | MENU_STATE_MINOR_SUBMENU_CLOSING;
break;
#ifdef AI_CHANGE_TESTING
case SUBMENUITEM_TESTAI:
options[Options::AIDECKS_UNLOCKED].number = 5000; //hack to force-test all decks
mParent->players[0] = PLAYER_TYPE_CPU_TEST;
mParent->players[1] = PLAYER_TYPE_CPU_TEST;
mParent->gameType = GAME_TYPE_DEMO;
subMenuController->Close();
currentState = MENU_STATE_MAJOR_DUEL | MENU_STATE_MINOR_SUBMENU_CLOSING;
break;
#endif
#ifdef TESTSUITE
case SUBMENUITEM_TESTSUITE:
mParent->rules = Rules::getRulesByFilename("testsuite.txt");