Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Scouting (http://www.chiefdelphi.com/forums/forumdisplay.php?f=36)
-   -   OPR Formula (http://www.chiefdelphi.com/forums/showthread.php?t=101390)

brennonbrimhall 28-01-2012 15:33

OPR Formula
 
This is going to sound extremely stupid, but what is the formula for OPR?

Thanks in advance.

Tom Line 28-01-2012 16:18

Re: OPR Formula
 
That is not a stupid question.

OPR is actually a system of simultaneous equations. The difficulty lies in solving that many simultaneous equations.

For instance. In a standard district event in Michigan, there might be 80 matches.

Each match has equations that lay out like this:
Robot_1_score+Robot_2_score+Robot_3_score=Red_Scor e
Robot_4_score+Robot_5_score+Robot_6_score=Blue_Sco re

So, in the end you'll have a system with 160 equations, and 40 variables (each robot is one variable, as shown in the equations above). The trick is solving those equations. Until just recently, excel didn't have the firepower to do it unless you used macros. However, with the newer versions, the Matrix formulas are powerful enough to do it. Keep in mind this isn't like algebra - the computer has to iterate to find an answer.

This is not a simple process. It is fairly complicated. Look up "solving simultaneous equations using matrices" in excel, and you should be able to find some examples. That is how we wrote our OPR. It requires pretty in-depth knowledge of excel though. You'll have to understand named arrays, matrix math functions, and array formulas.

2834 the Bionic Barons put out an awesome OPR sheet that handles the calculations through some open-source macro code. It is far more complex (to me) than using matrix formulae, because I have never used macros and vb programming in excel.

Of course, programs like matlab have more advanced equation solvers and you may be able to easily write a program to perform the calculations.

Ether 28-01-2012 16:31

Re: OPR Formula
 
Quote:

Originally Posted by Tom Line (Post 1115348)
So, in the end you'll have a system with 160 equations, and 40 variables (each robot is one variable, as shown in the equations above). The trick is solving those equations.

Tom,

I've done a fair amount of work with large overdetermined systems of equations (20,000 equations in 6,000 variables).

I'd like to play around with some of this data. Maybe I could write and post a small app. Do you know where I could get a couple of CSV, or whitespace-delimited, or fixed-field text files from 2011?

Thanks.


Tom Line 28-01-2012 16:59

Re: OPR Formula
 
I believe you can copy and paste from the old scores on the FIRST website. For instance, here:

http://www2.usfirst.org/2011comp/eve...chresults.html

That is how I developed ours. I've never tried to do the whole web-scrape or download the scores automatically as they are posted by FIRST. If, however, someone could explain how that's done it would be absolutely wonderful!

plnyyanks 28-01-2012 19:07

Re: OPR Formula
 
Quote:

Originally Posted by Tom Line (Post 1115379)
I've never tried to do the whole web-scrape or download the scores automatically as they are posted by FIRST. If, however, someone could explain how that's done it would be absolutely wonderful!

In newer versions of Excel, go to the Data tab, and then click (under Get External Data - left most panel) "From Web". Then, you can put the URL of the results page into the little browser window that pops up and then select the table with match results. To refresh, click "Refresh All" in the Connections pane (still on the data tab).

MagiChau 28-01-2012 19:13

Re: OPR Formula
 
Also, the FIRST FMS system uploads its data in twitter posts under @frcfms so you could scrape a lot more data from that since it tells of penalties point total for instance.

Ether 28-01-2012 19:25

Re: OPR Formula
 
Quote:

Originally Posted by plnyyanks (Post 1115442)
In newer versions of Excel, go to the Data tab, and then click (under Get External Data - left most panel) "From Web". Then, you can put the URL of the results page into the little browser window that pops up and then select the table with match results. To refresh, click "Refresh All" in the Connections pane (still on the data tab).

Is there a CSV or whitespace-delimited or fixed-field text file somewhere that has all the scores from all the matches around the country (world) in one file for 2011?


plnyyanks 28-01-2012 20:38

Re: OPR Formula
 
1 Attachment(s)
Quote:

Originally Posted by Ether (Post 1115456)
Is there a CSV or whitespace-delimited or fixed-field text file somewhere that has all the scores from all the matches around the country (world) in one file for 2011?


How's this? I just threw it together by scraping all the competitions and putting them in one big file.

Also, some fun facts I found:
- there were 5,258 FRC matches played in 2011
- There were 357,981 points scored total
- The average individual alliance score was 34.04 points
- The average total number of points per match was 68.08311145 points
- The highest alliance score was 147 points

brennonbrimhall 28-01-2012 21:01

Re: OPR Formula
 
Many thanks for all the info. Can I assume the same basic principles hold true with DPR as well?

Alex.q 28-01-2012 22:00

Re: OPR Formula
 
Quote:

Originally Posted by MagiChau (Post 1115448)
Also, the FIRST FMS system uploads its data in twitter posts under @frcfms so you could scrape a lot more data from that since it tells of penalties point total for instance.

I was not aware of this. Would someone be able to tap this data during the tournament to feed it into a scouting program? How much information is available there?

Also, I know OPR means offensive power rating, but what does this actually mean?

EricH 28-01-2012 23:03

Re: OPR Formula
 
Quote:

Originally Posted by Alex.q (Post 1115540)
I was not aware of this. Would someone be able to tap this data during the tournament to feed it into a scouting program? How much information is available there?

Also, I know OPR means offensive power rating, but what does this actually mean?

IIRC, OPR is the expected points contribution of any given robot to an alliance.

DPR... I don't think anybody's ever come up with a good way to calculate that. First you have to find a way to calculate a defensive score...

Ether 28-01-2012 23:21

Re: OPR Formula
 
Quote:

Originally Posted by EricH (Post 1115601)
IIRC, OPR is the expected points contribution of any given robot to an alliance.

DPR... I don't think anybody's ever come up with a good way to calculate that. First you have to find a way to calculate a defensive score...

Couldn't you do it the same way Tom said he did the OPR, with the following twist?

Set up the equations like so:

red1+red2+red3 = blue_alliance_score

... then solve the system.

The lower the number, the better the DPR. Like golf.

Ed Law 28-01-2012 23:34

Re: OPR Formula
 
If you want to learn more about OPR, CCWM, DPR, PMR, please refer to

http://www.chiefdelphi.com/media/papers/2174

I will post an updated 2012 version of the presentation file shortly.

EricH 29-01-2012 00:07

Re: OPR Formula
 
Quote:

Originally Posted by Ether (Post 1115630)
Couldn't you do it the same way Tom said he did the OPR, with the following twist?

Set up the equations like so:

red1+red2+red3 = blue_alliance_score

... then solve the system.

The lower the number, the better the DPR. Like golf.

Possibly. The hardest part about DPR is that a low blue_alliance_score could come from two possible sources. It could be that one or more red robots are playing really good defense. But, it could be that the blue alliance has a very low combined OPR (read: needs better offense even without defense being played). Without having an OPR-to-score comparison built in, there is no real way to determine whether red is playing good defense or blue is playing bad offense.

You might be able to do it with

red1+red2+red3 = blue_alliance_OPR - blue_alliance_score

and the higher the score the better (due to the OPR-score) but that involves knowing the blue alliance's combined OPR.

Ed Law 29-01-2012 00:48

Re: OPR Formula
 
Quote:

Originally Posted by EricH (Post 1115676)
Possibly. The hardest part about DPR is that a low blue_alliance_score could come from two possible sources. It could be that one or more red robots are playing really good defense. But, it could be that the blue alliance has a very low combined OPR (read: needs better offense even without defense being played). Without having an OPR-to-score comparison built in, there is no real way to determine whether red is playing good defense or blue is playing bad offense.

You might be able to do it with

red1+red2+red3 = blue_alliance_OPR - blue_alliance_score

and the higher the score the better (due to the OPR-score) but that involves knowing the blue alliance's combined OPR.

Numerically, DPR = OPR - CCWM (calculated contribution to winning margin). A team will have high DPR if their CCWM is low or negative comparing to OPR. Low DPR means a team is good in defense. Basically it means they do not allow their opponents to score much.
I do not agree with low DPR is a result of opposing alliance's inability to score. Over a number of matches, those teams with low OPRs will also cause other teams to experience the same thing. A team's DPR will only be higher or lower based on how they perform on average comparing to other teams. Remember OPR, DPR and CCWM are all calculations of that team's calculated contribution.


All times are GMT -5. The time now is 01:32.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi