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

Weigh team chosen for team game towards those with fewer points. #120

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

swfarnsworth
Copy link
Member

@hedyhli thought people would stay engaged if the game makes it easier for teams to catch up, so this PR introduces inverse weighting for which team has the opportunity to score points, based on the current scoreboard.

This log output indicates that the algorithm is correct:

 scores = {'list': 0, 'dict': 0, 'tuple': 5}, weights = [0.1923076923076923, 0.1923076923076923, 0.0384615384615
38464]

That is, list and dict are both weighted as more likely to be selected, since they have fewer points than tuple.

Copy link

@thurisatic thurisatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the many original idea suggested for this - to bias the team assignment for higher competitiveness - i am convinced cannot be done fairly. This method, however, where the reactions are biased instead, i think works just fine. It should be self-correcting regardless of join behavior, and it also helps if a significant number of one team is not present (asleep, for example)

I could make a team-patriotic change request to swap the lists to tuples, though 🤣

@thurisatic
Copy link

At roughly this time, with scores of 1700/1586/1201, it should switch probabilities to approximately 28.7%, 30.7%, and 40.6%, respectively, from equal ~33%

@swfarnsworth swfarnsworth requested a review from mbaruh April 2, 2024 02:25
Copy link
Member

@hedyhli hedyhli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for implementing this :)

:shipit:

@hedyhli hedyhli enabled auto-merge April 2, 2024 03:16
Copy link
Member

@Xithrius Xithrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust your math

@hedyhli hedyhli merged commit fb40b44 into main Apr 2, 2024
5 checks passed
@hedyhli hedyhli deleted the games/uptime_command branch April 2, 2024 03:37
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.

4 participants