Thursday, 11 November 2010

do something about it

Note. I have had to explain some elements of fantasy football for UK readers. If you are one of my regular readers, this is likely to be a post of less the normal interest to you. It is to a purpose.

One of my favourite writers, Lawrence Block, has said that when Person X tells him they have a great idea for a novel, and why doesn't he write it and then they can go halves no the proceeds, he replies that he actually has some spare ideas himself that he hasn't got round to writing, and why doesn't Person X write one of them and they can go halves on those proceeds?

Ideas are easy. People have good ideas about things all the time. Even you have probably had one. This post is about an idea lots of people must have had which would make millions of people's lives (very slightly) better, but which no one has made happen. Or it is a post in which I have got something obvious wrong.

I play fantasy American football. It's a brilliant game. Unlike other fantasy sports I've been instantly bored by, each footballer is only owned by one fantasy team, and the fantasy teams play each other in a league. It's exciting. It's the linchpin of a ginormous industry whose top analysts are paid seven figure salaries by companies like ESPN. I love this fact. I love that it's a derivatives industry where a player's value is separate from his value to an actual team, and that it ballooned during the recent boom in derivative trading. I love that you can have a job called 'Fantasy Injury Expert'. It's a metaphor for everything.

The biggest problem with the game, which players complain about relentlessly, is that the format starts to break down if two or three teams in the league stop participating (usually because they're losing). Games against those games become walkovers and skew the standings. Everyone gets very frustrated. I am new to the whole thing, and am experiencing my first big frustrations with it.*

If only something could be done about it! But something could be, couldn't it? and are two of the many sites running hundreds of thousands of these leagues. These are huge operations. All they need to do is create an Automanage function. The algorithm behind this would not be very complicated. These elements might not be perfect, but they're a start:

1. Any player on a team's starting line-up who is injured is automatically replaced with the bench player with highest projected score.
2. If no player in that position is available from the bench, then the player in that position with the lowest projected score for rest of season is automatically replaced by the Free Agent with highest projected score for rest of season.
3. A manager can disable the automanager if he thinks he can get by one week without a Defence/TE whatever, but only for one week.

And so why doesn't this function exist? I literally don't know, but I am going to find out. It seems like a small piece of computer programming would massively improve things. In fact, it's so obvious that there might be a glitch in my thinking. But I have looked for reasons and discussions and haven't found anything. Do tell me if I'm being a fool. It wouldn't be the first time.

* These frustrations are less today than usual because in a miraculous development in the league where I have the weakest of my three teams, which is really hurting at running back, someone has just agreed to trade me Adrian Peterson in exchange for Matt Forte and Dez Bryant. It's not even a PPR league.


notq said...

I am the developer of a simulated sports game,

It is a little different than fantasy football, you actually use Free Agency, Draft, and otherwise control your team. Madden without hand guy coordination.

I'd be interested to see what you think about it. One of the aspects I've been trying to improve is this sort of thing.

We have 32 team leagues, and what happens with there are 30 human players and 2 CPU players.

The CPU teams hemorrhage talent to the benefit of the human players.

CPU AI is tricky though. Should a CPU outbid a human player for an FA? Should they sign a team up to the salary cap, or leave a lot of room for flexibility when a Human coach decides to take them on?

Fantasy Football takes the route of no CPU changes (which you addressed some potential AI)

I'd be interested to hear your ideas for AI for our game. You come up with them, I'll implement them and we can see how they do!

Thanks. Not trying to thread jack, just a relevant discussion I actually deal with, CPU AI for a football game.

notq said...

One more point. I could write an automated Fantasy Football runner.

It'd probably take no more than an hour. I'd just need to know what website. The problem would be, it would use the username and password of the old player.

It's an interesting idea though. I could write one, and then play it in 100 fantasy football leagues, and see how it does, and improve on the code.

You'd have an AI fantasy football player.

WesleyC said...

I wouldn't join a fantasy team where the computer would make add/drops for me, unless say I made no changes for 2 weeks in a row.

However, I think a simple "Fill the roster with the best projected players at the start of the week" function would fix 99 percent of the problems made by abandoned teams. Plus, it'd be nice on weeks (like this one) where a Thursday game could sneak up on you.

Mike said...

You would probably have to add a list of undroppables to prevent the computer from dropping a player the rest of the teams would rush to pick up.

This might be a problem with a lot of players with the same bye weeks

It shouldn't be too hard to prevent the computer from dropping any players that are playing at above replacement level.

Robert Hudson said...

Good points, basically. But easy to program these in. Like I say, I don't have all the answers, and you'd have to accept that whoever did it first would probably make some mistakes. I'm just sure that something on these lines would be welcomed by lots of leagues, and all it takes is one person at one major site to get their act together and the others would have to follow suit.

Robert Hudson said...

notq: as per my answers at FO - trades are the real issue, because it might be easy to game. Deeproute sounds great, but I am already using *much* more time on football than have available. I must stop the bleeding...

But I love the idea of an AI fantasy football player. It would be really interesting to have play in a hundred leagues next year and see how it does. I'd definitely be up for helping out that experiment!

Sean said...
This comment has been removed by the author.
Sean said...

I'm not sure if you guys have heard of (fantasy football) but it is a fantasy game involving over 90% AI. When you create a team you draft against 11 other teams who are all semi-AI controlled. Each CPU team is managed by a real fantasy football pro. The weekly waiver adds and the lineup decisions are based on each experts’ rankings that week. So the experts don't literally add or drop players, the AI does. This allows a expert to "play" in hundreds of thousands of leagues at the same time while only having to put together a couple simple ranking lists each week (weekly projections list and a value based list for waivers).

I think the rapiddraft concept could be universally applied given the right effort. The rankings list that unmanned team's would use would be some site’s weekly rankings (FFnerd would be a good middle of the road choice).
Now I'm not saying it's perfect. Last year (rapiddraft's inaugural season) it was tough not to win your league due to a couple experts quitting and the inability of the AI system to be as position conscious as they needed to be. Waiver adds seemed to be directly based off of the value list and thus the AI would add players with higher value at one position instead of bolstering a position they were weak add. Last year the AI was notorious for adding WRs when it didn't need them simply because after a 20 round draft nothing else was on the table. Handcuffs were utterly ignored.

I don't know exactly what they changed from last year but this year rapiddraft is exceedingly competitive. I have a team in the top 1000 of human players that is still only in third place in its league. Waiver adds are more thoughtful, lineup decisions are better, and the drafts are the most competitive I had to face this year. All this out of an AI!

Now I'm not sure exactly what the plan is but I a good foundation would be a rapiddraft-like system. Rather than simply starting with a completely CPU based manager, it might be wise to start with one that still has some human input. I'd suggest avoiding trades from the forefront but managing that aspect is possible if you input a auction style model from which the AI could compare values in a trade (whilst also considering positional value). Yahoo has a okay trade evaluator up and running and it easily spots bad value trades though the close ones are a bit iffy.
I think the idea of playing the players with the most projected points would also work out well as it would eliminate the bye week issues that really hurt fantasy teams. The problem is injuries would be hard to deal with. It might be best to tie injury related lineup choices to the inactive list which always seem to be the quickest and most accurate.
All that is relatively easy, it's the waiver adds that would be an issue (if you chose to make an AI do them). The biggest stumbling block here besides establishing value rankings is positional value recognition. An AI (and also many human players) needs a large set of rules to understand that it should only go after a player with x value and drop a player with y value if the team already has 4 or 5 players at that position. A very simple way of dealing with this would be to set max and min number of players to be carried at each position. This puts the CPU team at a small disadvantage because of the lack of value from carrying a second TE, K, or DEF. Another decent method (not mutually exclusive) would be to force the AI never to add a player unless they dropped a player at the same position. This would greatly limit the number of moves by CPU teams but would keep their teams balanced. For fairness we must remember that unmanned teams shouldn't be perfect.

I'd love to help on a project if anyone should decide to undertake one! I honestly believe that in a couple years it would be possible to create a AI that is better at FF than an average human player.

Kathy said...

Waving hello to you from way over here in the good ol' US of A. Just wanted to tell you that all the guys in my office are absolutely obsessed with Fantasy Football, and they spend HOURS every day talking about the rights and wrongs of the system. (Lucky me, I have a fifty-yard line seat to all this action.) I'll send them a link to your blog entry. I'm anticipating the reaction will be like throwing gasoline on a fire.