Thread: OPR
View Single Post
  #15   Spotlight this post!  
Unread 05-03-2015, 03:03
Spoam's Avatar
Spoam Spoam is offline
Registered User
AKA: Pedro M.
FRC #0955 (CV Robotics)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2012
Location: Corvallis
Posts: 54
Spoam is a jewel in the roughSpoam is a jewel in the roughSpoam is a jewel in the roughSpoam is a jewel in the rough
Re: OPR

Quote:
Originally Posted by saikiranra View Post
Ed Law and his team has put together awesome resources for calculating OPR that can be found here.

Calculating OPR isn't actually that hard, although it requires some knowledge about basic linear algebra. Essentially, you are trying to solve a linear system of equations for a certain constant that is what you expect a team to contribute to an alliance each match (OPR). If you have teams a, b, and c playing together in one match, and they score a x amount of points, you are solving

a(OPR) + b(OPR) + c(OPR) = x

As more matches occur, the matrix equations become more complex. In the form of Ax = b, A is the matrix whose values correspond to the amount of matches teams played with each other, x is the OPR vector, and b is the vector of the total score each team made in all the matches they played.

If you don't want to do the hard math/plug in your own match scores, you can use The Blue Alliance's API to get OPRs off their site.
Adding on to this, if anyone truly wants to do the math themselves it's worth mentioning that you'll end up with an over-determined system and a non-invertible matrix. Because of this, |Ax-b|=0 probably doesn't exist (every robot would have to contribute the exact same amount of points every match for that to happen) and you have to settle for minimizing |Ax-b| instead. This is done via a formula called linear least squares, which is essentially just left-multiplying both sides by the pseudo-inverse of A, to pseudo-solve it, if you will.

I think it's useful to understand how OPR works too, because often OPR alone often poorly models the game, or the game includes nonlinear (bins this year) or irrelevant (foul points last year) elements which get lumped into naive OPR equations anyways. You should understand what you're looking at before you take a list of teams ranked by OPR at face value.
__________________
2015 PNW District Champions (955, 1983, 2930)





Co-Creator of 955 OPR

Last edited by Spoam : 05-03-2015 at 03:06.
Reply With Quote