Tuesday Morning app

Technical discussion of development of third-party apps.
User avatar
torontogrudlies
MVP
Posts: 837
Joined: Fri Jul 15, 2011 4:56 pm

Re: Tuesday Morning app

Postby torontogrudlies » Fri Apr 20, 2012 1:18 am

A little bit of code....

Code: Select all

  Select Case .PPOS
                Case 0
                    ideal = 3
                    playerarray = GetPlayers2(dbhandle, dbhandle2, 0)
                    For i = 0 To UBound(playerarray)
                        ratingsum1 = ratingsum1 + playerarray(i).POVR
                    Next
                    If .TGID <> TGID_ Then
                        ratingsum1 = ratingsum1 + .POVR
                    End If
                    temprate = ideal * passpct_ * (.POVR / ratingsum1) * (OffenseCoaching / 100)

            End Select


This is a small snippet of the code which is putting a trade value on the player. There are many other factors which go into the final figure....

First part, Case 0, refers to position 0, the QB, and therefore this formula will be applied to the player in question if he's a QB. "Ideal" represents the ideal number of players at this position. If you follow the math, you'll see that if there are fewer than 3 QBs on the team, this player will be valued slightly higher, if there are more, the value will be lower. (Think of a pie which represents the total rating of all the QBs; the QB being evaluated will be a slice of that pie.... and the slice will be bigger or smaller depending upon the # of players.)

The playerarray=GetPlayers2... line tells the program to get every player on the team in position 0.... a collection of all the team's QBs.
We then go thru each of these QBs and add his OVR to a running total.
The "if tgid<>...." line means, if we are evaluating a QB who is on a team other than our team, we're going to tally his OVR in anyway. In other words, we're looking at the QB's value if he were to become a part of this team.

It ends with the formula:

temprate = ideal * passpct_ * (.POVR / ratingsum1) * (OffenseCoaching / 100)

passpct_ = the percentage of pass which is in the coach's philosophy. Those of you who are familiar with the NZA Editor will recall that this is part of the pass/run set of inputs, of which one is read-only..... you type the value into one, hit save, and the other field is adjusted accordingly.

(.POVR / ratingsum1) means this player's OVR, divided by the sum of all the OVRs. In effect, this determines how big his "slice of the pie" is.

OffenseCoaching is meant to determine how offense-minded the team is. Some head coaches will be offense-oriented, others defense-oriented, and Madden has a rating for this. We pull this value for the head coach, but we also pull the value for the offensive coordinator and we give twice as much weight to that one. If the head coach has only a 40 but the offensive coordinator is an 85: (40 + 85 * 2) / 3 = 70 offense rating.

I plan to write one of these for each set of positions..... they will differ somewhat from each other. I'll have to come up with more complex equations for OLs, dealing not only with OVR but with pass and run blocking.

Re: Tuesday Morning app

Sponsor

Sponsor
 

ColtsFan
All-Pro
Posts: 259
Joined: Thu Apr 05, 2012 12:44 pm
Location: Grand Cayman
Contact:

Re: Tuesday Morning app

Postby ColtsFan » Fri Apr 20, 2012 3:07 am

This is great!!!

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

Re: Tuesday Morning app

Postby torontogrudlies » Fri Apr 20, 2012 11:07 am

Still needs work. With a variation on this, a 99 ovr qb on a team with strong pass philosophy came out to 260 valuation. 2 other qb's were 80 and 70 ovr,, and the 70 still ranked as 190.

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

Re: Tuesday Morning app

Postby Drizzt_13 » Fri Apr 20, 2012 11:13 am

Let me just see if I have this straight the formula is

ideal # of players at position*(coaches pass percentage)*(player ovr/the sum of every other player at his positions on the team OVR)*((coaches OFF+2*OC's OFF)/3)

Is this right?


torontogrudlies wrote:Still needs work. With a variation on this, a 99 ovr qb on a team with strong pass philosophy came out to 260 valuation. 2 other qb's were 80 and 70 ovr,, and the 70 still ranked as 190.



I think this is because the (.povr/ratingsum1) doesn't have a very wide range say you're on a team with a 99 Qb and 2 70 QB's the 99 QB's have a value of .414 and the 70's have a value of .29 This means no matter what the other factors are the same coach is only going to value the 99 QB 1.12 times as much as 70 QB because they're both going to be multiplied by the same other factors. Part of the issue is that madden only really uses the range from let's say 65 to 99 as far as OVR's go, and I rarely see anyone below 70 make a roster. We could improve the difference by removing a section of the range that madden almost never uses, by just subtracting 50 or 60 points from every QB's OVR the difference between top QbBs and low QB's is increased.

Using the same example as before but subtracting 50 from each player's OVR the 99 is rated a .55 and the 70 a .22 meaning the 99 QB is worth 1.33 Times as much resulting in almost 3 times as wide a spread as before.

If we subtract 60 then we get .66 for the 99 and .16 for the 70's meaning the 99 could be rated 1.5 times as much as the 70.

I'm not sure if this is a big enough difference I think Aaron Rodgers is worth way more than 1.5 times as much as Brady Quinn, and If there is any position in which there should be a huge spread in value it's definitely the QB position.

I think the Biggest factor you're leaving out is the ease at which players can be replaced, If you have 3 70 QB's and another team has 3 80 QB's then they're both losing the same percentage of their total QB OVR if they trade, but the 70 team can replace the QB they in a heartbeat and the 80 team cannot. Also I don't think the third string QB should be such a large factor in this as they tend to be emergency backups or project players.

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

Re: Tuesday Morning app

Postby torontogrudlies » Fri Apr 20, 2012 12:21 pm

How about plugging in

1.22^(ovr - 70)

or something similar?

A 99 ovr starts with a factor of 319, 90 ovr is 53, 80 ovr is a 7.

and we would then of course apply the other factors, teams pass philosophy, etc.

The tricky thing is that each position is likely to have a vastly different formula....

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

Re: Tuesday Morning app

Postby Drizzt_13 » Fri Apr 20, 2012 12:26 pm

torontogrudlies wrote:How about plugging in

1.22^(ovr - 70)

or something similar?

A 99 ovr starts with a factor of 319, 90 ovr is 53, 80 ovr is a 7.

and we would then of course apply the other factors, teams pass philosophy, etc.

The tricky thing is that each position is likely to have a vastly different formula....


I'm sorry I'm confused about where we'd be plugging it in. Do we have the formula (1.22^(ovr-70))/ (1.22^QB A's Ovr-70)+(1.22^QB B's OVR-70)+1.22^QB C's OVR-70)

Do you know if it's possible to bring the average OVR of a certain position into this? What about the average OVR for starters and backups separately? I think the best way to calculate team need would be based on how much the Average OVR at that position changes on the team changes after losing the player and then modify that exponentially based on how far removed it is from league average.

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

Re: Tuesday Morning app

Postby torontogrudlies » Fri Apr 20, 2012 1:28 pm

Yeah, something like that. If the qbs are 99, 90, 80 then instead of 99 over 99+90+80, its 319 over 319+53+7. The "slice of the pie" is much bigger for that premier player. We then multiply this by whatever other factors, which can be tweaked.

This will all lead toward a total validation of the player by that team. I'm thinking that we then run the same script, evaluating the player in the eyes of all 32 teams, and this gives us a sort of "fair market value" for the players worth. We'll also want to balance this not only against other positions, but against draft picks. (if the #1 pick is worth 3000 points, how does the common value of a Brady or Manning stack up against this?)

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

Re: Tuesday Morning app

Postby torontogrudlies » Fri Apr 20, 2012 6:14 pm

http://harvardsportsanalysis.wordpress. ... aft-picks/

Ran across this in my search for the draft pick valuation info. This puts the value of the first overall pick just shy of 500 points.

It's interesting to see how this person came up with this. He (or she?) analyzed the players who came out of those picks, and what their typical value was over their careers....

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

Re: Tuesday Morning app

Postby torontogrudlies » Sat Apr 21, 2012 1:10 am

Drizzt_13 wrote: What about the average OVR for starters and backups separately? I think the best way to calculate team need would be based on how much the Average OVR at that position changes on the team changes after losing the player and then modify that exponentially based on how far removed it is from league average.


I've been modifying the QB portion of the formula a bit more. In addition to everything else, if he's the #1 QB on the team, he gets an additional adjustment to his value, by 110%. If there are more than three QBs and he's the lowest valued one, yet more value gets subtracted from the numeric result, which will be extremely likely to push him into "tradeblock" material.

I will also eventually have to account for injured players... if there are 4 QBs but one is out for several weeks or for the season, we don't want to trade the emergency QB obviously.

I'm sure my formulas will require much tweaking.... but I'm in the neighborhood of where it's starting to make numerical sense. Some of the top QBs in my league will value roughly the same as a high first-round draft pick. Does anyone happen to know how often the #1 pick has been traded for in the NFL, and which player the trade may have involved?

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

Re: Tuesday Morning app

Postby superben21 » Sat Apr 21, 2012 9:02 am

Something you could include in the app but has nothing to do with what we're currently talking about but I wanted to bring it up so I don't forget it.

You could make it so that when players are traded they can get they're contracts restructured. That's always been one of the worst parts about madden in my opinion. How it deals with trades/contracts the whole 9 yards is awful.

Just putting that out there cause I thought of it :)
~ Superben21 | An active moderator at one point or another.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest