OCCRA
Go to Post Ya know...they created the "RUMOR MILL" for a reason. - Andy Grady [more]
Home
Go Back   Chief Delphi > Competition > Rules/Strategy > Scouting
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-07-2009, 12:04 PM
Zholl Zholl is offline
Registered User
AKA: Chris Sherwood
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Colorado Springs
Posts: 267
Zholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to behold
Help on OPR and DPR

Hi, I'm working on my teams scouting system right now and was wondering if anyone could explain how to calculate OPR and DPR. I realize these might not be the best methods for this years competition, but I want to make sure I have all the bases covered. Since this is our rookie year, no one really has any idea what we're doing here, which is why I'm asking.
  #2   Spotlight this post!  
Unread 02-08-2009, 10:54 PM
Ben Martin's Avatar
Ben Martin Ben Martin is offline
Distance Mentor
FRC #0225 (TechFire)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Pittsburgh, PA
Posts: 497
Ben Martin has a reputation beyond reputeBen Martin has a reputation beyond reputeBen Martin has a reputation beyond reputeBen Martin has a reputation beyond reputeBen Martin has a reputation beyond reputeBen Martin has a reputation beyond reputeBen Martin has a reputation beyond reputeBen Martin has a reputation beyond reputeBen Martin has a reputation beyond reputeBen Martin has a reputation beyond reputeBen Martin has a reputation beyond repute
Re: Help on OPR and DPR

The PDF for this spreadsheet is a good source:

http://www.chiefdelphi.com/media/papers/2174
__________________
TechFire 225 -- Website -- Facebook
Carnegie Mellon MBA '18
Past teams: 234, 1747
  #3   Spotlight this post!  
Unread 02-10-2009, 08:28 PM
Zholl Zholl is offline
Registered User
AKA: Chris Sherwood
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Colorado Springs
Posts: 267
Zholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to behold
Re: Help on OPR and DPR

BMartin, I read through that paper, and I got as far as 2i+j+k+l+m+n=p+q=B and putting that into a matrix with every team, and then was totally lost on Cholesky Decomposition. Is there anyone who can explain the decomposition algorithms to me? I've looked it up, and it's not really anything I've done before. Btw, if it helps, I'm currently in a pre-calc class, and I understand the material as far in as trig, which is what we've been doing the last month or so. Any kind of true calculus will probably be lost on me right now.
  #4   Spotlight this post!  
Unread 02-10-2009, 08:56 PM
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Help on OPR and DPR

Quote:
Originally Posted by Zholl View Post
BMartin, I read through that paper, and I got as far as 2i+j+k+l+m+n=p+q=B and putting that into a matrix with every team, and then was totally lost on Cholesky Decomposition. Is there anyone who can explain the decomposition algorithms to me? I've looked it up, and it's not really anything I've done before. Btw, if it helps, I'm currently in a pre-calc class, and I understand the material as far in as trig, which is what we've been doing the last month or so. Any kind of true calculus will probably be lost on me right now.
You shouldn't have to do ANY calc to do OPR.

For each team

TotalScoreteam = sum over all teams( number of times played with team i * OPR of team i)

So if you had team 1, who played 1 time each with teams 2, 3, 5, and 8 and had a sum of all their scores of 100, then you'd arrange it like:
100 = 4*OPR1 + 1*OPR2 + 1*OPR3 + 1*OPR5 + 1*OPR8

Let's say team 2 played twice with team 13 and once with team 21 in addition to their game with team 1. Their total score was 80. So your second equation is:
80 = 1*OPR1 + 4*OPR2 + 2*OPR13 + 1*OPR21

Notice that in both these equations, you have 4*OPRwhateverTeam. This is because a team plays with themselves once for each game they play.

Once you've got equations worked out for every single team (if you were doing this by hand, anyway), you'd realize that you have n equations (one for each team) with n unknowns (one OPRi for each team). This means that you can construct a matrix. With my examples above, the first 2 lines of the matrix would look like
Code:
[100 | 4 1 1 1 0 0]
[80  | 1 4 0 0 2 1]
[  ... for team 3 ]
[  ... for team 5 ]
[  ... for team 8 ]
[  ... for team 13]
[  ... for team 21]
Hope this helps. Also, if you look for the thread I posted last year (OPR for 2008, I believe it was called), I posted all my C++ code for doing this.

If you get confused, think back to how you build that first equation, and then think of the meaning of that equation: "a team's total score for the whole regional is the sum of the OPRs of its partners, weighted by how many times they played together". For DPR, which I think might work well this year, it would be "The amount of points scored on a team is the sum of the DPRs of its partners, weighted by how many times they played together". Since a slow or poorly-driven robot will tend to get points scored on it, this should have some meaning this year. Most years DPR doesn't matter because what a robot does typically doesn't massively affect how many points its opponents score.

Last edited by Bongle : 02-10-2009 at 08:59 PM.
  #5   Spotlight this post!  
Unread 02-10-2009, 09:35 PM
Zholl Zholl is offline
Registered User
AKA: Chris Sherwood
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Colorado Springs
Posts: 267
Zholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to behold
Re: Help on OPR and DPR

Thanks for the quick reply. I think I get it, but I'll have to play around with it a little bit. I'm actually hoping I can have a system by Saturday, since we've got a local scrimmage going on and I'd like to train scouts there. Also, I'll see if I can track down that code from last year. That might help even more. Thanks again.
  #6   Spotlight this post!  
Unread 02-13-2009, 08:46 PM
Zholl Zholl is offline
Registered User
AKA: Chris Sherwood
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Colorado Springs
Posts: 267
Zholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to behold
Re: Help on OPR and DPR

So will it work if, when I go to solve for [A]{x}={B} I change it to {x}={B}/[A]^-1?
  #7   Spotlight this post!  
Unread 02-15-2009, 07:03 PM
Zholl Zholl is offline
Registered User
AKA: Chris Sherwood
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Colorado Springs
Posts: 267
Zholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to behold
Re: Help on OPR and DPR

Perhaps I should ask a different question...
Ok, so if I take, for example, the TBA data from 2008's Suffield Shakedown and create matrix A based on the number of matches each team played on an alliance with each other team and matrix B is the total combined score of each of the alliances team x played on. I then took the inverse of A and found BA^-1. So would this, then, be correct?

Code:
Team #     OPR
40            -5.335839956
88            -10.9064837
125          1.874189107
126          20.9022442
173          16.1766485
175          23.76233256
176          13.22479694
177          -28.94649135
178          33.50075682
181          5.801247409
195          7.939442306
228          5.275340498
230          30.37857031
236          24.79561887
348          8.741658516
500          -1.772256265
571          5.296173934
716          4.886654548
839          19.84073344
999          2.339548465
1027        15.69966416
1071        -6.45134427
1099        -3.094166838
1124        14.84119862
1373        13.59377354
1784        17.20806737
1991        -12.38365654
2064        0.156682971
2067        4.862487992
2170        19.44734797
  #8   Spotlight this post!  
Unread 02-15-2009, 08:28 PM
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Help on OPR and DPR

Quote:
Originally Posted by Zholl View Post
Perhaps I should ask a different question...
Ok, so if I take, for example, the TBA data from 2008's Suffield Shakedown and create matrix A based on the number of matches each team played on an alliance with each other team and matrix B is the total combined score of each of the alliances team x played on. I then took the inverse of A and found BA^-1. So would this, then, be correct?
[/code]
You don't need a second matrix. Here are the three bits you need:
Matrix A: you've got this: the (i,j)th element is how many times team i played with team j
Vector S: This is a vector where the jth element is a sum all of team j's scores.
Vector OPR: This, once solved for, is the OPR for each team. The i'th element is the OPR of team i.

So you've just got to solve:
A*OPR = S

Which would result in:
OPR = A-1S

So yeah, I think your math is correct so long as by "matrix B" you meant "vector B".

Last edited by Bongle : 02-15-2009 at 08:31 PM.
  #9   Spotlight this post!  
Unread 02-15-2009, 09:21 PM
Zholl Zholl is offline
Registered User
AKA: Chris Sherwood
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Colorado Springs
Posts: 267
Zholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to behold
Re: Help on OPR and DPR

If what you're calling a vector is what I'm considering to be just an nx1 column matrix where each line in this case is just a total score, then yes, I think "Matrix B" is "Vector B," though a confirmation would be appreciated. If that is the case, then I'd just like to say, WHOO!!! Because if I'm understanding you, then the worst part of setting this up should be over!

EDIT: I just looked up vectors, in which case, I've got it figured out. Thanks for checking my work over Bongle, as well as helping me get my terms straight. Now all I have to do is implement a system for it, which aught to be cake after all of this. Thanks again Bongle for helping me get things straight, and Martin for getting me going in the first place. I'll see you guys in Atlanta

Last edited by Zholl : 02-15-2009 at 09:46 PM.
  #10   Spotlight this post!  
Unread 02-16-2009, 06:54 AM
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Help on OPR and DPR

Quote:
Originally Posted by Zholl View Post
If what you're calling a vector is what I'm considering to be just an nx1 column matrix where each line in this case is just a total score, then yes, I think "Matrix B" is "Vector B," though a confirmation would be appreciated. If that is the case, then I'd just like to say, WHOO!!! Because if I'm understanding you, then the worst part of setting this up should be over!

EDIT: I just looked up vectors, in which case, I've got it figured out. Thanks for checking my work over Bongle, as well as helping me get my terms straight. Now all I have to do is implement a system for it, which aught to be cake after all of this. Thanks again Bongle for helping me get things straight, and Martin for getting me going in the first place. I'll see you guys in Atlanta
Vector, column matrix, it's all the same. Though I'm sure someone else will come and point out that it isn't.
  #11   Spotlight this post!  
Unread 02-16-2009, 12:52 PM
Zholl Zholl is offline
Registered User
AKA: Chris Sherwood
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Colorado Springs
Posts: 267
Zholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to behold
Re: Help on OPR and DPR

Quote:
Originally Posted by Bongle View Post
Vector, column matrix, it's all the same. Though I'm sure someone else will come and point out that it isn't.
Eh, as long as it works
Anyway, I'll try and have a beta version of my system up by the end of the week for people to look at. That way I can maybe get some advice on how to tweak it.
  #12   Spotlight this post!  
Unread 03-08-2009, 07:31 PM
kirtar kirtar is offline
Alumnus
FRC #0461 (Westside Boiler Invasion)
Team Role: Alumni
 
Join Date: Jan 2008
Rookie Year: 2007
Location: West Lafayette, IN
Posts: 169
kirtar will become famous soon enough
Re: Help on OPR and DPR

Somewhat resurrecting a dead thread but.... Does the matrix on that sheet even work with Cholesky Decomposition? I entered it into Mathematica and an online calculator and both returned errors (possibly because of those zeroes in there...). If the reason is because of the zeroes, won't that not work because you're not going to be playing with every team and there will be some zeroes in the chart (then again, since I don't exactly understand how the decomposition works, I could easily be very wrong).

Also, for those using inverse matrices, what happens when the matrix does not have an inverse ? Don't think it'll happen, but, it's a possibility (btw the example on the posted sheet also does not have an inverse). Even better... If we're keeping track of relatively detailed robot performance anyways, does it even matter?
__________________

Last edited by kirtar : 03-08-2009 at 07:37 PM.
  #13   Spotlight this post!  
Unread 03-08-2009, 10:42 PM
Ed Law's Avatar
Ed Law Ed Law is offline
Registered User
no team (formerly with 2834)
 
Join Date: Apr 2008
Rookie Year: 2009
Location: Foster City, CA, USA
Posts: 755
Ed Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond repute
Re: Help on OPR and DPR

Quote:
Originally Posted by Zholl View Post
Perhaps I should ask a different question...
Ok, so if I take, for example, the TBA data from 2008's Suffield Shakedown and create matrix A based on the number of matches each team played on an alliance with each other team and matrix B is the total combined score of each of the alliances team x played on. I then took the inverse of A and found BA^-1. So would this, then, be correct?

Code:
Team #     OPR
40            -5.335839956
88            -10.9064837
125          1.874189107
126          20.9022442
173          16.1766485
175          23.76233256
176          13.22479694
177          -28.94649135
178          33.50075682
181          5.801247409
195          7.939442306
228          5.275340498
230          30.37857031
236          24.79561887
348          8.741658516
500          -1.772256265
571          5.296173934
716          4.886654548
839          19.84073344
999          2.339548465
1027        15.69966416
1071        -6.45134427
1099        -3.094166838
1124        14.84119862
1373        13.59377354
1784        17.20806737
1991        -12.38365654
2064        0.156682971
2067        4.862487992
2170        19.44734797
There must be something wrong with your calculation. I put in all the data into my spreadsheet and I got different numbers. I have attached the spreadsheet for your review.

I have been posting 2009 FRC results with OPR and CCWM at the link below.
http://www.chiefdelphi.com/media/papers/2174

Starting from week 3, you can use it during each regional and just press one button to get updated OPR and CCWM information for that regional provided you have internet access. The source code to calculate OPR and CCWM is in there also. I don't invert matrix since it is not necessary. I use Cholesky Decomposition which is included with the source code. If you have any questions, please let me know.

Ed
Attached Files
File Type: zip Suffield Shakedown.zip (33.1 KB, 74 views)
__________________
Please don't call me Mr. Ed, I am not a talking horse.
  #14   Spotlight this post!  
Unread 03-08-2009, 10:51 PM
Ed Law's Avatar
Ed Law Ed Law is offline
Registered User
no team (formerly with 2834)
 
Join Date: Apr 2008
Rookie Year: 2009
Location: Foster City, CA, USA
Posts: 755
Ed Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond repute
Re: Help on OPR and DPR

Quote:
Originally Posted by kirtar View Post
Somewhat resurrecting a dead thread but.... Does the matrix on that sheet even work with Cholesky Decomposition? I entered it into Mathematica and an online calculator and both returned errors (possibly because of those zeroes in there...). If the reason is because of the zeroes, won't that not work because you're not going to be playing with every team and there will be some zeroes in the chart (then again, since I don't exactly understand how the decomposition works, I could easily be very wrong).

Also, for those using inverse matrices, what happens when the matrix does not have an inverse ? Don't think it'll happen, but, it's a possibility (btw the example on the posted sheet also does not have an inverse). Even better... If we're keeping track of relatively detailed robot performance anyways, does it even matter?

Because of the way our matrices are assembled, as long as every team has played at least one match, the matrix is invertable. That is because the diagonal terms are the number of matches that team played, which is why OPR can not be calculated until you have some matches done. Otherwise you will have some zeroes at the diagonal terms and it will make your matrix become singular and can not be inverted.

Ed
__________________
Please don't call me Mr. Ed, I am not a talking horse.
  #15   Spotlight this post!  
Unread 03-08-2009, 11:54 PM
Zholl Zholl is offline
Registered User
AKA: Chris Sherwood
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Colorado Springs
Posts: 267
Zholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to beholdZholl is a splendid one to behold
Re: Help on OPR and DPR

Ed, I don't have access to a computer with Excel at the moment, so I figure I might ask if you're referring to the 2009 or the 2008 Suffield Shakedown. I ran those numbers with the data on TBA for the 2008 Shakedown.

Oh, also, a note on how I'm running my calculations. In Excel, I created the matrix of the matches played with each team, took the inverse of it, and multiplied it by the total score vector as was my understanding and as Excel allowed. I have the file here on my thumb drive, so I've uploaded the spreadsheet here.It should be on a sheet named Match Matrix, I believe, though I don't know if the test matrix is in there. There should be vectors in there as well to enter the scores for OPR, the margins, and it should spit out WM and OPR next to them. I think I just used letters to label them, and can't remember using anything really obscure, so they should be easy to identify. If my test matrix isn't there, there will be an empty matrix for match data, and then it'll spit out its inverse next to it or below it. I've done both, and can't be sure which...
If I've done something wrong, it'd most likely be in the math there, I'd think.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cero and Electrical Help! marisaDKNY Electrical 2 01-13-2009 08:41 PM
Need help in c++ and windriver jkjohnson C/C++ 3 01-13-2009 05:50 PM
HELP: GIRLS AND ROBOTICS Freddy Schurr General Forum 43 01-23-2006 08:05 PM
Attn: All teams in CT and beyond. Come be scared and help some good causes!! Elgin Clock General Forum 1 10-03-2003 03:10 PM


All times are GMT -5. The time now is 08:51 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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