EDT 09:16 CEST 15:16 KST 22:16

Streams: 90 live
63984 total viewers

Active: 7941
Pizza Meter
Beyond the Summit and TL S…
[WCS KR] Code S Recap/Code…
[WCS AM] Ro16 Group B Prev…
WCS AM - Ro16 Interviews a…
AMD Premier League S1 Gran…
FXOpen acquires Seed from …
Crank, mOOnGLaDe interview…
LGD.cn and RaTtLeSnAkE Adv…
GomTV: about the gamespeed…
Papa John's explores EG, L…
TeamLiquid Map Contest Fin…
Liquid wins the Curse Invi…
New Get 50% off Papa Joh…
TL Advertising Features
New XBOX reveal May 21st
Anime Discussion Thread
Naruto (manga spoilers)
The Korean Amateur/Pro S…
High Thread
Barcraft Ludwigshafen
The Automated Ban List
G-1 Grand Finals Meetup
Ask TL Staff Anything
TL.net Ten Commandments
The Liquid`HerO Fanclub!
The ST_Bomber Fanclub!
[Stream] ASL in Korea
[STREAM]EU&NA Wietze Maste…
Computer Build Resource Th…
[G] Streaming with OBS (Op…
Chosing a laptop for SC2 h…
[H] Random freezing/skippi…
Streaming Dota2//General S…
Team & Clan Recruitment …
The Korean Amateur/Pro S…
FXOpen acquires Seed fro…
Crank, mOOnGLaDe intervi…
Update on Papa John's ES…
TBLS on OGN's variety sh…
[ATC] Quantic vs. Milleniu…
[EU] Gold/Platinum Tours b…
[Code S] Placement Matches…
[Code A] Ro24 Day 2 2013 W…
Revive Your Energy Starlea…
The HotS Terran Help Me Th…
[H] Need help holding Prot…
The HotS Zerg Help Me Thread
[G] Fleet Keys - Refined H…
The HotS Protoss Help Me T…
TeamLiquid Map Contest Fin…
[A] Starbow
[M] (4) TPW Strangewood Mire
[D] Favorite Maps that Did…
OneGoal: A better SC2 [Pro…
G-1 League LAN Finals An…
Dota 2 QQ thread
General Discussion
The new report system in…
Inhouse Dota
Beyond the Summit and TL…
[The International] Easter…
Perfect World's Dota 2 Su…
Liquid Pasture Community L…
[TPL S5] Demon Edge Cup
Sticky Flames Weekly Dota …
A guide to Krobelus, the D…
[H] Night Stalker
Simple Questions, Simple A…
[G] Clockwerk, The Offlani…
Learning Dota 2
[D] New BW Server
[SOSPA] Event Matches
snipealots 24/7 afreeca …
DES Sonic Interview 5/18…
[Update] itemBay SSL Gra…
SC2 Player looking to le…
[SRT13] Ro16 Group A
[GC S3] Gambit's Cup Semif…
D Ranks Teamleague Season 4
[R&S] 13th SOSPA Ranking T…
C Ranks Teamleague Season 1
Practice Partner Thread
Challenger map on Starcraf…
Simple Questions, Simple A…
Increasing APM/EAPM
2012 - 2013 Football Thr…
NBA Playoffs 2013
Tera MMORPG
World of Tanks
Steam Sales Thread
The Shikyo Memorial for QQ…
[LoL Stream] Entenzwerg
[Patch 3.07: Nerf Everythi…
[LCS] All-Star Tournament
[LoL] General Stream Thread
[D] Pro Scene Evolution
[Guide] Montegomery's Supe…
[TL R&D] T.R.O.L.L.S.
[Champion] Nunu
D3 Hardcore Community
The: What is my item worth?
Wizard builds /discussions
[M][N] Les Mafia
Mexican Standoff Mafia
Doctor Who Mafia
TL Health and Fitness Init…
Olympic Weightlifting Thread
The 2013 Weightlifting Pro…
Leta - Movie
Michael - skyline
Anytime - Beast
By.Hero - Shuttle
Anytime - Pusan

Website Feedback

Closed Threads

IRC Chat
irc.quakenet.org #teamliquid

IRC Web Client

TeamSpeak 3 (57 users)

Finding the best possible fantasy team

Forum Index > StarCraft 2 1 2 3 4 5 All
 
 longdivision   United States. December 31 2012 16:02. Posts 158
Profile # 
[image loading]


monk. wrote:
If anyone would like to help with a program that will let us calculate the hypothetical best team including trades, feel free to contact us!


Hopefully, this thread will serve as a hub, for those interested in solving this problem, to find resources, ask questions, and share information.

I'll be updating this thread as new information comes in.



Goal

Given rules and data for Fantasy Proleague '12-13, find the starting line-up and weekly trades that result in the highest point value at the end of the Proleague season (or any arbitrary week).



Resources

General Information and Rules:
Main Thread for Fantasy Proleague '12-13

Data:

Players: Race (P/T/Z), Team, Cost ($)
Teams: Cost ($)
Player Points
Team Points

https://docs.google.com/spreadsheet/ccc?key=0AquXzBNtz3J0dEVYN2dBR3lQUUtobFF1b0FFTHYyM1E

Thanks, to monk. and Spazer, for contributing.



Required Resources (still looking for these)

Have data or know the answer to any of these questions? Feel free to post in the thread or PM me.

I tried to cover everything needed to solve the problem between Resources and Required Resources. If I've overlooked anything, please let me know.

Rules:
How is trade value calculated at the start, and how are changes in trade value calculated week to week?

Given a team with 4 (P), 1 (T), 1 (Z), is it possible to use the 2 weekly main-team trades to make the following trade without breaking the rule for having at least one of each race on a team?
1 (T) -> 1 (Z)
1 (Z) -> 1 (T)

Data:

Player data: Starting Trade Value
Team data: Starting Trade Value
Game data: Player 1, Player 2, Week #, Set #, Winning Player
Last edit: 2013-01-01 11:12:03
 
Old Post

 
 Cornix   United States. December 31 2012 16:08. Posts 162
Profile # 

On December 31 2012 16:02 longdivision wrote:
Rules:
How is trade value calculated at the start, and how are changes in trade value calculated week to week?


I'm pretty sure the trade value at the start of the season was set arbitrarily due to this being the first SC2 proleague, so trade values were set based on opinions/other SC2 results. You'd probably have to ask for the original values.

On December 31 2012 16:02 longdivision wrote:
Given a team with 4 (P), 1 (T), 1 (Z), is it possible to use the 2 weekly main-team trades to make the following trade without breaking the rule for having at least one of each race on a team? (I didn't create a team for the current league, so I can't check.)
1 (T) -> 1 (Z)
1 (Z) -> 1 (T)



No, I don't think you can trade someone at all when they are the last player of that race on your team, so (in the given scenario) you'd have to bounce a toss first for a t/z to trade out the other.
iS.SunnY, writer extraordinaire. Miami CSL!
Old Post

 
 monk   United States. December 31 2012 16:39. Posts 6819
Profile Blog # 
http://www.teamliquid.net/staff/monk/fantasy_proleague/fpl_lp_season1_data.xlsx

This is the file I've been using thus-far to calculate optimal teams without trades. It uses linear optimization, but this method isn't viable/efficient to calculate teams with trades and including trades goes beyond the scope of my algorithm/programming knowledge. However, this will be useful to you to extract players, initial costs, and races.

Edit: Updated file to include a page on teams. DL this new file please.
Last edit: 2012-12-31 17:05:07
@TL_monk
Old Post

 
 longdivision   United States. December 31 2012 16:40. Posts 158
Profile # 

On December 31 2012 16:08 Cornix wrote:

Show nested quote +


I'm pretty sure the trade value at the start of the season was set arbitrarily due to this being the first SC2 proleague, so trade values were set based on opinions/other SC2 results. You'd probably have to ask for the original values.

Show nested quote +



No, I don't think you can trade someone at all when they are the last player of that race on your team, so (in the given scenario) you'd have to bounce a toss first for a t/z to trade out the other.


So Trade Value wasn't set in relation to Point Value? That's a bummer. Hopefully the file with initial values still exists on someone's harddrive.

Is it only possible to trade 1 player at a time in the trade UI? If both players were exchanged at the same time, it seems like the trade should be allowed.
 
Old Post

 
 Gfire   United States. December 31 2012 16:45. Posts 1479
Profile # 

On December 31 2012 16:40 longdivision wrote:
Is it only possible to trade 1 player at a time in the trade UI? If both players were exchanged at the same time, it seems like the trade should be allowed.

I think as long as you do both trades during the same "trading session" then it would work.
ESV Mapmaking Team -- @TheGfire
Old Post

 
 longdivision   United States. December 31 2012 16:59. Posts 158
Profile # 

On December 31 2012 16:39 monk. wrote:
http://www.teamliquid.net/staff/monk/fantasy_proleague/fpl_lp_season1.xlsx

This is the file I've been using thus-far to calculate optimal teams without trades. It uses linear optimization, but this method isn't viable/efficient to calculate teams without trades and including trades goes beyond the scope of my algorithm/programming knowledge. However, this will be useful to you to extract players, initial costs, and races.


Thanks, I'll repost the data in csv format when I get a chance.

I've briefly thought about how to approach this problem, and I think it's a bit more complicated than it seems at first glance. Given the number of players, trades, and weeks of competition, I'm not sure brute force is a viable option. If brute force is not viable, then I am probably in over my head as well. I welcome the challenge, though. My current job provides very rare chances to improve my programming skills.
Last edit: 2012-12-31 17:02:40
 
Old Post

 
 longdivision   United States. December 31 2012 17:03. Posts 158
Profile # 

On December 31 2012 16:45 Gfire wrote:

Show nested quote +


I think as long as you do both trades during the same "trading session" then it would work.


Can anyone confirm this definitively or experimentally?
 
Old Post

 
 Gfire   United States. December 31 2012 17:07. Posts 1479
Profile # 

On December 31 2012 16:59 longdivision wrote:

Show nested quote +



Thanks, I'll repost the data in csv format when I get a chance.

I've briefly thought about how to approach this problem, and I think it's a bit more complicated that it seems at first glance. Given the number of players, trades, and weeks of competition, I'm not sure brute force is a viable option. If brute force is not viable, then I am probably in over my head as well. I welcome the challenge, though. My current job provides very rare chances to improve my programming skills.

Yeah, I was just taking a look at the numbers and I don't think brute force would really work.

You'd at least need a way to quickly identify a team which has no potential of being good so you can skip going through all the following trade possibilities.

Knowing the match results... Would it be reasonable to say that it's couldn't be a good idea to trade for someone who doesn't result in a better score after that week, or is there a situation where it's good to trade for someone even if it doesn't pay off until the following week?
ESV Mapmaking Team -- @TheGfire
Old Post

 
 longdivision   United States. December 31 2012 17:26. Posts 158
Profile # 

On December 31 2012 17:07 Gfire wrote:

Show nested quote +


Yeah, I was just taking a look at the numbers and I don't think brute force would really work.

You'd at least need a way to quickly identify a team which has no potential of being good so you can skip going through all the following trade possibilities.

Knowing the match results... Would it be reasonable to say that it's couldn't be a good idea to trade for someone who doesn't result in a better score after that week, or is there a situation where it's good to trade for someone even if it doesn't pay off until the following week?


Yes, the tricky part seems to be that the starting point/path to an optimal team after week 2 may be different from the starting point/path to the optimal team after week 3 or 4.

Regarding narrowing down choices, I'm a bit too tired to contribute anything useful. I'll be back tomorrow.
 
Old Post

 
 Laquendi   Finland. January 01 2013 02:10. Posts 35
Profile # 
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.
Old Post

 
 y0su   January 01 2013 02:30. Posts 1768
Profile # 
Unless it counts anti-team I didn't have a until I traded for one... If it does count anti-team, I traded my anti-team terran at the same time.
Old Post

 
 Spazer   Canada. January 01 2013 08:32. Posts 5479
Profile Blog # 

On December 31 2012 17:07 Gfire wrote:

Show nested quote +


Yeah, I was just taking a look at the numbers and I don't think brute force would really work.

You'd at least need a way to quickly identify a team which has no potential of being good so you can skip going through all the following trade possibilities.

I think brute force is still a viable solution. So far, all of the best teams without trading have used players that are within the top 20 for point gain. In all, I'd say it's pretty safe to ignore the bottom 40-50 players in terms of point gain. So if we take the top 30-40 players in terms of point gain for each week and intersect these sets, we can significantly reduce the number of possible teams.


Knowing the match results... Would it be reasonable to say that it's couldn't be a good idea to trade for someone who doesn't result in a better score after that week, or is there a situation where it's good to trade for someone even if it doesn't pay off until the following week?

If a trade results in net positive gain at any point in the future, that branch should be considered. However, all trades that result in a possible negative or 0 point gain can safely be ignored.

For instance, if we are considering trading player A for player B, and the point differential is -1 in the first new week and +4 in the second, we should consider that branch. We can also safely ignore all possible teams that result from trading player B during the first new week, because we would otherwise end up with a net loss in points.

I've already done a bunch of coding, btw. So far, my program can pull all the data from the FPL page (to get player, race, and cost data). I then parse Liquipedia to get win data. Using all this, I can calculate points gained per player per week. Once the trade value algorithm is figured out, the plan is to figure out and store the trade value for each player per week, and use that to implement some sort of trading function.

Here's an excel spreadsheet with weekly point gains for each player/team.
Outdated.

Edit:

On January 01 2013 02:30 y0su wrote:
Unless it counts anti-team I didn't have a until I traded for one... If it does count anti-team, I traded my anti-team terran at the same time.

Anti-teams have no race restrictions.
Last edit: 2013-01-09 13:15:35
mudamudamudamudamudamuda
Old Post

 
 longdivision   United States. January 01 2013 13:36. Posts 158
Profile # 

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.

Could you describe this approach for those (me included) who are not familiar with the more technical terms?


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.

Yikes. NP means the time to compute a solution grows exponentially with the size of the problem, right? Or at least it's not reducible to polynomial time.

Does anyone know when the league ends? Is it after 10 weeks? I wonder if it is realistic to solve this problem by going through all options.


On January 01 2013 02:30 y0su wrote:
Unless it counts anti-team I didn't have a until I traded for one... If it does count anti-team, I traded my anti-team terran at the same time.

Fascinating... At this point, maybe it is easier to follow the rules as they were presented, instead of trying to model how the rules actually work.
Last edit: 2013-01-01 13:49:20
 
Old Post

 
 longdivision   United States. January 01 2013 14:15. Posts 158
Profile # 

On January 01 2013 08:32 Spazer wrote:
I think brute force is still a viable solution. So far, all of the best teams without trading have used players that are within the top 20 for point gain. In all, I'd say it's pretty safe to ignore the bottom 40-50 players in terms of point gain. So if we take the top 30-40 players in terms of point gain for each week and intersect these sets, we can significantly reduce the number of possible teams.

If a trade results in net positive gain at any point in the future, that branch should be considered. However, all trades that result in a possible negative or 0 point gain can safely be ignored.

These seem like good strategies.


For instance, if we are considering trading player A for player B, and the point differential is -1 in the first new week and +4 in the second, we should consider that branch. We can also safely ignore all possible teams that result from trading player B during the first new week, because we would otherwise end up with a net loss in points.

Could a situation arise where 4 players need to be traded over 2 weeks and trading player A for player B during the first week is the optimal solution?


I've already done a bunch of coding, btw. So far, my program can pull all the data from the FPL page (to get player, race, and cost data). I then parse Liquipedia to get win data. Using all this, I can calculate points gained per player per week. Once the trade value algorithm is figured out, the plan is to figure out and store the trade value for each player per week, and use that to implement some sort of trading function.

Here's an excel spreadsheet with weekly point gains for each player/team.
https://dl.dropbox.com/u/4718/Weekly%20Point%20Gain%20Data.xlsx

Would you be willing to share your code? I'm a fairly inexperienced programmer and want to learn more. I'm interested in how you get data from the FPL page, parse Liquipedia, and how you structure your code.
 
Old Post

 
 Spazer   Canada. January 01 2013 16:33. Posts 5479
Profile Blog # 

On January 01 2013 14:15 longdivision wrote:

Show nested quote +


Could a situation arise where 4 players need to be traded over 2 weeks and trading player A for player B during the first week is the optimal solution?

With my described method, all I check for in the current week is whether or not a trade returns a net positive gain at any point in the future. If so, then ALL future branches with that trade are considered. To clarify my previous example:

You have option to trade player A for player B.
        Player A    Player B   Net gain from trade
Week 1: +4 +3 -1
Week 2: +2 +6 +4


So if I make the trade, I will have a net gain of +3 from the transaction in 2 weeks, so this branch will be considered. What I'm saying is that it's pointless to consider any branches wherein player B is traded away at the end of week 1, as this will leave us a net loss of -1, defeating the entire purpose of the trade.

The situation you mention (4 players being traded over 2 weeks) is already covered with this.



Show nested quote +


Would you be willing to share your code? I'm a fairly inexperienced programmer and want to learn more. I'm interested in how you get data from the FPL page, parse Liquipedia, and how you structure your code.

https://github.com/spazer/FPL_Calculator
Written in C# with VS2010
mudamudamudamudamudamuda
Old Post

  Waxangel   United States. January 03 2013 00:07. Posts 19067Profile Blog # 
yay, people who do math are on the problem!
Hey HP can you redo everything youve ever done because i have a small complaint?
Old Post

 
 Spazer   Canada. January 03 2013 13:38. Posts 5479
Profile Blog # 
Things I've figured out:
  • Trade value for each week is related to total points (all players with the same total points have the same trade value at the end of the round). Something like (Points / (Games Played / Games Per Week) is a factor. For the current round, final trade value can be found by dividing points by 4.5. The same can be done for other rounds, but the modifier is sometimes 4, sometimes 5.
  • The initial cost of a team/player is factored into trade value. The amount it adds decreases every week, hitting zero at the end of the round.
  • Adjusted trade value is just (trade value * # of matches the team has left to play)
Last edit: 2013-01-03 13:39:33
mudamudamudamudamudamuda
Old Post

 
 Chr15t   Denmark. January 03 2013 23:38. Posts 435
Profile # 
I'll take another approach to this. Making a program that stores all good teams from each week, and then i'll try to implement a way to transform high earning teams from week 1 to equally teams next week, using all the rules to ensure i dont get lost along the way. It might be an ugly implementation, but i think the average computer should be able to solve such a problem given a fair time span. I'll keep you guys posted
Insanity: doing the same thing over and over again and expecting different results.
Old Post

 
 Proseat   Germany. January 04 2013 04:57. Posts 4162
Profile Blog # 
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.
The Rise and Fall of SlayerS -- a timeline: http://www.teamliquid.net/blogs/viewblog.php?id=378097
Old Post

 
 Spazer   Canada. January 04 2013 05:16. Posts 5479
Profile Blog # 

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.
mudamudamudamudamudamuda
Old Post

1 2 3 4 5 All
Please log in or register to reply.
 
Refresh
StarCraft: Brood War
StarCraft 2
Dota 2
League of Legends
Other Notable Streams
[ Show 67 non-featured ]

» Recent SC2 Results
» Premier SC2 Tournaments
Sidebar Settings...

The Little App Factory



The opinions expressed by our users do not reflect the official position of TeamLiquid.net or its staff.

Advertising | Jobs | Privacy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren. Ad tag: TF_US.
The contents of this webpage are copyright © 2002-2013 Teamliquid.net. All Rights Reserved