Closed jauggy closed 2 months ago
Have updated and now you can see dropdown to change the balancer. Also removed the admin pages (now redirects) to be consistent with the previous PR made by Perfi to remove them.
Sample video of testing balancer tab in Integration server: https://www.youtube.com/watch?v=KUqzvU6GBug
Note that the balancer tab only appears for rated games. Also the chevron level of players is based on current data always (since we don't store history of this).
You must rerun the fake data task. This is because if you ran it previously, the fake users will have too high permissions. I modified the fakedata task so fake users will have normal permissions. Also the task will now also add fake playtime data.
mix teiserver.fakedata
Launch the website
mix phx.server
Login to the website using root@localhost
Now go to Admin > Matches > Select a Match > Balance Tab.
You will see the logs for the loser_picks
algo.
There is a dropdown with the label "Balance Algorithm" near the top. Change this to split_one_chevs
You will now see the logs for split_one_chevs
.
password
. Check that they cannot see the balance tab.Teiserver doesn't know the rank shown to the user in Chobby. Chobby gets the rank on login and then never updates. Teiserver, therefore, may classify a user as 2Chev but they might be shown as 1Chev in Chobby.
I thought rank was only calculated on login, when/where else does Teiserver calculate rank?
To be honest this bug really baffled me. I still have no idea why they are out of sync. From my searching it only gets calculated on login.
Teiserver doesn't know the rank shown to the user in Chobby. Chobby gets the rank on login and then never updates. Teiserver, therefore, may classify a user as 2Chev but they might be shown as 1Chev in Chobby.
I thought rank was only calculated on login, when/where else does Teiserver calculate rank?
To be honest this bug really baffled me. I still have no idea why they are out of sync. From my searching it only gets calculated on login.
That was my understanding as well. I checked again, not sure what we are missing...
Currently at least there is an issue for it: https://github.com/beyond-all-reason/teiserver/issues/332 So that the bug is at least recorded.
@L-e-x-o-n I have updated the PR now with the following changes:
Context
I played a game with split_one_chevs on and noticed a few issues. The 1Chevs were not split. This was because Macwhite was recognised by Teiserver as a 2Chev whereas Chobby showed them as a 1Chev. This is likely because Chobby gets a player's rank on login and then never updates it so they get out of sync with TeiServer.
How to resolve?
To resolve this my algorithm will now group both 1 and 2Chevs into the "Noob" bucket. There's also going to be slight change on how we draft players who are in the "Noob" bucket detailed below.
Other Findings
When putting the replay
into https://openskill-test.web.app/ I noticed that the library expects Team 1 to win, despite that most humans would bet on Team 2.
Since the library expects Team 1 to win, if my team were to win I would gain a lot of OS i.e. +1. If my team were to lose, I only lose -0.37.
From this we can conclude that if you were to choose from the three "Noobs": _CindersFire, Macwhite, VictoriousDead you probably want to avoid the overrated players, which are likely the ones with highest uncertainty. If an overrated player is on the other team, you stand to win more and lose less, and since they're overrated, you're also more likely to win. Therefore, for those in the "Noobs" category, we probably want to pick those with low uncertainty as they are less likely to be overrated.
split_one_chevs Algorithm v2
Based on these findings, the algorithm will now draft players based on these criteria:
This draft mimics how a human might draft players with the given visible information in a lobby. It's not super mathematical. Players generally look at chevron level to determine how overrated someone might be. Someone did complain in chat about the lobby balance in the game I played mentioned above. They were obviously eyeballing the chevron levels and assuming those two players were overrated.
Further enchancements
has_parties?
. If this is false we do not need to rerun the balancer again.loser_picks
) will be called. This is the default algo and it supports parties.Known Bugs
Teiserver doesn't know the rank shown to the user in Chobby. Chobby gets the rank on login and then never updates. Teiserver, therefore, may classify a user as 2Chev but they might be shown as 1Chev in Chobby.
Unit Tests
Run this to run multiple unit tests that relate to balance
Local Dev Tests
See comment here for test steps.
Theoretical Testing on past replays
Go here: https://balance-algo-web.web.app/ And enter a past replay. Change algorithm to Split One Chevs v2