Skip to content
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

Add captain diff penalty to respect avoids #509

Merged

Conversation

jauggy
Copy link
Member

@jauggy jauggy commented Oct 18, 2024

In the image below the two best players DmE and Jeff are on the same team. If we add a captain rating diff penalty then they will be split
image

Here is the new result:

               "Team 1: Gmans, AbyssWatcher, AcowAdonis, Jarial, [DmE], Spaceh, fraqzilla, Pantsu_Ripper",
               "Team 2: Faeton, Kaa, Zippo9, Threekey, mighty, MeowCat, Jeff, Saffir"

Note that this is the exact same result if we use a stdev penalty with importance of 2:

     "Team 1: Gmans, AbyssWatcher, AcowAdonis, Jarial, [DmE], Spaceh, fraqzilla, Pantsu_Ripper",
     "Team 2: Faeton, Kaa, Zippo9, Threekey, mighty, MeowCat, Jeff, Saffir"

See this PR for using stdev diff penalty instead:
#508

We can still use stdev penalty in brute_force.ex (called by split_noobs) if we want.

More details

The score will have a new component captain diff penalty which is simply the rating difference between both teams' captains. If both captains have similar rating, this score will be lower which is preferred.

Fix for new players in parties

In addition, while doing this PR I noticed a bug in respect_avoids
Normally newish players are not part of the brute force since we want to draft and spread them evenly across teams after the brute force. However, if a newish player is in a party, we do want them to be part of the brute force calculation to try and get them together with their party.

@jauggy jauggy force-pushed the jauggy/respect-avoids-improvements branch 3 times, most recently from fa107a6 to b38382a Compare October 19, 2024 03:42
@jauggy jauggy marked this pull request as ready for review October 19, 2024 03:46
@L-e-x-o-n
Copy link
Collaborator

L-e-x-o-n commented Oct 20, 2024

Seeing that the result is the same, what is the reason for using captain penalty over st. dev. penalty?

I think st. dev. penalty should have the added benefit of reducing the difference in ratings between players in the same team. This approach would lead to better quality team games.

Currently all top players on a team can stack on one side of the map resulting in the other side of the map having all the weakest players in that team.
Depending on enemy teams positioning, you can have top players fighting top players or a race which team's top players beat the weakest one faster. I think there is a lot of uncertainty involved here because you can't predict enemy start positions.
In theory if everyone in a team is closer in ratings the weak side wouldn't be as weak nor the strong side as strong... each could hold their own better against the enemy team with less chance of entire sides of map collapsing. I think this would lead to more enjoyable games for everyone involved.

@jauggy
Copy link
Member Author

jauggy commented Oct 20, 2024

My main concern is that stdev can still put the top two players on the same team (as it did when using stdev importance of 1). But what if I add to this PR stdev diff for brute_force.ex ? Then we can test both at the same time and then choose which has the least complaints.

So basically we have brute_force.ex used by split_noobs using a stdev diff penalty (importance of 2).
and brute_force_avoids used by respect_avoids using a captain diff penalty.

@L-e-x-o-n
Copy link
Collaborator

L-e-x-o-n commented Oct 20, 2024

My main concern is that stdev can still put the top two players on the same team (as it did when using stdev importance of 1). But what if I add to this PR stdev diff for brute_force.ex ?

That is solved by using importance of 2 or maybe going even higher.

Then we can test both at the same time and then choose which has the least complaints.
So basically we have brute_force.ex used by split_noobs using a stdev diff penalty (importance of 2). and brute_force_avoids used by respect_avoids using a captain diff penalty.

I don't think number of complaints is a reliable metric. With auto balance being default, split_noobs will be used significantly more than respect_avoids, then there is additional logic for avoids that make it harder for players to visually determine if there are issues. With that said, I think we can try it out anyway, but the final decision should not be based on the number of complaints.

@jauggy
Copy link
Member Author

jauggy commented Oct 20, 2024

ok I agree with that. I'll add stdev diff penalty in this PR so we can check both.

@jauggy jauggy force-pushed the jauggy/respect-avoids-improvements branch 2 times, most recently from b132ef8 to f24fb5d Compare October 20, 2024 22:55
@jauggy jauggy force-pushed the jauggy/respect-avoids-improvements branch from f24fb5d to 556a76b Compare October 20, 2024 23:03
@jauggy
Copy link
Member Author

jauggy commented Oct 20, 2024

Added stdev penalty with importance of 4 to split_noobs and brute_force
With importance of 2, I still got team with best players stacked.

Also one test failing that is unrelated: Error: test/teiserver/data/battle/lobby_chat_test.exs:7

@L-e-x-o-n L-e-x-o-n merged commit 4c0f904 into beyond-all-reason:master Oct 21, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants