Closed DarwinJohnson closed 7 years ago
I think I've solved it, but I want you to unit test this. For the sake of the unit testing, it might be helpful to invent a fake BoardGame instance that has unusual properties. For example, a board game that immediately ends, and in which player 1 always wins. This way it is easy to anticipate the outcomes and write proper tests.
Created a JUnit Test for the BoardGameUtil score averaging. Created a Test Board Game that defaults to being an End State in which Player 1 wins. According to the JUnit Test, the Score averaging is working. The Fitness Function used to test this was the SimpleWinLoseDraw Fitness Function.
Make individual evaluations of Board Games force all Players to play one game as each possible player Index; i.e., have the Agents play one round as the Black Checks and one round as the Red Checks in Checkers during one evaluation.