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)

Tom Line 29-01-2012 00:54

Re: OPR Formula
 
Quote:

Originally Posted by plnyyanks (Post 1115499)
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

Phil, can you explain how you got the info from twitter?

Basel A 29-01-2012 01:02

Re: OPR Formula
 
Quote:

Originally Posted by Ed Law (Post 1115698)
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.

The problem with DPR is that when teams do not play defence, DPR can be unpredictable. While it will take into account offensive hoarding by the team (if applicable), this is not always significant compared to mostly-random fluctuations, including schedule.

Occasionally, DPR will take into account non-random factors other than the team's robot, though. In 2011, a team's human player could play a significant role in determining opponents score. A human player's output (# of tubes thrown) and accuracy (% of tubes picked up by own alliance) definitely affect opponent score, for example. A human player who threw many tubes or wasn't very accurate could result in a team having a high DPR.

In 2012, human players aren't a factor, but hoarding as an alliance strategy certainly is (note that an alliance could control 15 of the 18 balls at a time). A low DPR by a team not playing defence would probably be indicative of such a strategy.

plnyyanks 29-01-2012 08:01

Re: OPR Formula
 
Quote:

Originally Posted by Tom Line (Post 1115700)
Phil, can you explain how you got the info from twitter?

I didn't get it from twitter. I got it from the web based results (with a URL like this: http://www2.usfirst.org/2011comp/eve...chresults.html) by just going through all the event codes and putting it as a parameter in an excel query that would get the data from http://www2.usfirst.org/2011comp/events/event_code/matchresults.htm. Then, I just put them all in the table I posted.

To get this data from twitter, you'd have to use the API, and I'm not sure to go about that. Maybe you could fetch tweets using JSON?

stingray27 29-01-2012 12:18

Re: OPR Formula
 
1 Attachment(s)
Hey guys,

I took what all of you have contributed (great post by the way, very helpful) and constructed an excel file to do RUSH's post-competition analysis, or other competition scouting for states and nationals. So i wrote a macro (not very efficient at those, sorry) and it creates webquery files, obtains the data, and organizes it for however many teams are in the tournament. The only problem I am having is the OPR calculations. Can someone look at my macro and see what they can do about adding an OPR calculation formula or something? Or give me some feedback on how i can improve it cause I really am not too good at these. Thanks.

brennonbrimhall 29-01-2012 15:22

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.

That's along the same lines I was thinking. If you could calculate the opposing score, then you would have your DPR.

Tom Line 29-01-2012 16:20

Re: OPR Formula
 
Quote:

Originally Posted by stingray27 (Post 1115818)
Hey guys,

I took what all of you have contributed (great post by the way, very helpful) and constructed an excel file to do RUSH's post-competition analysis, or other competition scouting for states and nationals. So i wrote a macro (not very efficient at those, sorry) and it creates webquery files, obtains the data, and organizes it for however many teams are in the tournament. The only problem I am having is the OPR calculations. Can someone look at my macro and see what they can do about adding an OPR calculation formula or something? Or give me some feedback on how i can improve it cause I really am not too good at these. Thanks.

Stingray, nice work! I'm going to include that in our OPR this year so we can auto-update it on the fly. Really outstanding.

Ed Law 29-01-2012 23:29

Re: OPR Formula
 
Quote:

Originally Posted by stingray27 (Post 1115818)
Hey guys,

I took what all of you have contributed (great post by the way, very helpful) and constructed an excel file to do RUSH's post-competition analysis, or other competition scouting for states and nationals. So i wrote a macro (not very efficient at those, sorry) and it creates webquery files, obtains the data, and organizes it for however many teams are in the tournament. The only problem I am having is the OPR calculations. Can someone look at my macro and see what they can do about adding an OPR calculation formula or something? Or give me some feedback on how i can improve it cause I really am not too good at these. Thanks.

Hi,

Nice work. If you want your spreadsheet to calculate OPR from the results that you get from the web query, you are welcome to copy any of the macros that I published. I did not put protection on them to allow other teams to use them and customize for their own use. However if that is all you are going to do, I don't see the purpose of it except as a learning process since I publish OPR/CCWM results of every regional and district after each week of competition and I have been doing it for the last 4 years. Please refer to the following white paper.
http://www.chiefdelphi.com/media/papers/2174
You will not see the weekly published spreadsheets from prior years since I delete them at the end of the season and only keep the last one.

Ether 30-01-2012 19:45

Re: OPR Formula
 
1 Attachment(s)
Quote:

Originally Posted by plnyyanks (Post 1115499)
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

Attachment shows OPR, CCWM, & DPR scores obtained by solving the 2052 simultaneous equations obtained for the 2052 teams in that "one big file".

On my 8-year-old computer, it took ½ second to read the file and create the 2052x2052 matrix. It took 19 seconds to factor the matrix and compute OPR, CCWM, and DPR.


DMetalKong 30-01-2012 21:24

Re: OPR Formula
 
1 Attachment(s)
Quote:

Originally Posted by Ether (Post 1116708)
Attachment shows OPR, CCWM, & DPR scores obtained by solving the 2052 simultaneous equations obtained for the 2052 teams in that "one big file".

On my 8-year-old computer, it took ½ second to read the file and create the 2052x2052 matrix. It took 19 seconds to factor the matrix and compute OPR, CCWM, and DPR.


And just for kicks attached is a histogram of the CCWM scores. I find it interesting how normal in shape the distribution is; I would have expected it to have a longer tail on the right than is apparent.

Ed Law 31-01-2012 11:31

Re: OPR Formula
 
Quote:

Originally Posted by Ether (Post 1116708)
Attachment shows OPR, CCWM, & DPR scores obtained by solving the 2052 simultaneous equations obtained for the 2052 teams in that "one big file".

On my 8-year-old computer, it took ½ second to read the file and create the 2052x2052 matrix. It took 19 seconds to factor the matrix and compute OPR, CCWM, and DPR.


Hi Ether,

The numbers you have is slightly different than mine. Do you include elimination round matches?

Your 8-year-old computer must have been quite a powerful computer 8 years ago. Or is there a solver you used that is faster than the Cholesky Decomposition that I used. Here is the statistics that my son got when he was a junior in his independent study math class.

Computer Model Hewlett-Packard HP ProBook 6555b
Platform Mobile
OS Version Microsoft Windows XP Professional
CPU AMD Turion(tm) II P520 Dual-Core Processor
Memory 2807 MB

Here are the data table from tests: (time in seconds)
Size Gauss-Jordan method LU Factorization Cholesky Decomposition
100 0 0 0
300 9 1 0
500 46 8 1
750 159 27 4
1000 383 64 11
1400 1056 178 30
1800 2278 384 63

This was the 2010 data and it took 63 seconds on that slow machine.

Ether 31-01-2012 15:07

Re: OPR Formula
 
1 Attachment(s)
Hi Ed,

The numbers you have is slightly different than mine. Do you include elimination round matches?
I used all the data in the "one big file" that Phil attached to post#8 in this thread. That file contains only raw data (no metadata) so I can't say for certain what Phil included.

@Phil: Can you jump in here and answer Ed's question?

Your 8-year-old computer must have been quite a powerful computer 8 years ago.
Pentium D 3.4GHz 1GB

Or is there a solver you used that is faster than the Cholesky Decomposition that I used.
I also used Cholesky, but all Choleskys are not created equal. There are various implementations. Some are column-oriented and some are row-oriented; some are in-place and some are not. It makes a difference. The one I used is a slightly modified version of one that I selected sometime back in the late 80s after testing several different algorithms from various texts. It's optimized for memory access. The 19 seconds was for a 2052x2052 matrix using double precision (64 bit) floats for the matrix and Intel extended precision 80-bit floats for intermediate calculations.

I just re-ran it with single-precision (32 bit) floats and it took a little less than 12 seconds to factor the 2052x2052 matrix.

1800 2278 384 63
This was the 2010 data and it took 63 seconds on that slow machine.
That's 63 seconds for an 1800x1800 matrix. Since Cholesky goes as O3, that would take ~93 seconds for a 2052x2052 matrix.

How are you computing the results in the "Worldrank" tab in the Team_2834 2011_Scouting_Database Championship v4 spreadsheet? My version of Excel (2000) only has 256 columns - not enough to hold a 2052x2052 matrix. I assume you are crunching the numbers in some other app?

I also computed the OPR & CCWM for the data (qualification matches only) in the link that Tom Line included in his post#4 in this thread. Attached are my results. The columns are Team#, OPR, CCWM, and DPR. If you would run your computation on the same data we could compare apples to apples.



plnyyanks 31-01-2012 15:56

Re: OPR Formula
 
2 Attachment(s)
Quote:

Originally Posted by Ether (Post 1117179)
@Phil: Can you jump in here and answer Ed's question?

You know, I might have actually forgot to put elimination rounds into that file. I forgot that I had to specifically tell excel to import a second table. Attached is a revised version of my entire workbook. Sorry about that, guys.

EDIT:
Quote:

Originally Posted by Ether (Post 1117179)
That file contains only raw data (no metadata) so I can't say for certain what Phil included.

I attached another file that has some more information - regional names, match times, etc

Andrew Schreiber 31-01-2012 16:01

Re: OPR Formula
 
Quote:

Originally Posted by plnyyanks (Post 1117206)
You know, I might have actually forgot to put elimination rounds into that file. I forgot that I had to specifically tell excel to import a second table. Attached is a revised version of my entire workbook. Sorry about that, guys.

Understand that in the twitter feed there is a lot of garbage data too. Various test posts as well as practice matches.

Ether 31-01-2012 16:25

Re: OPR Formula
 
1 Attachment(s)
Quote:

Originally Posted by plnyyanks (Post 1117206)
You know, I might have actually forgot to put elimination rounds into that file. I forgot that I had to specifically tell excel to import a second table. Attached is a revised version of my entire workbook. Sorry about that, guys.

Attached is analysis for the data in the tab named "All Matches", less lines 5526, 5766, 6004, and 6196 (DQ).

Columns are Team#, OPR, CCWM, and DPR


Ed Law 31-01-2012 16:54

Re: OPR Formula
 
Ether,

Your republished numbers are very close to mine now. I also used double precision. My implementation is done in Excel using VBA. I do not actually put the 2053 X 2053 matrix inside the spreadsheet so it works in older version. The program read in the match results and assemble the matrix. It is just stored in the memory for the calculation. Solving the equations inside Excel using VBA is probably slower than outside in another app. Tom Line mentioned they are solving the equations using Excel built-in solver. I am curious what algorithm they use and how fast that would be.

How come you only have 2052 teams? I have 2053 teams in 2011.


All times are GMT -5. The time now is 04:18.

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