splewis / csgo-pug-setup

CS:GO Sourcemod plugin for setting up private pug/10man games
GNU General Public License v3.0
413 stars 90 forks source link

Wrong map voting results for the 2nd and 3rd place #276

Closed borzaka closed 5 years ago

borzaka commented 5 years ago

Expected behavior

The voting system records and displays the real voting results for the 1st, 2nd and the 3rd place.

Actual behavior

I tested the voting system alone, because some odd results came up when we played together and voted for a map to play on.

So, I hope these pictures can help to see that something is not quite right;

image

image

It was always de_train and de_overpass the 2nd and 3rd place winners in this cases, but I never picked either of them.

Steps to reproduce

  1. setup a pug with 'vote for a map' Map type
  2. start voting, and check the results

sm_pugsetup_instant_runoff_voting is 1 in the config.

splewis commented 5 years ago

This is just a consequence that the algorithm is basically rounds of 'find the least voted map'. If there's only a single voter, then 6 of the 7 maps tie for that, and get eliminated in an undefined order.

I suppose it's a bug, but in practice with 10 voters the odds of this actually changing what is printed out as 2nd and 3rd is extremely unlikely (they'd basically all have to vote in unison). For that reason I don't think this is worth fixing.

splewis commented 5 years ago

There is also debug logging (sm_pugsetup_debug) that you can output that would show the way everyone voted and what happened each round of the algorithm.

If you think there is a "real bug" and can get that info - feel free to reopen with it. Otherwise I don't think there's a problem here, I've observed the runoff voting working hundreds of times as expected.