What algorithm does the game use for points in GP?
Posted:
20 Oct 2020, 11:20
by anonymous7002
In the source code of game, you can find a mapped vector that creates the distribution of points in GPs.
For 20 players, that's 50, 43, 37, 32, 28...
I'm not good at C++, so please explain the algorithm so I can code a generator based on that in Python.
Re: What algorithm does the game use for points in GP?
Posted:
20 Oct 2020, 16:32
by anonymous7002
But how were those scores decided?
Re: What algorithm does the game use for points in GP?
Posted:
20 Oct 2020, 18:14
by Alayan
No formula was used, values were hand-tuned to fit a few constraints (last-1 gets 1 point, minimize the points given to the first, smooth (rank N points / rank N+1 points) ratio, very slowly increasing this ratio as the number of kart goes up). Having 50 points for 1st at 20 karts and 100 points at 30 karts was a nice touch but I didn't sacrifice smoothness for it.
I think the result is very good, but I'm not sure what you would want to use your python generator for. What's the use case, when would you want to use something similar to my GP points system to rank 50 or 100 competitors ?
Re: What algorithm does the game use for points in GP?
Posted:
20 Oct 2020, 18:32
by anonymous7002
I have found log(n/x)*k, where n is the number of players, x is the placement, and k is the constant, which can be a static or a dynamic value. Would that work out?
For 20 players, an example would be: 50, 39, 32, 27, 23, 20, 18, 16, 14, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0
I had to hand-tune it, so the gap between points doesn't increase as moving down.
The logarithm base can be changed subject to number of players.