ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
673 stars 204 forks source link

Check playerlist team numbers against infra gamestart win% message #4859

Open sprunk opened 1 year ago

sprunk commented 1 year ago

Apparently "team 1" and "team 2" refer the other way around in !predict gamestart message vs the playerlist. Ask dunno#1049 on discord for more

EDIT: it seems to only be the game start message, predict uses different code.

jklw commented 1 year ago

Battle: https://zero-k.info/Battles/Detail/1597034

Nightwatch message: [02:10] Nightwatch 10 players balanced Normal to 2 teams ( 1=29%) : 2=71%)). 252 combinations checked, spent 0ms of CPU time

The average current rating of the players was a := (2902+1507+1504+1474+1258)/5 = 1729 for team 1 (1 according to playerlist) (the one with MSPR), and b := (1776+1688+1579+1576+1248)/5 = 1573.4 for team 2. With d := 10^((a-b)/400), the chance to win for team 1 is d/(1+d) = 71% if I'm not mistaken.

sprunk commented 1 year ago

https://github.com/ZeroK-RTS/Zero-K-Infrastructure/blob/master/ZkLobbyServer/SpringieInterface/Balancer.cs#L234

^ looks like this line is incorrect and calculates the loss chance instead? There's also some weird 2 / #teams factor involved. Perhaps check what happens in FFA since it's likely to be incorrect in a more obvious way there.