Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting (http://www.chiefdelphi.com/forums/showthread.php?t=75272)

SteveGPage 13-03-2009 12:16

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
Quote:

Originally Posted by Killraine (Post 835479)
So in time for Chesapeake?

Yes, that is my plan! If I can't get a release on CD by then, I plan on having a working copy on my machine. Just come and find me in the stands on Friday and I'll be happy to either share the app, or at least be able to share the results with you. I try and sit in the upper section of the stands - to the right of the field (near the air exchange vents - which has an outlet to plug into!)

Steve

Joe Ross 14-03-2009 09:30

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
With v6, I was not able to get predictions for the Los Angeles regional (CA). Am I doing something wrong, or did is something on FIRST's side screwy?

Bongle 14-03-2009 10:11

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
1 Attachment(s)
Quote:

Originally Posted by Joe Ross (Post 835761)
With v6, I was not able to get predictions for the Los Angeles regional (CA). Am I doing something wrong, or did is something on FIRST's side screwy?

Sorry, v6 has a bug with predictions. I'll upload a fixed version soon.

Edit: v7 now up. The only external improvement (I think) is that predictions are fixed and now work mid-way through a regional.
Edit2: Fixed a parsing issue with single-digit teams.

The Lucas 14-03-2009 11:49

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
Quote:

Originally Posted by Bongle (Post 835768)
Sorry, v6 has a bug with predictions. I'll upload a fixed version soon.

Edit: v7 now up. The only external improvement (I think) is that predictions are fixed and now work mid-way through a regional.
Edit2: Fixed a parsing issue with single-digit teams.

Can you release the source as well?

I m looking into giving it a run offline option (-o) in case there is no internet publically available at the Philly regional. I am thinking about saving all the html results files in a local directory structure (instead of the temp file). That way on Sat I can update the html file by hand and keep re running the calc. I am not sure if I will have time to get this working or not

Thanks,
Brian

Bongle 14-03-2009 11:52

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
1 Attachment(s)
Quote:

Originally Posted by The Lucas (Post 835777)
Can you release the source as well?

I m looking into giving it a run offline option (-o) in case there is no internet publically available at the Philly regional. I am think about saving all the html results files in a local directory structure (instead of the temp file). That way on Sat I can update the html file by hand and keep re running the calc. I am not sure if I will have time to get this working or not

Thanks,
Brin

See attached.

SteveGPage 15-03-2009 11:14

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
1 Attachment(s)
Quote:

Originally Posted by SteveGPage (Post 835483)
Yes, that is my plan! If I can't get a release on CD by then, I plan on having a working copy on my machine. Just come and find me in the stands on Friday and I'll be happy to either share the app, or at least be able to share the results with you. I try and sit in the upper section of the stands - to the right of the field (near the air exchange vents - which has an outlet to plug into!)

Steve

We were able to finally get OPR+ and DPR+ values calculated from the equation that Bongle and I had both posted. Attached is the perl script that my son and I were able to get together this weekend.

Usage: cmd line: perl scouteval.pl {qualmatch}.txt ---- which will create a file called results.txt, and where {qualmatch} is the file created from the usfirst match results page, copied into a text file. Then use whatever software you use to solve the matrix for the team OPR+ and DPR+ values.

The OPR+ and DPR+ values (sorted by OPR+), as calculated for the DC regional, is as follows:

Code:

Team Number        OPR+        DPR+
118        78        38
2199        72        6
116        68        44
1731        66        32
1712        66        26
176        64        8
2068        62        32
1629        60        28
836        60        18
2961        58        26
2964        56        50
181        56        34
597        54        40
122        54        22
1418        54        10
45        52        54
1872        52        30
449        52        20
401        50        36
365        48        0
3046        46        34
1446        46        12
1915        44        36
272        42        34
339        42        26
587        42        26
611        42        12
2913        40        28
709        40        26
2914        40        16
53        40        16
1900        36        32
1748        36        8
620        34        16
1123        32        26
357        32        24
2819        30        40
1522        30        12
234        30        6
2911        30        0
346        28        8
538        26        18
2377        26        10
615        24        22
1719        22        46
768        22        26
1793        22        22
2962        20        12
7        20        12
2421        20        -4
1849        18        6
623        18        -10
614        18        -14
1111        16        6
2963        14        2
1727        12        28
2912        12        4
2900        10        2
1370        10        0
2121        8        -2
1885        8        -6
1279        6        26
2729        6        -4
2537        2        34
1699        -16        16

A couple of things I noticed, if you run the OPR+/DPR+ numbers with incomplete data, the numbers will look wrong, but relative sorting will be pretty close - but expect numbers like +800 to - 800. When all of the matches finish, the numbers should settle out to values like above. Also, we noticed that we could predict the outcome of the elimination matches about 65-70% of the time.

We are working to automate the process.

Let me know what you think!

Steve

martin417 16-03-2009 11:03

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
I get this error when I run Oprnet on some regionals. (BAE for one) I know Peachtree and SanDiego work, but haven't found others that do yet.


Quote:

Downloaded 34342 bytes
File download complete
Parsing!
No matches found. This regional may not have run yet, or may have HTML output that the parser does not recognize.
Failure to parse XML. Code: -2147467259

Bongle 16-03-2009 11:33

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
Quote:

Originally Posted by martin417 (Post 836738)
I get this error when I run Oprnet on some regionals. (BAE for one) I know Peachtree and SanDiego work, but haven't found others that do yet.

Look at the FIRST-provided results for BAE. They don't exist for the qualification matches, and so OPRNet cannot run. Some people in this thread have written parsers that work with TBA results, which are posted. Check the whole thread and see if there is an app posted that can read TBA results.

JesseK 16-03-2009 13:13

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
Quote:

Originally Posted by Bongle (Post 836750)
Look at the FIRST-provided results for BAE. They don't exist for the qualification matches, and so OPRNet cannot run. Some people in this thread have written parsers that work with TBA results, which are posted. Check the whole thread and see if there is an app posted that can read TBA results.

Part of the reason I extended my program to pull from multiple sources was to eventually put all of the data into a standardized, formatted .csv file that any program or Excel sheet could read. That way, we could pass around a master file with our programs for those who do not have the internet immediately available (or are blocked by a firewall for whatever reasons).

The format for a line will be something like

REG_CODE,MATCH_NUM,RED_1,RED_2,RED_3,BLUE_1,BLUE_2 ,BLUE_3,R_SCORE,B_SCORE

Where REG_CODE is the usfirst.org regional code. There will be 1 line for every match at every regional (roughly 48*76 = 3648 lines). Once the matches are verified I'm also going to put in a new 'feature' that writes the parsed lines directly into the Java source code for the next time the code is compiled (which is often for me since I use a similar program to do my Fantasy FIRST picks). The order it will check for valid data is source code --> local parsed file --> local html file --> usfirst.org --> tba.net ... and it will go until it finds valid data. Buckeye data still isn't up though, so I wonder what we'll have to do to get those scores :confused:

Then, eventually I'll put a scouting layer on top of that so you can input data into it at a regional. Then, I'll make a simple version of this input, so someone can input it via PDA, iPhone, or whatever other touchpad technology comes available. This part won't happen publicly till the offseason though.

I've been away from it for a few days since I was at the FL regional, but now it's back to work to have it done in time for Atlanta.

-- edit -- Ooh and a w00t to Greg Marra and crew for simplifying the tba.net urls for each regional and year!

martin417 16-03-2009 17:58

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
1 Attachment(s)
I ran through all the regionals that worked (three didn't) and put each one on a spreadsheet. I also combined tham all into one sheet (master). hope this is useful to teams.

Lil' Lavery 16-03-2009 18:09

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
Quote:

Originally Posted by SteveGPage (Post 836144)
We were able to finally get OPR+ and DPR+ values calculated from the equation that Bongle and I had both posted. Attached is the perl script that my son and I were able to get together this weekend.

Usage: cmd line: perl scouteval.pl {qualmatch}.txt ---- which will create a file called results.txt, and where {qualmatch} is the file created from the usfirst match results page, copied into a text file. Then use whatever software you use to solve the matrix for the team OPR+ and DPR+ values.
Spoiler for length:

The OPR+ and DPR+ values (sorted by OPR+), as calculated for the DC regional, is as follows:

Code:

Team Number        OPR+        DPR+
118        78        38
2199        72        6
116        68        44
1731        66        32
1712        66        26
176        64        8
2068        62        32
1629        60        28
836        60        18
2961        58        26
2964        56        50
181        56        34
597        54        40
122        54        22
1418        54        10
45        52        54
1872        52        30
449        52        20
401        50        36
365        48        0
3046        46        34
1446        46        12
1915        44        36
272        42        34
339        42        26
587        42        26
611        42        12
2913        40        28
709        40        26
2914        40        16
53        40        16
1900        36        32
1748        36        8
620        34        16
1123        32        26
357        32        24
2819        30        40
1522        30        12
234        30        6
2911        30        0
346        28        8
538        26        18
2377        26        10
615        24        22
1719        22        46
768        22        26
1793        22        22
2962        20        12
7        20        12
2421        20        -4
1849        18        6
623        18        -10
614        18        -14
1111        16        6
2963        14        2
1727        12        28
2912        12        4
2900        10        2
1370        10        0
2121        8        -2
1885        8        -6
1279        6        26
2729        6        -4
2537        2        34
1699        -16        16

A couple of things I noticed, if you run the OPR+/DPR+ numbers with incomplete data, the numbers will look wrong, but relative sorting will be pretty close - but expect numbers like +800 to - 800. When all of the matches finish, the numbers should settle out to values like above. Also, we noticed that we could predict the outcome of the elimination matches about 65-70% of the time.

We are working to automate the process.

Let me know what you think!

Steve

I love sabremetrics, OPR/DPR, +/-, and stats in general. I was excited for these OPR+ and DPR+ numbers. But unfortunately, just from looking at them, I can tell we might have taken it a step too far and they might have become less accurate.
The fact that my former team, 116 is ranked 3rd at the event should be the first indicator (as well as the ranks of 45, 365, and 234 being so low), despite struggling to score the entire regional. I don't have the raw OPR numbers handy (on my Mac), so I can't give detailed comparisons between the rankings, but judging by these, I think it may have become less accurate to what the team's real performance was.

SteveGPage 16-03-2009 21:42

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
Quote:

Originally Posted by Lil' Lavery (Post 836924)
I love sabremetrics, OPR/DPR, +/-, and stats in general. I was excited for these OPR+ and DPR+ numbers. But unfortunately, just from looking at them, I can tell we might have taken it a step too far and they might have become less accurate.
The fact that my former team, 116 is ranked 3rd at the event should be the first indicator (as well as the ranks of 45, 365, and 234 being so low), despite struggling to score the entire regional. I don't have the raw OPR numbers handy (on my Mac), so I can't give detailed comparisons between the rankings, but judging by these, I think it may have become less accurate to what the team's real performance was.

I have similar concerns. Last night I ran every regional that we had numbers for. I had hoped to create a combined "top 25" list from every regional, until I saw which teams rose to the top, and which teams did not. I did a double check on TBA to see how these teams had actually performed, and was surprised that teams in some regionals - such as WI, NYC, and Oregon - were showing up on the top despite the fact that many had only moderate records, and did not appear to be high scorers. Some regionals, the numbers corresponded with what I expected, but other regionals, the numbers did not. The one factor that I'm still not sure about, and perhaps you can help me with this Sean - the team scores are not only the robot - so the purpose of this equation was designed to look at not only how effective the robot is, but also how well the HP does, too.

During DC, I had my scouts do extensive scouting on each match, looking at how many MRs each scored, and how many MRs were scored on them (developing a match by match +/-). What I failed to do, was to have them track the HP and how many SCs the team delivered to the HP, both of which had profound impact on the game. If I just looked at the performance of each robot, 45, 365, and 234 were on the top of my list. But I knew from observations that 2199's HP was deadly, and 118 had the ability to get at least 2 SCs exchanged. So I wonder if there isn't some aspect of the OPR+ calculation relying on those other factors, and not just how effective the robot is.

I'm going to run these numbers (looking at all three factors - robot, HP and SCs) while we are in the midst of the competition at Chesapeake this weekend to see if I see any trends. Perhaps this equation isn't going to give us the info we are looking for, but I still want to run some additional numbers to see how they do.

Best regards,

Steve

AlexD744 16-03-2009 22:08

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
It was perfect because we were #1 after Friday. And therefore it must have been the best tool ever. Just Kidding, however, it really did help in our meeting. It confirmed that KRUNCH was as amazing as we thought.

SteveGPage 16-03-2009 22:45

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
Quote:

Originally Posted by AlexD744 (Post 837053)
It was perfect because we were #1 after Friday. And therefore it must have been the best tool ever. Just Kidding, however, it really did help in our meeting. It confirmed that KRUNCH was as amazing as we thought.

The numbers you are referring to, are the OPR/DPR numbers. The numbers that we are talking about are the OPR+/DPR+ numbers - which, yes, I know don't look a lot different! :)

I pulled the data from FL, and ran the calculation for the finals, using the OPR+ and DPR+ numbers. Here are the results ...
First, averaging the score across all three finals matches, the avg Red score was 74 and the avg Blue score was 84.
I plugged the calculated values into the OPR+ and DPR+ formulas, and here is the outcome Red 68, Blue 90. An 8% difference for Red and a 7% difference for Blue between the predicted values and actual values. Penalties, which are not considered in the calculations, could easily account for that kind of discrepancy.

In doing so, one thing became obvious, the OPR+ number can not be taken into consideration by itself, but must be linked with the DPR+ number - but not simply by adding them together - but in the separate calculations of Red vs Blue Score. I'm going to do some additional modelling of the data to see how we can get a combined ranking value.

I am going to run additional calculations at other regionals and see how they correspond.

Steve

andrew418 17-03-2009 16:10

Re: Easy to use Offensive Power Rankings (OPR) program for mid-regional scouting
 
Hi, I've been trying to access the ratings for the Dallas regional, and the program has not been able to parse the html data. Does anyone know why?


All times are GMT -5. The time now is 00:38.

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