|
How about; Generate 5 teams based on (maximum number of points in W1) or (Maksimum expected points through out W1-4) iirc KT made it easy this time around, being the most profitable team every W (I might be wrong here?) = KT selected as team.
Method for calculating optimal team:
Firstly; calculate expected point gain for every player, for every week
Eksample: W1 = total number of points earned R1 W2 = (W1 Value) - (points earned W1) W3 = W2 - (points earned W2)
Then for each week, starting with W2 (trade between W1 and W2):
Run For each player check if: 1. Is another player with higher expected points? (Factoring in the trade penalty) 2. Is it possible to trade for him? (Test of Trade values) 3. Does trade go against law of Races? 4. Make trade
Repeat
**Pros and Cons** Pros: Only have to run each weeks results through 6 times (1 for each player) No need to even remove bad players from the tables Cons: Doesn't solve the problem of finding the optimal starting team...
|
Does anyone have a google-docs or simular document with the starting costs , and so on, for round 2?
I need some test numbers, costs, points, and trade values to test my program so far. Will probably have to wait till the end of 2. round before i have all the data needed to run a full scale test.
|
On January 04 2013 05:16 Spazer wrote:Show nested quote +On January 04 2013 04:57 Proseat wrote: Couldn't R1CH pull the actual trade value formulas from the FPL code? Understanding how the trade values increase and decrease and being able to recreate it is key to any intended program to solve the presented problem. Otherwise you will not be able to decide who you could eligibly trade for each week.
That's what we're waiting on at the moment. But that doesn't mean we can't try to figure it out ourselves in the meantime.
Well going from round 1 to round 2 and looking at their point values? Yeah, I have a really hard time deciphering it. There are some good values in there and some total ripoffs that are outside the numbers like certain players not even being available to play certain weeks.
|
Almost finished writing thingie to brute force it.
I had trade value and how much it changed from round1 week3->week4, so I had to quess trade values for week 2 for everyone and for week3 for teams. + Show Spoiler + CJ Entus 4 6 3.80 10 3.60 12 3.81 12 EG.TL 6 -2 3.00 7 3.70 10 3.94 17 KT Rolster 3 8 4.00 12 4.30 20 5.30 32 Samsung Khan 4 1 2.00 0 0.90 -1 0.92 -1 SK Telecom T1 5 2 4.20 11 4.40 17 5.21 18 STX Soul 3 1 2.50 4 2.20 7 2.41 5 Team 8 1 2 1.20 -1 0.40 2 0.73 7 Woongjin Stars 3 -1 2.80 9 3.40 12 3.52 26
Acacia Z 1 1 1.00 2 1.01 4 1.17 6 Action Z 3 4 3.40 8 4.45 14 3.97 23 Alone Z 1 1 1.00 1 0.79 2 0.73 6 Baby T 7 6 6.80 6 5.33 18 6.00 22 BarrackS T 1 1 1.00 2 1.01 4 1.17 7 Bbyong T 4 4 4.00 9 4.29 12 3.81 12 Bear Z 1 0 0.80 1 0.79 2 0.73 2 Best P 6 4 5.60 8 5.21 10 3.94 11 BisAnG P 1 0 0.80 2 1.01 3 0.95 5 Bisu P 4 1 3.60 2 2.73 7 2.70 8
Bogus T 9 3 8.10 11 7.58 15 5.90 18 Bong[S.G] P 2 1 1.80 6 2.47 6 1.90 6 Calm Z 3 0 2.40 1 1.93 2 1.30 2 Classic T 3 0 2.40 4 2.60 5 1.97 5 Comet P 1 0 0.80 1 0.79 2 0.73 2 Crazy-Hydra Z 3 2 2.80 4 2.61 9 2.86 17 Dear P 3 3 3.10 7 4.67 14 3.97 18 Dream.t)check Z 2 1 1.80 1 1.37 2 1.02 3 Effort Z 9 1 7.70 8 6.92 15 5.90 21 Fantasy T 6 4 5.60 8 5.21 19 5.94 27
Flash T 10 4 8.90 6 7.50 22 7.75 24 Flying P 6 0 5.00 3 4.09 4 2.60 6 fOKINS Z 2 0 1.60 2 1.59 3 1.24 5 free P 3 0 2.40 3 2.37 7 2.41 12 Hanbin T 1 0 0.80 2 1.01 3 0.95 5 Haruhi P 1 1 1.00 1 0.79 2 0.73 3 HerO P x 0 5.10 4 4.89 12 4.67 13 herO[jOin] P 7 4 6.40 18 8.00 20 6.44 22 Hitman Z 1 1 1.10 5 1.68 7 1.84 9 HoeJJa Z 2 1 1.80 2 1.33 4 1.46 6
hOn_sin T 3 0 2.40 9 3.71 10 3.08 18 hOpe Z 2 0 1.60 3 1.81 3 1.24 5 Horang2 P 2 1 1.80 3 1.81 3 1.24 3 Huk P 3 1 2.60 2 2.15 3 1.52 4 Hydra Z 3 4 3.20 9 3.71 8 2.63 11 Hyuk Z 1 1 1.00 2 1.01 4 1.17 5 hyvaa Z 6 0 4.70 4 4.32 8 3.49 8 IdrA Z 2 0 1.60 1 1.37 2 1.02 3 Jaedong Z 8 0 7.00 7 6.12 12 4.95 16 Jaehoon P 5 4 4.80 8 4.64 13 4.32 14
JangBi P 5 0 4.20 1 3.08 5 2.54 15 JuNi Z 1 0 0.80 0 0.58 0 0.29 1 JYP P 4 0 3.40 7 3.85 10 3.37 18 Kop T 2 0 1.60 0 1.14 0 0.57 1 Last T 5 3 4.60 7 4.41 11 3.87 12 Leta P 3 1 2.60 3 2.38 3 1.52 3 Light T 4 0 3.20 2 2.73 6 2.48 12 Mind T 2 2 1.90 3 1.81 5 1.68 7 Mini P 4 0 3.40 1 2.50 5 2.25 5 miso T 1 1 1.00 2 1.01 4 1.17 6
Motive P 3 1 2.60 2 2.16 4 1.75 9 MyuNgSiK P 1 1 1.00 2 1.01 4 1.17 6 NaGi P 2 0 1.60 2 1.59 3 1.24 6 oDin Z 1 0 0.80 0 0.58 0 0.29 1 ParalyzE P 2 1 1.80 5 2.26 7 2.13 8 PenguiN Z 1 1 1.00 2 1.01 4 1.17 6 Puma T 3 1 2.60 3 2.38 4 1.75 6 Rain P 12 6 10.50 11 8.30 20 7.87 33 rare Z 1 1 1.00 3 1.24 3 0.95 3 Reality T 5 3 4.60 6 4.20 6 2.76 7
RorO Z 8 3 6.80 5 5.68 8 4.06 12 Rudy T 1 0 0.80 2 1.01 3 0.95 5 Ryul2 Z 2 4 2.40 4 2.03 8 2.35 12 s2 Z 1 1 1.00 5 1.68 7 1.84 11 Sacsri Z 3 1 2.60 2 2.16 7 2.41 8 Sea T 2 0 1.60 1 1.37 2 1.02 3 Sherry P 1 1 1.00 1 0.79 2 0.73 3 Shine Z 4 -1 3.00 -1 2.06 -1 0.92 1 Shy P 7 0 5.10 8 5.78 18 6.00 27 Size Z 1 0 0.80 1 0.79 2 0.73 2
sKyHigh T 4 4 4.00 6 3.62 10 3.37 10 Snow T 2 1 1.80 3 1.81 3 1.24 3 SonGDuri Z 2 1 1.80 7 2.69 10 2.79 11 soO Z 6 4 5.60 8 5.21 16 5.27 17 Soulkey Z 8 0 6.30 14 7.68 20 6.73 26 Speed T 2 4 2.40 5 2.25 10 2.79 18 Stats P 5 4 4.80 6 4.19 16 4.98 24 Stephano Z x 0 5.10 1 4.22 2 2.44 3 Stork P 6 3 5.40 3 4.10 7 3.27 11 Swift T 1 0 0.80 2 1.01 3 0.95 5
TaeJa T x 0 5.10 4 4.89 19 6.22 25 Terminator P 3 1 2.60 2 2.16 6 2.19 9 ThorZain T 3 0 2.40 1 1.93 2 1.30 6 Trap P 7 -1 5.00 3 4.66 10 4.22 11 Turn T 3 0 2.40 1 1.94 1 1.08 2 Wooki P 3 4 3.40 11 4.67 15 4.19 21 yeOngJae T 1 1 1.00 5 1.68 7 1.84 8 Zenio Z 3 0 2.40 4 2.60 5 1.97 9 ZerO Z 4 0 3.20 8 4.06 12 3.81 17
With these values best anti team I get gives -3 points. + Show Spoiler + Week 1 Kop ±0 Shine +1 Trap +1 ----------------- weekly +2 total +2
Week 2 trade:Trap->Stork
Kop ±0 Shine ±0 Stork ±0 TradeTax -1 ----------------- weekly -1 total +1
Week 3 trade:Stork->Reality
Kop ±0 Shine ±0 Reality ±0 TradeTax -1 ----------------- weekly -1 total ±0
Week 4 trade:Shine->hyvaa
Kop -1 hyvaa ±0 Reality -1 TradeTax -1 ----------------- weekly -3 total -3
May not be the only way to get -3, but better score should not be possible.
It took some 75 minutes to get anti team, not gonna search main until I make some adjustments to algorithm, maybe even rewrite it form scratch.
|
On January 07 2013 20:24 cjin wrote:Almost finished writing thingie to brute force it. I had trade value and how much it changed from round1 week3->week4, so I had to quess trade values for week 2 for everyone and for week3 for teams. + Show Spoiler + CJ Entus 4 6 3.80 10 3.60 12 3.81 12 EG.TL 6 -2 3.00 7 3.70 10 3.94 17 KT Rolster 3 8 4.00 12 4.30 20 5.30 32 Samsung Khan 4 1 2.00 0 0.90 -1 0.92 -1 SK Telecom T1 5 2 4.20 11 4.40 17 5.21 18 STX Soul 3 1 2.50 4 2.20 7 2.41 5 Team 8 1 2 1.20 -1 0.40 2 0.73 7 Woongjin Stars 3 -1 2.80 9 3.40 12 3.52 26
Acacia Z 1 1 1.00 2 1.01 4 1.17 6 Action Z 3 4 3.40 8 4.45 14 3.97 23 Alone Z 1 1 1.00 1 0.79 2 0.73 6 Baby T 7 6 6.80 6 5.33 18 6.00 22 BarrackS T 1 1 1.00 2 1.01 4 1.17 7 Bbyong T 4 4 4.00 9 4.29 12 3.81 12 Bear Z 1 0 0.80 1 0.79 2 0.73 2 Best P 6 4 5.60 8 5.21 10 3.94 11 BisAnG P 1 0 0.80 2 1.01 3 0.95 5 Bisu P 4 1 3.60 2 2.73 7 2.70 8
Bogus T 9 3 8.10 11 7.58 15 5.90 18 Bong[S.G] P 2 1 1.80 6 2.47 6 1.90 6 Calm Z 3 0 2.40 1 1.93 2 1.30 2 Classic T 3 0 2.40 4 2.60 5 1.97 5 Comet P 1 0 0.80 1 0.79 2 0.73 2 Crazy-Hydra Z 3 2 2.80 4 2.61 9 2.86 17 Dear P 3 3 3.10 7 4.67 14 3.97 18 Dream.t)check Z 2 1 1.80 1 1.37 2 1.02 3 Effort Z 9 1 7.70 8 6.92 15 5.90 21 Fantasy T 6 4 5.60 8 5.21 19 5.94 27
Flash T 10 4 8.90 6 7.50 22 7.75 24 Flying P 6 0 5.00 3 4.09 4 2.60 6 fOKINS Z 2 0 1.60 2 1.59 3 1.24 5 free P 3 0 2.40 3 2.37 7 2.41 12 Hanbin T 1 0 0.80 2 1.01 3 0.95 5 Haruhi P 1 1 1.00 1 0.79 2 0.73 3 HerO P x 0 5.10 4 4.89 12 4.67 13 herO[jOin] P 7 4 6.40 18 8.00 20 6.44 22 Hitman Z 1 1 1.10 5 1.68 7 1.84 9 HoeJJa Z 2 1 1.80 2 1.33 4 1.46 6
hOn_sin T 3 0 2.40 9 3.71 10 3.08 18 hOpe Z 2 0 1.60 3 1.81 3 1.24 5 Horang2 P 2 1 1.80 3 1.81 3 1.24 3 Huk P 3 1 2.60 2 2.15 3 1.52 4 Hydra Z 3 4 3.20 9 3.71 8 2.63 11 Hyuk Z 1 1 1.00 2 1.01 4 1.17 5 hyvaa Z 6 0 4.70 4 4.32 8 3.49 8 IdrA Z 2 0 1.60 1 1.37 2 1.02 3 Jaedong Z 8 0 7.00 7 6.12 12 4.95 16 Jaehoon P 5 4 4.80 8 4.64 13 4.32 14
JangBi P 5 0 4.20 1 3.08 5 2.54 15 JuNi Z 1 0 0.80 0 0.58 0 0.29 1 JYP P 4 0 3.40 7 3.85 10 3.37 18 Kop T 2 0 1.60 0 1.14 0 0.57 1 Last T 5 3 4.60 7 4.41 11 3.87 12 Leta P 3 1 2.60 3 2.38 3 1.52 3 Light T 4 0 3.20 2 2.73 6 2.48 12 Mind T 2 2 1.90 3 1.81 5 1.68 7 Mini P 4 0 3.40 1 2.50 5 2.25 5 miso T 1 1 1.00 2 1.01 4 1.17 6
Motive P 3 1 2.60 2 2.16 4 1.75 9 MyuNgSiK P 1 1 1.00 2 1.01 4 1.17 6 NaGi P 2 0 1.60 2 1.59 3 1.24 6 oDin Z 1 0 0.80 0 0.58 0 0.29 1 ParalyzE P 2 1 1.80 5 2.26 7 2.13 8 PenguiN Z 1 1 1.00 2 1.01 4 1.17 6 Puma T 3 1 2.60 3 2.38 4 1.75 6 Rain P 12 6 10.50 11 8.30 20 7.87 33 rare Z 1 1 1.00 3 1.24 3 0.95 3 Reality T 5 3 4.60 6 4.20 6 2.76 7
RorO Z 8 3 6.80 5 5.68 8 4.06 12 Rudy T 1 0 0.80 2 1.01 3 0.95 5 Ryul2 Z 2 4 2.40 4 2.03 8 2.35 12 s2 Z 1 1 1.00 5 1.68 7 1.84 11 Sacsri Z 3 1 2.60 2 2.16 7 2.41 8 Sea T 2 0 1.60 1 1.37 2 1.02 3 Sherry P 1 1 1.00 1 0.79 2 0.73 3 Shine Z 4 -1 3.00 -1 2.06 -1 0.92 1 Shy P 7 0 5.10 8 5.78 18 6.00 27 Size Z 1 0 0.80 1 0.79 2 0.73 2
sKyHigh T 4 4 4.00 6 3.62 10 3.37 10 Snow T 2 1 1.80 3 1.81 3 1.24 3 SonGDuri Z 2 1 1.80 7 2.69 10 2.79 11 soO Z 6 4 5.60 8 5.21 16 5.27 17 Soulkey Z 8 0 6.30 14 7.68 20 6.73 26 Speed T 2 4 2.40 5 2.25 10 2.79 18 Stats P 5 4 4.80 6 4.19 16 4.98 24 Stephano Z x 0 5.10 1 4.22 2 2.44 3 Stork P 6 3 5.40 3 4.10 7 3.27 11 Swift T 1 0 0.80 2 1.01 3 0.95 5
TaeJa T x 0 5.10 4 4.89 19 6.22 25 Terminator P 3 1 2.60 2 2.16 6 2.19 9 ThorZain T 3 0 2.40 1 1.93 2 1.30 6 Trap P 7 -1 5.00 3 4.66 10 4.22 11 Turn T 3 0 2.40 1 1.94 1 1.08 2 Wooki P 3 4 3.40 11 4.67 15 4.19 21 yeOngJae T 1 1 1.00 5 1.68 7 1.84 8 Zenio Z 3 0 2.40 4 2.60 5 1.97 9 ZerO Z 4 0 3.20 8 4.06 12 3.81 17
With these values best anti team I get gives -3 points. + Show Spoiler + Week 1 Kop ±0 Shine +1 Trap +1 ----------------- weekly +2 total +2
Week 2 trade:Trap->Stork
Kop ±0 Shine ±0 Stork ±0 TradeTax -1 ----------------- weekly -1 total +1
Week 3 trade:Stork->Reality
Kop ±0 Shine ±0 Reality ±0 TradeTax -1 ----------------- weekly -1 total ±0
Week 4 trade:Shine->hyvaa
Kop -1 hyvaa ±0 Reality -1 TradeTax -1 ----------------- weekly -3 total -3
May not be the only way to get -3, but better score should not be possible. It took some 75 minutes to get anti team, not gonna search main until I make some adjustments to algorithm, maybe even rewrite it form scratch.
Nice it seems like we have been going very simular ways with our approach. I have tried to calculate the optimal main team given random points and tradevalues myself. This was also done with a significant smaller player pool. I plan on running it full scale once the first week of the pl.round is over.
does your implementation take into account that suboptimal trades one week, might end up leading to a higher result further along the way?. Mine doesnt, it tries to max out all of the possible teams values each week.
If thats the case i would like if you could put your code up on pastebin or gist.github
|
On January 07 2013 23:31 Chr15t wrote:does your implementation take into account that suboptimal trades one week, might end up leading to a higher result further along the way?. Mine doesnt, it tries to max out all of the possible teams values each week. If thats the case i would like if you could put your code up on pastebin or gist.github
As long as the lineup is on top 100000 score of the possible lineups of that week. Well, not all possible, just the ones you can get from the top 100000 of previous week.
Probably best way to fasten search (or at least easiest way) would be to reduce that to 10000. I was thinking about to not allow trades where you trade to a player that is going to score 1 or less on next round. Or just less than the player you are trading out.
|
On January 08 2013 01:21 cjin wrote:Show nested quote +On January 07 2013 23:31 Chr15t wrote:does your implementation take into account that suboptimal trades one week, might end up leading to a higher result further along the way?. Mine doesnt, it tries to max out all of the possible teams values each week. If thats the case i would like if you could put your code up on pastebin or gist.github As long as the lineup is on top 100000 score of the possible lineups of that week. Well, not all possible, just the ones you can get from the top 100000 of previous week. Probably best way to fasten search (or at least easiest way) would be to reduce that to 10000. I was thinking about to not allow trades where you trade to a player that is going to score 1 or less on next round. Or just less than the player you are trading out.
In my program i test for if its viable to trade players based on the following week, so i dont end up having too, too many team combinations ;D
|
On January 08 2013 02:05 Chr15t wrote:Show nested quote +On January 08 2013 01:21 cjin wrote:On January 07 2013 23:31 Chr15t wrote:does your implementation take into account that suboptimal trades one week, might end up leading to a higher result further along the way?. Mine doesnt, it tries to max out all of the possible teams values each week. If thats the case i would like if you could put your code up on pastebin or gist.github As long as the lineup is on top 100000 score of the possible lineups of that week. Well, not all possible, just the ones you can get from the top 100000 of previous week. Probably best way to fasten search (or at least easiest way) would be to reduce that to 10000. I was thinking about to not allow trades where you trade to a player that is going to score 1 or less on next round. Or just less than the player you are trading out. In my program i test for if its viable to trade players based on the following week, so i dont end up having too, too many team combinations ;D
I was going to cut out low end scoring teams, like 25+ points behind leading team at the end of each week or something like that, just haven't done it yet
|
this is impossible to know because you can't know which players will win until they do...
User was warned for this post
|
Canada8028 Posts
I tried brute forcing the main using the 30 highest scoring players per week (works out to 53 players total). It tested 583 teams over the course of 2.5 hours before I shut it down since it was obviously never going to finish in a reasonable amount of time. In comparison, with the 20 highest scoring players per week (pool of 41), I did 279 teams over 40 minutes. With the 10 highest scoring players per week (pool of 27), I did 285 in 35 minutes.
In short, brute forcing main teams is a pipe dream for large pools of players until we do some optimization.
Low trade value players can be evaluated almost instantly, but high ones take forever. For instance, testing trades with an initial team of KT Rolster, s2, hitman, barracks, alone, jangbi, and bogus took 1 minute 18 seconds by itself. I need a better way of discarding initial teams.
With anti-teams, discarding initial teams is really easy. If an initial team scores more points than your current best team right off the bat, you can safely skip it. This trims off entire branches and really cuts down on the calculation time. What we need is a smart way to do this for main teams as well.
I was thinking something along the lines of this:
- Take an initial team
- Determine the two best players that are not on your team for the current week
- Switch them for the two lowest scoring players on your team REGARDLESS of trade value
- Repeat steps 2-3 for each week
- If the final score is lower than the final score of your current best team, you can safely ignore this branch
My currently implemented system like this:
- Take X top scoring players of each week to generate a pool of players.
- Make an ordered list ranking the pool of players by cost.
- Use a bunch of nested loops to iterate through the cost ordered list. This will make an initial team. The ordered list allows us to ignore all players past a certain point for a given loop once the cost exceeds 30.
- Check the race requirement for the initial team
- Test trades for the initial team. I use an ordered list of trade values here so that I can ignore players past a certain point, just like with step 3.
- Only attempt trades where the new player scores more points than the current player at some point in the future.
- Call the trade function recursively for each week
- Select the highest scoring resultant team and compare it against whatever our best solution currently is. Replace the best team if we've scored higher.
Also, the formula for trade value seems to be
Trade value = cost * (total games in round - games played)/total games in round + points * 2/7
I'm still uncertain about the 2/7 part, but it works so far for round 2 week 1. Somehow in the last round, it ends up being (points / 4.5), and I have no idea when or how.
|
On January 08 2013 10:12 xmungam wrote: this is impossible to know because you can't know which players will win until they do... But you do know which players have won, because they did!
|
On January 08 2013 14:28 Spazer wrote:I tried brute forcing the main using the 30 highest scoring players per week (works out to 53 players total). It tested 583 teams over the course of 2.5 hours before I shut it down since it was obviously never going to finish in a reasonable amount of time. In comparison, with the 20 highest scoring players per week (pool of 41), I did 279 teams over 40 minutes. With the 10 highest scoring players per week (pool of 27), I did 285 in 35 minutes. In short, brute forcing main teams is a pipe dream for large pools of players until we do some optimization. Low trade value players can be evaluated almost instantly, but high ones take forever. For instance, testing trades with an initial team of KT Rolster, s2, hitman, barracks, alone, jangbi, and bogus took 1 minute 18 seconds by itself. I need a better way of discarding initial teams. With anti-teams, discarding initial teams is really easy. If an initial team scores more points than your current best team right off the bat, you can safely skip it. This trims off entire branches and really cuts down on the calculation time. What we need is a smart way to do this for main teams as well. I was thinking something along the lines of this: - Take an initial team
- Determine the two best players that are not on your team for the current week
- Switch them for the two lowest scoring players on your team REGARDLESS of trade value
- Repeat steps 2-3 for each week
- If the final score is lower than the final score of your current best team, you can safely ignore this branch
My currently implemented system like this: - Take X top scoring players of each week to generate a pool of players.
- Make an ordered list ranking the pool of players by cost.
- Use a bunch of nested loops to iterate through the cost ordered list. This will make an initial team. The ordered list allows us to ignore all players past a certain point for a given loop once the cost exceeds 30.
- Check the race requirement for the initial team
- Test trades for the initial team. I use an ordered list of trade values here so that I can ignore players past a certain point, just like with step 3.
- Only attempt trades where the new player scores more points than the current player at some point in the future.
- Call the trade function recursively for each week
- Select the highest scoring resultant team and compare it against whatever our best solution currently is. Replace the best team if we've scored higher.
Also, the formula for trade value seems to be Trade value = cost * (total games in round - games played)/total games in round + points * 2/7 I'm still uncertain about the 2/7 part, but it works so far for round 2 week 1. Somehow in the last round, it ends up being (points / 4.5), and I have no idea when or how.
I rewrote whole mainteamsearching shit, and ended with something like that. Only shortcut I have taken is, that instead of 6. Only attempt trades where the new player scores more points than the current player at some point in the future. I just don't allow to trade into player who will score 1 or less on next round. Or into team that will score 0 or less.
I takes long to go trough all, but I'm confident it will find best solutions early. I put my round1 data trough it, and it found team that scores 215 (212 with anti team, witch is lot better than the 163 points without any trades.) in first 30 mins of running, and haven't found any better for an hour, and I think it will not find anything better anymore.
Now it is basicly just discarding every startteam suggestion becouce of my version of [*]Determine the two best players that are not on your team for the current week [*]Switch them for the two lowest scoring players on your team REGARDLESS of trade value [*]Repeat steps 2-3 for each week check
|
On January 08 2013 22:25 cjin wrote:Show nested quote +On January 08 2013 14:28 Spazer wrote:I tried brute forcing the main using the 30 highest scoring players per week (works out to 53 players total). It tested 583 teams over the course of 2.5 hours before I shut it down since it was obviously never going to finish in a reasonable amount of time. In comparison, with the 20 highest scoring players per week (pool of 41), I did 279 teams over 40 minutes. With the 10 highest scoring players per week (pool of 27), I did 285 in 35 minutes. In short, brute forcing main teams is a pipe dream for large pools of players until we do some optimization. Low trade value players can be evaluated almost instantly, but high ones take forever. For instance, testing trades with an initial team of KT Rolster, s2, hitman, barracks, alone, jangbi, and bogus took 1 minute 18 seconds by itself. I need a better way of discarding initial teams. With anti-teams, discarding initial teams is really easy. If an initial team scores more points than your current best team right off the bat, you can safely skip it. This trims off entire branches and really cuts down on the calculation time. What we need is a smart way to do this for main teams as well. I was thinking something along the lines of this: - Take an initial team
- Determine the two best players that are not on your team for the current week
- Switch them for the two lowest scoring players on your team REGARDLESS of trade value
- Repeat steps 2-3 for each week
- If the final score is lower than the final score of your current best team, you can safely ignore this branch
My currently implemented system like this: - Take X top scoring players of each week to generate a pool of players.
- Make an ordered list ranking the pool of players by cost.
- Use a bunch of nested loops to iterate through the cost ordered list. This will make an initial team. The ordered list allows us to ignore all players past a certain point for a given loop once the cost exceeds 30.
- Check the race requirement for the initial team
- Test trades for the initial team. I use an ordered list of trade values here so that I can ignore players past a certain point, just like with step 3.
- Only attempt trades where the new player scores more points than the current player at some point in the future.
- Call the trade function recursively for each week
- Select the highest scoring resultant team and compare it against whatever our best solution currently is. Replace the best team if we've scored higher.
Also, the formula for trade value seems to be Trade value = cost * (total games in round - games played)/total games in round + points * 2/7 I'm still uncertain about the 2/7 part, but it works so far for round 2 week 1. Somehow in the last round, it ends up being (points / 4.5), and I have no idea when or how. I rewrote whole mainteamsearching shit, and ended with something like that. Only shortcut I have taken is, that instead of 6. Only attempt trades where the new player scores more points than the current player at some point in the future. I just don't allow to trade into player who will score 1 or less on next round. Or into team that will score 0 or less. I takes long to go trough all, but I'm confident it will find best solutions early. I put my round1 data trough it, and it found team that scores 215 (212 with anti team, witch is lot better than the 163 points without any trades.) in first 30 mins of running, and haven't found any better for an hour, and I think it will not find anything better anymore. Now it is basicly just discarding every startteam suggestion becouce of my version of [*]Determine the two best players that are not on your team for the current week [*]Switch them for the two lowest scoring players on your team REGARDLESS of trade value [*]Repeat steps 2-3 for each week check
What language do you use? - would like to know if i would have any benifit from you uploading your solution ;D
|
United States8476 Posts
I do know that every round there's a "magic number" which is a constant we have to input to determine trade values. This number is an estimate of how many points each player will score. For example, a 4 pointer is expected to score 14 points. Round 2's magic number was 3.5, which accounts for the 2/7(1/3.5=2/7) in the formula you guys figured out.
|
Oh hi monk, I wonder if you can tell me when this weeks trade-window starts, i've been f5ing the page every 30th minut so far, to get my hands on the new data to test out optimizations for my current program.
|
I was here thinking the fun of this "game" would be to determine who had the better instinct and had the best opinion of player's skill/potential. Silly me.
Don't read this as a negative comment, it's not intended to me I just don't know how else to word it - is there any satisfaction in using a script to determine your team?
User was warned for this post
|
On January 09 2013 03:59 Zenbrez wrote: Don't read this as a negative comment, it's not intended to me I just don't know how else to word it - is there any satisfaction in using a script to determine your team?
You don't get it. They do it because of the satisfaction that comes from having a go at a hard problem and solving it. That's as much fun as anything else you can think of it that's what floats your boat.
|
On January 01 2013 02:10 Laquendi wrote:The optimal anti-team you can probably compute pretty easily with A* and any sort of decent heuristic. My current idea for heuristic (untested and unproven) is to use dynamic programming to get decent lower limit each player and week. The optimal main-team seems to be much harder problem. It might even be NP-hard since it's essentially longest path problem ( http://en.wikipedia.org/wiki/Longest_path_problem ). Unless someone is able to come up with something really smart we won't be able to prove that we have found the optimal team. It's likely you can get pretty decent results with some probabilistic optimization techniques (maybe something like MAX-MIN Ant System?) or linear programming with heavy restrictions but I'm not very experienced with these methods. The longest path is on a DAG, no? So DP could still work. I am more concerned about the number of states if we use DP, however. It's approximately 10^10 teams out there, without counting anti-teams and such.
Edit: Calculations are slightly off. It's more like 10^10 instead of 10^12. Still a pretty big number, but probably doable with enough machine power.
|
On January 09 2013 04:09 Serek wrote:Show nested quote +On January 09 2013 03:59 Zenbrez wrote: Don't read this as a negative comment, it's not intended to me I just don't know how else to word it - is there any satisfaction in using a script to determine your team? You don't get it. They do it because of the satisfaction that comes from having a go at a hard problem and solving it. That's as much fun as anything else you can think of it that's what floats your boat. The script is only for determine the best team after-the-fact... Just for the sake of knowing, after all the games have been played, what the best possible team would have been.
|
On January 09 2013 03:59 Zenbrez wrote: I was here thinking the fun of this "game" would be to determine who had the better instinct and had the best opinion of player's skill/potential. Silly me.
Don't read this as a negative comment, it's not intended to me I just don't know how else to word it - is there any satisfaction in using a script to determine your team?
User was warned for this post
Well the point of the script is to determine the best possible team, with trades, in RETROSPECT. Meaning when all matches are over you can compare your actual team to the best possible one. So it's not about "cheating" or "beating the system", it's about making a tool that is making it easier for those who created the fantasy feature. Instead of manually calculating the "best possible team with trades", which would take forever, they can enter the right numbers into this number-crunching-tool and it does it for them.
And again, this is all done AFTER the games are played.
On another note, I am intrigued by this thread, following this with great interest!
best Kim
|
|
|
|