Tuesday Morning app

Technical discussion of development of third-party apps.
LeBron
All-Pro
Posts: 136
Joined: Sat Oct 01, 2011 11:42 am

Re: Tuesday Morning app

Postby LeBron » Mon Apr 16, 2012 7:03 pm

On that A and B team case, you can use draft picks also, if the overall's difference is that high.

Re: Tuesday Morning app

Sponsor

Sponsor
 

User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Tuesday Morning app

Postby torontogrudlies » Mon Apr 16, 2012 10:04 pm

LeBron wrote:On that A and B team case, you can use draft picks also, if the overall's difference is that high.


Yeah, that's what I was thinking, which was the reason for my inquiry about draft valuations. I will have to do experimenting to get everything to match up value-wise though.

User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Tuesday Morning app

Postby torontogrudlies » Mon Apr 16, 2012 10:34 pm

superben21 wrote:I was thinking that you could possibly have a limited overall differential between players being traded. So say you can't trade someone who is a 90 overall for anyone outside of the 85-95 range or something like that to keep the trades in check. You could also look at potentially making an "untradeable" list which would have players like Tom Brady on it and they wouldn't be able to be traded unless they're moral goes below a certain variable. Just a couple ideas for you.


I think with the code I've got, just the fact that he's Tom Brady (high OVR, low propensity for getting into off-the-field trouble, importance to his team's philosophy, etc.) will prevent him from being traded. I don't think we'd want to say that "these players are untradeable, period" though. As a GM, if I have Tom Brady with one or two seasons till he retires, and another team is waving the #1 or #2 overall draft pick in front of my nose, I'd probably make that deal. My app also has a factor for this called "YouthCore"... GMs with a high value in this category will prefer to have youthful players, (and the ability to obtain them via good draft picks), over players toward the end of their careers. The other side of this coin is "Loyalty," another attribute of GMs.... if Tom Brady helped win four Super Bowls, the GM may be a little more inclined to keep him around even if logic doesn't dictate.

I also might even have an option where a team, for whatever reason, decides to have a "fire sale"... they unload almost all of their high-ranked veterans in exchange for young players and high draft picks, trading immediate success for long-term hopeful success.

User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Tuesday Morning app

Postby torontogrudlies » Mon Apr 16, 2012 11:00 pm

ColtsFan wrote:
torontogrudlies wrote:Still sort of stuck on player valuations, and the concept of valuation in the trades.

As already mentioned, I have developed code which takes a specific team and player, evaluates them based upon ratings, and returns a numeric value. This value determines how valuable (or not) the player is to that team. If it's a low number, the team will look to trade the player. Each week (prior to trade deadline), each team will evaluate all its players, and add these unwanted players to a trade list.

Other teams will then also evaluate these same players according to a very similar formula, although the returned numeric value can be very different depending upon the team's needs. So, Team A may have a player they don't want (maybe ranked as a -113), but Team B ranks the same player very highly (like, 125), and therefore seeks to trade for the player.

In the next step, then, Team A looks through the list of Team B's unwanted players, applies the same formula to find players which might serve their own needs. Perhaps finding an idea player who ranks highly and then, possibly, making the trade.

My question is more general, and not really specific to football per se. In developing the code, how can I know that the trade is equitable for both sides? Am I just looking for two players who are ranked the same, so each side is getting a player which is valuable to them? Or should I be going further, and determining a definite value for each player?

Possible scenario: Team A for whatever reason has two of the best QBs in the game, Tom Brady and Drew Brees, on its roster, and are missing a decent running back. Team B needs a quarterback and they have an extra young, untested running back which fits Team A's needs. The formulas determine that the running back is a good idea for team A, and that Brees is a good fit for team B. B doesn't really need the running back, and although Brees is among the elite players in the game, he's not all that important to team A because they already have Brady. But the trade could be considered lopsided, as a QB worth millions is being exchanged for another player who isn't worth nearly as much talent-wise. (I have a Corvette which I never drive due to prohibitive gas and insurance prices, plus I have a family which is way too large for a 2-seat car. My neighbor has a very nice bicycle with which I could bike the six blocks to my work, get exercise and save thousands of dollars, plus I can then go biking with my family. Should I pull the trigger on this trade? LOL)

So I'm wondering if I should be also computing the value of each player, as seen by everybody else (in this case, the other 30 teams) or is it good enough that each party to the transaction is fulfilling a need? (or to take the Corvette analogy, compare the Kelly Blue Book value on the car and the going rate for the bicycle on eBay, and say "no deal"?)


I'm excited about this mod!!! :D

I would agree with your last statement, I wouldn't trade a 28 year old Peyton Manning for a 21 year old Chris Johnson. Unless, of course, that team had the mindset (as mentioned earlier) of establishing the run, and they had a decent backup to Peyton. You might want to figure into the mod the players ages a little more too, like, most QBs play until they're 35-38 years old, but RBs usually (unless they are extremely good) don't do a whole lot past 32.

I don't know if y'all really need any input from us "outsiders" of the mod ;) lol it looks like y'all are doing a fine job as far as ideas go! :)


I definitely need lots of input. There are some areas in which I'm a novice, and other things I might not have thought of. Good example is you just reminded me that different player positions will be in their prime at different times.... RB will be during the early part of his career, while QB will hit his stride toward the middle of his career. One area of my code where this is will be a factor: the "underachiever" role. After x number of years in the league, a player will be flagged as an underachiever if he still has subpar ratings. The x number of years is determined by the GM's patience.... high patience means he'll wait longer for the player to excel, but with running backs this should definitely be a shorter curve.

User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Tuesday Morning app

Postby torontogrudlies » Mon Apr 16, 2012 11:22 pm

Thinking a little further into this trade valuation. Actually, my own analogy got me thinking in different directions (regarding the trade of the Corvette for the schwinn bicycle.) In that scenario, the trade would never occur because there would be common knowledge that one was worth much, much more than the other.

The way I'm starting to see this working: a team (call it Team A) first makes its list of players it no longer wants. They're added to a group representing that team's trade block list, and also to a "global" trade block list (every player in the league who is being shopped for a trade.) All 32 teams go thru this part.

Then, each team reviews this global list, doing an analysis of each player being shopped. It gets sorted from strongest prospect (for the reviewing team, call them Team B) to weakest. The strongest prospect's team (Team A) then does the same evaluation on Team B's list, finding their strongest prospect or prospects as well.

My initial thought was to merely compare the numerical values of players A and B, and if they're equivalent or close, it's a good trade. However, we now see that this isn't feasible, as player A is a Corvette and player B is a ten-speed bicycle.

So, we run another evaluation on each player.... this time obtaining a valuation of what the player is worth to all 32 teams, averaged. These numbers are the ones which are compared.... if player A is a 400 and player B is just a 275, no deal (but other options are possible, like Team B throwing in another player or a draft pick valued at around 175.) If they're pretty close in value, make the deal. Otherwise, move on to the next player in the list and try it again.

I have given the GMs ratings which will apply here. GM with high "Risk" attribute may make a deal even though it seems to favor the other team. GM with low "Patience" may be compulsive, he sees a player he thinks would be a good fit, and he has to have the player right now, even if he has to give up other players, draft picks, etc.

Does this logic seem to make any sense? Hopefully I am moving in the right direction on this....

ampolcen
Rookie
Posts: 10
Joined: Sat Jul 23, 2011 5:09 pm
Location: Wisconsin

Re: Tuesday Morning app

Postby ampolcen » Tue Apr 17, 2012 8:01 pm

your logic sounds really good and it makes sense to me

User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Tuesday Morning app

Postby torontogrudlies » Tue Apr 17, 2012 11:13 pm

superben21 wrote:I was thinking that you could possibly have a limited overall differential between players being traded. So say you can't trade someone who is a 90 overall for anyone outside of the 85-95 range or something like that to keep the trades in check.


In addition to what I posted yesterday, I've been thinking along these lines a little as well. Possibly, a 27-year old RB with 94 OVR is always valued exactly the same as any other 27-year old RB with 94 OVR, and just have some kind of formula for this.

User avatar
superben21
MVP
Posts: 622
Joined: Fri Aug 05, 2011 1:44 pm
Location: Ohio

Re: Tuesday Morning app

Postby superben21 » Wed Apr 18, 2012 9:26 am

torontogrudlies wrote:
superben21 wrote:I was thinking that you could possibly have a limited overall differential between players being traded. So say you can't trade someone who is a 90 overall for anyone outside of the 85-95 range or something like that to keep the trades in check.


In addition to what I posted yesterday, I've been thinking along these lines a little as well. Possibly, a 27-year old RB with 94 OVR is always valued exactly the same as any other 27-year old RB with 94 OVR, and just have some kind of formula for this.

Yeah that would be a good idea. As long as the computer is making mostly intelligent trades and nothing bonehead :roll: your starting formula doesn't need to be much more IMO.
~ Superben21 | An active moderator at one point or another.

Drizzt_13
All-Pro
Posts: 202
Joined: Wed Apr 18, 2012 7:32 pm

Re: Tuesday Morning app

Postby Drizzt_13 » Thu Apr 19, 2012 12:13 am

torontogrudlies wrote:
superben21 wrote:I was thinking that you could possibly have a limited overall differential between players being traded. So say you can't trade someone who is a 90 overall for anyone outside of the 85-95 range or something like that to keep the trades in check.


In addition to what I posted yesterday, I've been thinking along these lines a little as well. Possibly, a 27-year old RB with 94 OVR is always valued exactly the same as any other 27-year old RB with 94 OVR, and just have some kind of formula for this.


Possibly add a variable that makes teams value their own players slightly higher than they're actually worth to reduce trades unless one GM really values a player. That way teams are not likely to trade a starter unless the other team is offering more than that player is worth rather than equal value and most trades will take place as a reshuffling of backups and project players.

You were talking about a potential rating that would cap the OVR at a certain point. Instead of Capping OVR why not cap individual ratings. That way you can draft wide receivers who dominated in college because they were big and fast but don't ever develop the catch or awareness to make it in the NFL. I think a hard cap either on OVR or on individual traits is a good idea but I like progression ratings better. I don't think college players tend to get much stronger or faster after coming to the NFL, they just get better at the techniques of their position so maybe we could make it easier to improve skill ratings rather than physical ones.

An Idea I had would to have a function that keeps track of the little nagging injuries players suffer from. Have something based on the stats from the game that adds a number of little injuries that maybe just take points off of single ratings. Their should be the potential these develop and get worse, which makes players more likely to rest their starters and try to keep the snap counts down, and makes bye weeks matter as it gives you time to heal the little injuries. I can try to come up with more concrete formulas based on the tags you have if this is possible but I don't know any coding, if this is just too much to do then that's fine by me.

Random Questions:
How much time does it take to program another extra attribute it keeps track of outside of the game? How hard is it to write the program so that it modifies an attribute based either on in game stats or on these extra attributes? Would you be willing to post the formula for how teams evaluate players here, cause that would be interesting not just from a trading thing but also from a draft logic perspective? Can rosters and draft classes be converted to spreadsheets easily?

I'm willing to test anything you need tested, I am 64 bit and running windows 7 and have a lot of spare time on my hands. I'm also willing to help out with any of the theory stuff, working on formulas and the like if you need any but I'm useless at programming

User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Tuesday Morning app

Postby torontogrudlies » Thu Apr 19, 2012 9:53 am

Drizzt_13 wrote:
torontogrudlies wrote:
In addition to what I posted yesterday, I've been thinking along these lines a little as well. Possibly, a 27-year old RB with 94 OVR is always valued exactly the same as any other 27-year old RB with 94 OVR, and just have some kind of formula for this.


Possibly add a variable that makes teams value their own players slightly higher than they're actually worth to reduce trades unless one GM really values a player. That way teams are not likely to trade a starter unless the other team is offering more than that player is worth rather than equal value and most trades will take place as a reshuffling of backups and project players.



Sort of... my code doesn't inflate their values exactly. But, each GM has an attribute called "Scouting" which determines how good an evaluator of talent he is. This is also applied to evaluations of his own players....but when it's a player already on his team, he's automatically given extra scouting points in the formula. This simulates the fact that the team sees this player every day at practice, and are going to have a better idea of his abilities (and a little more of an idea of how good the player is going to be.)


You were talking about a potential rating that would cap the OVR at a certain point. Instead of Capping OVR why not cap individual ratings. That way you can draft wide receivers who dominated in college because they were big and fast but don't ever develop the catch or awareness to make it in the NFL. I think a hard cap either on OVR or on individual traits is a good idea but I like progression ratings better. I don't think college players tend to get much stronger or faster after coming to the NFL, they just get better at the techniques of their position so maybe we could make it easier to improve skill ratings rather than physical ones.



This could be looked at as well!



An Idea I had would to have a function that keeps track of the little nagging injuries players suffer from. Have something based on the stats from the game that adds a number of little injuries that maybe just take points off of single ratings. Their should be the potential these develop and get worse, which makes players more likely to rest their starters and try to keep the snap counts down, and makes bye weeks matter as it gives you time to heal the little injuries. I can try to come up with more concrete formulas based on the tags you have if this is possible but I don't know any coding, if this is just too much to do then that's fine by me.



I do have a player attribute set up for this--how "hurt" the player is vs. being injured. They can be "hurt" in practice or from running the ball 39 times or from being sacked 7 times, and not be injured. (Remember what James Caan said in "The Program"....) If the player does not have high work ethic, and he's in the last year of his contract and the team isn't putting a high priority on coming to terms, he may even sit out of practice or opt not to play.




Random Questions:
How much time does it take to program another extra attribute it keeps track of outside of the game?



Relatively easy.

The database I'm keeping track of them in is actually a .ROS file (our Madden-based code and editors can access it) and I first erased everything out of it. Then I use the PLAY table and create a corresponding record for each player in the real franchise file. My database is only touched by the Tuesday Morning software, the in-game never sees it, so no risk of crashing the franchise (except if issues develop with changes that get plugged into the real franchise.

When I discover another attribute I want to track, I find one which isn't being used in the secondary (old .ROS) database. I look for one of the "7 bit" ones (a positive number between 0 and 127, which is what all of the in-game attributes are.) PTHP is throwing power in the franchise file, but it might mean something entirely different in my version of the file.... but it's ok because the application user never really sees the name at this level.





How hard is it to write the program so that it modifies an attribute based either on in game stats or on these extra attributes?



That's what I've been up to.... analyze these attributes, or historical data, and come up with temporary adjustments which get plugged into the actual player record. Playing the team which knocked them from the playoffs last year? Every player may come out "fired up," or in formula terms, AWR=AWR+3. Running back still hampered by that sore ankle and couldn't practice this week? He's got high work ethic so he's going to try to go this weekend, but ACC=ACC-4 and AWR=AWR-1 (or something along those lines.)


Would you be willing to post the formula for how teams evaluate players here, cause that would be interesting not just from a trading thing but also from a draft logic perspective?



Yes, I will do so. Some of it is based upon the secondary stuff I've come up with. For example, a player can be a troublemaker who has gotten into off the field problems. Some GMs will want to drop him like a hot potato, sometimes in spite of stellar numbers on field. Others won't really care.

Some GMs will flag a player because they consider him overpaid.

The part I'm working on right now is to determine how important the player is to his team. Or, if he's being evaluated by the GM of another team, how valuable he would be to the roster of that team. This one uses OVR and other ratings, and it's going to pull the team philosophies as dictated in the head coaching profile. If a coach's pass/run ratio is 75/25, the QB position is paramount. If it's 40/60, QB position is still important, but not crucial.

In conjunction with that, I want to write some sort of formula which evaluates each position on the team, and returns a numerical factor indicating how great their need is at that position. I think the formula might be somewhat the same as the previous. Trade logic could then first look at all the players of that position who are available.






Can rosters and draft classes be converted to spreadsheets easily?



Because it's being done in a Madden roster file database, you could open the DB Editor and export to CSV just as with a normal FRA file. Keeping in mind that when you see PBTK in this file, it has nothing to do with how well the player breaks tackles, etc.




I'm willing to test anything you need tested, I am 64 bit and running windows 7 and have a lot of spare time on my hands. I'm also willing to help out with any of the theory stuff, working on formulas and the like if you need any but I'm useless at programming


Yes, this is definitely what is needed! Writing it in Visual Basic is relatively easy, as long as I know what logic I'm looking to plug in. I'm in the process of writing classes and functions which will handle complex tasks with a single command. Example, I can have a team generate their list of potential trade block players with a single line of code.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 2 guests