schrum2 / MM-NEATv2

MM-NEAT version 2.0 is no longer supported. Please get MM-NEAT 3+ from https://github.com/schrum2/MM-NEAT
Other
11 stars 5 forks source link

JUnit test for microRTS eval function #447

Closed schrum2 closed 7 years ago

schrum2 commented 7 years ago

I think a proper unit test for the complex eval function would really help. This unit test should include all of the possible input substrates (even though we are not using all of them). The unit test should start by generating an interesting GameState ... perhaps you can manually place units, bases, etc onto a GameState.

Then, the state should be evaluated with the complex eval function (generate a random neural network for it). Save that score. If we are not already doing so, then the eval function needs to track what it is doing from the perspective of a specific pre-designated player.

Next, alter the game state by switching units of player 1 with those of player 2 and vice-versa. Also, change the settings of the complex eval function so it will calculate a score from the perspective of the other player. Once this score is calculated, it should be the same at the original score computed for the first player.