Does any of you have any OPR and or CCWM software?
Being a Sophomore i found it hard to understand the math behind it, and I hoped any of you has a program that would just run the math for me.
Thanks in advance
Does any of you have any OPR and or CCWM software?
Being a Sophomore i found it hard to understand the math behind it, and I hoped any of you has a program that would just run the math for me.
Thanks in advance
Ed Law’s software, found here: http://www.chiefdelphi.com/media/papers/2174
He updates the data each week and you can update on the fly with a network connection or manual entry.
If you have an android phone, you can download my app OPR FIRST 2013 which you can also use to predict matches based on OPR
does it need any manual input or does it take the input from the internet?
will it update before alliance picking?
and final question- does it only put out OPR or will it also put out CCWM?
It updates from the internet whenever you hit the update button. So you can update it just before alliance selection and have all of the oprs for all of the teams at that regional. And no, it does not have ccwm
I just downloaded this and it looks great. I’m very excited to use it at our next event (MAR Championship) for scouting.
I have been looking at completed regional/district events and the data looks perfect, but I’m not sure what to make about the OPR values for some teams from in-progress events.
For instance, currently at Lenape-Seneca district, team 2495 has played in 3 matches and their alliances have scored 60 points, 42 points, and 18 points. (Ranked 31st with a record of 0-3). However, their OPR value is a staggering 187.696. Is this discrepency because they’ve only played 3 matches, or it is something else? (In contrast, team 2729 has averaged 152 points in their 3 matches, but their OPR is only 153.089, 34 points lower than team 2495’s.)
Let me say thanks again… this is a very neat program!
EDIT: This issue seemed to work itself out after a few more matches, so there must be a minimum number of matches that must be played before any meaningful data can be collected.
The OPR FIRST 2013 is a great app, way to go in developing it! Have you considered sharing the full source, making it an open-source FRC development?
Please bring this discussion to Michael’s thread, here. I don’t know his thoughts about it, but feel free to send him a message on the thread or a PM. He’s on here lots, so you’ll get a reply quickly.
I’m not sure if you’ve gotten this far in math yet, but for the general FRC student, if you can solve
3X+4Y=2
5X+2Y=7
you can understand how OPR works. It’s a (very big) system of linear equations, but the concepts are the same as a 2 equation 2 unknown problem.
Let’s say you have a 50 team regional. For each robot at the regional, you make an equation that has 50 variables (let’s call them OPR), each multiplied by the time that robot played with each other team, and you set that equal to total number of points that robots alliance scored over the course of the event. For the robot each equation belongs too, that multiplication factor is the total number of matches that robot played.
For Team 1 that equation would be:
(# Matches Played In)*OPR1+(# Matches Played with Team 2)*OPR2+(# Matches Played with Team 3)+… (# Matches Played with Team 50)*OPR50 = (Total Number of Points Scored by Alliances Team 1 Played On)
For Team 2:
(# Matches Played with Team 1)*OPR1+(# Matches Played In)*OPR2+(# Matches Played with Team 3)+… (# Matches Played with Team 50)*OPR50 = (Total Number of Points Scored by Alliances Team 2 Played On)
etc.
You end up with 50 equations that look like:
11OPR1+2OPR2+0OPR3+1OPR4…+1OPR50 = 607
1OPR1+11OPR2+2OPR3+1OPR4…+0OPR50 = 841
…
0OPR1+1OPR2+0OPR3+0OPR4…+11*OPR50 = 1056
Since you have 50 equations (1 per robot) and 50 unknowns (1 per robot), this is a system you can solve just like the 2 equation 2 unknown problem I started with. What is really cool is most of the time the OPR problem has a unique solution, just like the problem I started with! It won’t have a unique solution if you haven’t played enough matches yet*, because that is like trying to solve:
2X-5Y=3
-4X+10Y=6
Actually finding that solution to a problem with 50 unknowns and 50 equations in a reasonable amount of time isn’t possible by hand. You will learn all about this in college. But in my view at least, knowing that it is the solution to (Times Played With Robot)*(OPR) = (Total Alliance Points). This is a fundamental part of why OPR can be really extreme before a lot of matches have been played because while 1+1=2, 102-100=2 is also true.
*It is for reasons along this line you can’t do OPR for elimination rounds. Since robots are always playing on the same alliance there is not enough information for a unique solution.
EDIT1: Updated “Played” to “Played In”, the factor on the variable that is a given robot’s OPR in it’s equation is the number of matches that robot played in (typically ~10).
EDIT2: If this doesn’t make sense and you’d like it to, either PM me or find your friendly neighborhood math teacher.
I just downloaded it and took a test drive. Very Nice!!!
Thanks
*Another way to explain OPR.
Let’s take the St Joseph High School District event as an example.
http://www2.usfirst.org/2013comp/Events/misjo/matchresults.html
Here is the first row of the Qual Match Data. It shows the first qual match of the event:
11:00 AM 1 3767 3452 4568 453 3572 4835 20 34
In Qual Match 1 shown above, Red Alliance (teams 3767, 3452, & 4568) played Blue Alliance (teams 453, 3572, & 4835), and the Blue Alliance won 34 to 20.
From this one match, there are 2 equations:
OPR3767 + OPR3452 + OPR4568 = 20
and
OPR453 + OPR3572 + OPR4835 = 34
… where OPR3767, OPR3452, etc represent the (as yet unknown) OPR values for those teams
So, for each qual match at the competition, there are 2 equations. And since there were 78 qual matches at this event, there are 2*78 = 156 equations for the entire event.
But there were only 39 teams at the event.
So we have 156 equations and 39 unknown OPR values.
There are two important things about this system of equations:
Each equation is linear (a simple linear combination of the variables), and
There are too many equations for the number of unknowns. This is called an “overdetermined” system of equations. In general, there is no set of values for the 39 variables which will satisfy all 156 equations.
So… instead of trying to solve for the solution (which does not exist), we instead say OK let’s try to find “the best” solution, in some sense of the word “best”.
One of the ways to define “best” is to proceed as follows:
First re-write the 156 equations as
OPR3767 + OPR3452 + OPR4568 - 20 = 0
OPR453 + OPR3572 + OPR4835 - 34 = 0
etc
Notice that all I did was to put everything on the left-hand side. It’s still the same set of equations.
Now plug the proposed “best” solution into the left-hand side of each of the 156 equations and do the arithmetic to get a numerical value of the left side for each equation. Square each of those 156 values, and add all the 156 squared values together.
The solution which minimizes this sum of the squared values is called the “Least Squares” solution, and it is one of the ways to define “best”. It is used extensively in problems like this. There are theoretical reasons for saying that the Least Squares solution is indeed the best solution, under certain circumstances. But the Least Squares definition of “best” is often used even when it is really not the “best”, because the math for computing it is elegant and simpler than for other definitions of “best”.
For computing OPR, using the Least Squares definition of “best” is probably as good as any other method, and since the math is relatively straightforward, it makes sense to use that definition.
If any students are still with me at this point and want “the rest of the story” let me know and I will continue with an explanation of how that system of 156 equations in 39 unknowns becomes the system of 39 equations in 39 unknowns that Ian showed, whose solution will be the Least Squares solution to the 156 equations.