-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Away Agent seems win more than Home Agent #248
Comments
This is interesting! This suggests that we have a bug in the scripted bot, in the pathfinding module, or in the game implementation. We could run similar tests with the random bot on smaller boards to see if observe the same skewed results. |
Yes I tested yesterday on smaller boards and it was ok. So it's only with the classical board. And I have same behavior with my bot (but I did less tests because it's slower and difference was less obvious), so I think problem is not in scripted bot. And problem is there even without pathfinding activated. So it looks it's in game implementation but no idea where... |
The random bots can't win on the classical board so I guess we don't know for sure?
Cool. Then it's probably not the pathfinding.
If you look at the MCTS tutorial, home wins more that away because when in doubt of which action to take, it will default to the first action in the list which will move it towards top-left, i.e. the away team's endzone, resulting in occasional touchdowns. It's thus interesting that you see the opposite pattern here where away is winning. |
Must be a very subtle thing since both sides win the game. Here are some thoughts:
def push(self, game):
for position in game.state.available_actions[0].positions:
return Action(ActionType.PUSH, position=position)
|
I have done a 500 runs with my own scripted bot (which is not using pathfinding), and I get: Another 500 runs: Difference is less obvious than 'scripted' bot but still there. |
That should then rule out the pathfinding and the scripted bot. One way to narrow the search is to do a frequency analysis of the outcomes. |
I think I may have found a little related bug in the scripted bot. In the part "9. Move towards the ball" there's two occurrences of: Shouldn't these rather be: Path finding returns the paths ordered so that paths ending most to the left are first. In the current implementation if the first path (that takes the player left) ends up at least as close to the ball than any non-risky path in the list, the first path ends up chosen, however risky it is. This will hurt the home team more, as the home team attacks from right to left, so it's more likely for it to end up making very risky dodges through the lines towards the left. Testing this fix only resulted in a minor improvement in the balance though, so there must be something further that favors the away side. I ran two tests of 500: Home team Wins: 127 Home team Wins: 141 |
Ok so I'm not the only one to reproduce the issue, that's interesting :-) |
Why 12 instead of 10? |
Because I'm stupid :-) 10 is fine! |
Tested with 'scripted' bot (but also another bot) and difference is really important for high number of games.
Seems not related to competition_mode, pathfinding or debug_mode.
For example from my tests (each line correspond to a run of 500 games):
Here is the script I have used:
The text was updated successfully, but these errors were encountered: