GreyWolfDev / Werewolf

Werewolf for Telegram
http://www.tgwerewolf.com
GNU General Public License v3.0
623 stars 384 forks source link

New Group List Pattern (/grouplist) #610

Closed Moji-Asg closed 2 years ago

Moji-Asg commented 2 years ago

When a group starts 5 player game and game takes 120 minutes, they earn more points for /grouplist... This is not true because every game with specific player counts has specific duration to get the most point!

I want to suggest a new algorithm for this and if you like that you can use it...

First look at this graph ( Average Duration Graph )

desmos-graph

Click on image for better view

This graph shows us the average duration for each game

Then look at this graph too ( Radius Graph )

desmos-graph (1)

Click on image for better view

This graph shows the radius for each game with different players.

What are these?

For example we have a game with 20 players... Average duration for 20 players is about 26min Radius is about 7 min for this game The best duration for this game is from 19min ( 26 - 7 ) to 33min ( 26 + 7 ). If game ends sooner or later, for each minutes in distance from radius, we decrease earned point. This is how my algorithm works. It can get enhanced and if the main idea was good I enjoy enhance it for better results or even I can help to code it.

Chart

Player Count Average Duration Radius Best Durations
5 Players 10 Minutes 3 Minutes 7-13 Minutes
10 Players 15 Minutes 5 Minutes 10-20 Minutes
15 Players 20 Minutes 6 Minutes 14-26 Minutes
20 Players 26 Minutes 7 Minutes 19-33 Minutes
25 Players 34 Minutes 9 Minutes 25-43 Minutes
30 Players 44 Minutes 10 Minutes 34-54 Minutes
35 Players 58 Minutes 11 Minutes 47-69 Minutes

Completion

Maybe you think for example 26min 20 players game will be better than 40min 35 players game. But No!!! I suggest use player counts as a multiplier. What I mean? Let me explain For example multiplier can be calculated by dividing players count by 5 and for 35 players game multiplier is 7. Then final point is multiplier * point from duration and for example for 44min 35 players game final point should be 10 * 7 = 70 (For example maximum point is 10).

OlgabrezelPrivate commented 2 years ago

I haven't looked at your new formula yet, so I'm not gonna comment it.

But I wanna note 2 things:

Firstly, whatever the formula does should NOT rank groups with 35 player games all day the highest. The grouplist is supposed to be a place for potentially new players to find groups to start playing the game in, and groups that only play 35p games that tend to go up to an hour are really not the best place to start playing werewolf.

Secondly, your initial claim is wrong. You say that groups can currently get ranked high by playing games of 5 players that take 120 minutes. Let's calculate this example with the current formula. Assume, they create such an 120-minutes-game five times a day, okay? Then we got:

avgPlayersPerGame = 5
avgGameLength = 120
avgMinutesPerDay = 5 * 120 = 600

PPGFactor = -2/45 * 5^2 + 16/9 * 5 - 70/9 = 0
GLFactor = -1/90 * 120^2 + 2/3 * 120 = -80
PlayerFactor = 0 + (-80) = -80

// note that everything so far is independent from the number of times they play such games per day.

TimeFactor = 600/54 = 11.11 // this is between 0 and 26.66

malus = (-80 - 11.11)^2 / 20 = 415.06

ranking = -80 + 11.11 - 415.06 = -483.95

This is an insanely low negative ranking and will not bring you anywhere on grouplist, even compared to a group that only plays one normal 5-player game per day. Also note how the ranking actually gets lower, the more often such 120minute-5player-games are played per day. So maybe you should reevaluate the need for a new formula at all.

OlgabrezelPrivate commented 2 years ago

I'm closing this since you haven't replied anymore. If you have any more arguments on this, feel free to comment them below, then we can reopen the issue.