Looking at the screen below, it’s not fancy or fabulous… Just check off the teams to assign and then click the link.

Cut me some slack, it’s a work in progress ok!?!? The behind the scenes coding is where the magic happens. I’ve coded several different methodologies of team balancing, which I just flop in the code when trying them out. I’m not sure which is the best, so if you have any opinions, fill me in!
The first method I put together was the typical snake like assignment you see in fantasy football, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, and 1. I first do the returning players, and then the new players. Players were ordered by the highest average ranks first, and the tie-breaker was the highest last season rank. After assigning the returning players, I started the new players as 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, and 6. This way the “top” player in the new/returning pool doesn’t get assigned to team #1 both times.
Another method, as an extension of the first, was to track the average team rank to provide the order of the draft. So initially, 1, 2, 3, 4, 5, and 6 would be choosen. Then an average was calculated, and the selection would begin with the lowest team averages first. The system would perform just like the other, drafting returns first then new players.
One additional selection method I did was to pre-assign some players to the teams, like keeping returning players together. The system would then attempt to balance from there, selecting players from teams who had the fewest players compared to players from teams that had the most.
I’ve done many other gyrations of the algorithms, such as balancing out coaches or travel players first. However, as you’ll see later, I put together a “Team Player Exchanger” that eliminates the need. The really cool thing is by using the Auto Team Assignment and Team Player Exchanger, it’s REALLY FAST! While developing and testing this software, I put together a division of 168 players of 14 teams with 12 players each (balanced by the numbers) in a half hour! I might be able to do it in the same amount of time manually, but I wouldn’t be attempting to actively balance the teams. It would be a “slap the old teams together” and fill in the remaining players…
Comments
Leave a comment Trackback