How to evaluate the performance on a zero-sum game?
I'm looking for ways to evaluate the performance of a zero sum game in Unity ML-Agents. My scenario consists of an RTS game with a sparse ternary reward (win (1)/tie (0)/loss (-1)) at the end of the game. Naturally, if both players are controlled by the same brain, the plot of the cumulative reward in tensorboard will always be 0.
Looking at the episode duration, I can see which episodes finished earlier than the specified maximum of 100,000 steps. However, this can't really be used as performance measure, either, because it doesn't tell me if one of the agents just made some really bad decisions and was defeated with a rush right at the beginning of the episode.
So my question is: What would be my best bet to see if the agents improve over time? Are the policy and value loss sufficient to tell that the agent's policy has settled and won't improve anymore?
I dont think it can learn when it only plays against itself. I tried something similar and my pest approach to this problem:
First make an environment where the ml-agent can learnt he game basics (so you need a simple self written ai he can train against). Here you can find out if your current reward is sufficient or not. (small tip: 100k timesteps is probably way to long. if you can not reduce this significantly you definitely have to add intermediate rewards)
(As far as i know there is no way to"split" an already trained agent into multiple brains, so we have to do the following workaround (someone pls correct me if im wrong) When this works: use multiple brains (i think its best to have at least 3) and train them all at once (against the simple ai) but dont train to long to prevent overfitting.
Then you switch your game to have a setup where the ml-agents fight against each other. example: 2 times a vs b, 2 times a vs c and 2 times b vs c
Thank you for your suggestions. I will try implementing a heuristic brain that I can use to provide my learning agent with some initial challenge. However, considering that my setup is similar to that of the Soccer example for ML-Agents, I think that the agent can still learn by playing against itself. The Soccer example is not a zero-sum game, which makes it possible to get at least some information out of the cumulative reward plot. I'm just wondering if there is a quantitative way of evaluating the performance on a zero-sum game, as opposed to implementing a heuristic brain and comparing the win/loss rate.
Thanks for your input @Fallscout - closing out this issue, but please create a new one if you run into additional problems.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.