Use position as a criteria?
Closed this issue · 10 comments
Hi,
Martin from Ah Ouh PUC (France) here. Thanks for this awesome project!
We plan to use this code to generate awesome teams for a summer league starting soon. We're used to take into account the preferred position (handler/middle) so that the games are more fair.
Do you think it could be a possible evolution of the generating algorithm?
Hello Martin,
I can already do that in the current version with a small trick.
In the Level column you simply assign a very high number for handlers, lets say +1000. this way when the algorithm runs it will equal them too in each team simply because it tries to have similar levels per team. (it has to be high to not interfere with the actual levels of non handlers, and you can still have different levels of handlers by adding the actual level so that if you have 2 handlers 1001 and 1003 it's the same as 2 handlers of level 1002)
You can use this trick to split 2 tall players too ;
or even to have 2 players together: give one +100 and the other -100
(use different orders of magnitude for different things: 100 1000 10000 100000 etc).
Let me know if it works.
Best,
-Mathias
Awesome, we'll try that next week
Thank!
Actually I think it's easier and better to use the attendance columns to achieve that.
Create a fake attendance column a put 1 to handlers, 0 to others.
For a hat tournament you could also create 1 column per team (1/0) to split players that already play together usually. (having lots of attendance columns slows down the program a lot though)
Thanks for your suggestions.
And how would you handle people who don't mind being handler or middle? (the "Whatevers")
0 for middles, 1 for whatevers and 2 for handlers?
It has the inconvenience to act as the whatevers are a category on their own, that needs to be equally dispatched too.
you have to make 2 columns,
1st is to split handlers: 1 for handlers, 0 for the rest
2nd is to split middles: 1 for middlers, 0 for the rest
the whatevers will be automatically distributed because the gaps will be even
Well I tried with 0/1/2, and it seems to work well enough!
Rookie | 1-2 years | 3-4 years | 4+ years | International/Star |
---|---|---|---|---|
2 | 4 | 6 | 3 | 1 |
1 | 6 | 6 | 4 | 0 |
1 | 6 | 4 | 5 | 0 |
4 | 3 | 4 | 4 | 2 |
3 | 4 | 5 | 3 | 2 |
1 | 5 | 6 | 1 | 2 |
1 | 5 | 8 | 2 | 1 |
2 | 4 | 7 | 4 | 0 |
Middle | Whatever | Handler |
---|---|---|
6 | 8 | 2 |
6 | 9 | 2 |
7 | 4 | 5 |
7 | 8 | 2 |
7 | 7 | 3 |
4 | 8 | 3 |
7 | 7 | 3 |
7 | 7 | 3 |
Thanks you for your help ;)
Good then :)
the problem with that is that a team with with 0-0-3 (2 whatever and 1 handler) will be equal to a team of 1-1-1 (3 middlers)
but on average it just falls good
Oh, that's right
I relaunched with your last suggestion.
Results seems to be more or less the same, but I suppose it might be better in term of day by day presence of each role?
Rookies | 1-2 years | 3-4 years | 4+ years | International/Star |
---|---|---|---|---|
3 | 3 | 6 | 2 | 2 |
2 | 5 | 5 | 4 | 1 |
2 | 3 | 8 | 2 | 1 |
2 | 5 | 3 | 6 | 0 |
3 | 3 | 6 | 5 | 0 |
1 | 8 | 2 | 3 | 2 |
1 | 6 | 7 | 0 | 2 |
1 | 4 | 9 | 3 | 0 |
Middle | Whatever | Handler |
---|---|---|
7 | 8 | 1 |
7 | 8 | 2 |
6 | 7 | 3 |
6 | 6 | 4 |
7 | 6 | 4 |
6 | 6 | 4 |
6 | 8 | 2 |
6 | 8 | 3 |
Hey,
Thanks again for the script, it lead to a nice tournament this summer
Maybe we could close the issue if there is no need to update the code for this feature request? Or maybe add the information to the How It Works?
Great 👍
Will close this issue
and update "how it works" section in next update