2020 Component OPR and Match Prediction site

Valor Scout

Personal project to dynamically calculate component OPRs and give match predictions:

viperbotsvalor6800.com/scout

Verified it still works in 2020 this morning now that the first event is underway (Israel)

Background

I have been doing OPR calculations since 2010 when it was just becoming big. (10 years ago.... Where did the time go?) I created an Android app in 2013 using a crappy knock-off Android phone, and 2G service, to dynamically calculate OPRs on the fly and predict match outcomes. Keep in mind, most OPR numbers at the time were posted by Ed Law and Ether on Sunday night in CSV files. TBA didn't calculate OPR until MUCH later.

Now, 10 years later, everyone seems to have OPR calculators and it is instantly available on TBA. New metrics are available, and "generalized" scouting apps are a thing.

So why do I still keep doing this?

  • I enjoy coding and I learned to code via OPR calculations. Wouldn't be here today without it
  • I learn what data needs to be collected to properly assess a match
  • I learn what I need going into a match, and can ask my scout lead for the right data elements

Lastly, I want to clarify that me personally and 6800 does not use OPR as the sole metric for scouting and selection. It is just another datapoint, another reference, that we can use when assessing matches. Use whatever data points you feel add to your existing scouting report

Component OPR

The normal OPR equations take the match schedule and the final scores to generate OPRs:

Ax=B - where A is the matrix representing who played who, and B is the matrix representing the sums of the match scores each team has played in.

What this doesn't capture is penalties, or how those points are broken up. By swapping out the B matrix with different sums, we can capture component OPRs.

Examples:

  • Auto low cells
  • Penalties
  • Teleop Inner cells

TBA (thebluealliance.com) simplified this a few years ago by adding game element counts to their post-match breakdowns. Now, we can obtain how many auto low cells were scored in each match, and use this to calculate the B matrix - therefore allowing us to make a component OPR for auto low cells.

On top of just calculating component OPRs, we can also improve our overall OPR calculation. Instead of using the score of the match in our B matrix for overall OPR, we can add up the component OPRs of each team to obtain an OPR that doesn’t include penalties.

Heck, you can even subtract penalties from OPRs now using this method. TBA reports a robot-by-robot breakdown of climbs and auto starts. Therefore you can swap out the component OPRs for climbing and auto starts with real datapoints and averages instead of estimates. Now your OPR is even more accurate! Tons of cool stuff you can do

Match Predictions

Using component OPRs, you can look at a future match and see a picture of what that alliance *could* be doing. Again, don't substitute this for your own scouting data - use it to enhance it.

I can use the component OPRs to give me a quick look at who scores more in auto, inner vs outer port, who scores more in teleop, etc.

Questions?

Let me know if you have any questions. Site should be live all season. I do not intend to add more features, but things can change - who knows!

18 Likes

This looks like it could be a great resource to a lot of teams, but I can’t seem to load the site. Is anyone else having problems with it?

1 Like

I’m able to access

Couple of notes:
“Climb” looks to be both climb and parking, I’d recommend either adding level rung points and just calling this “Endgame” or swapping parking points for level rung points and keeping the name.
“Auto” looks like it is actually auto cell points, my assumption based on the name was that this would be all auto points, but maybe that’s just me. If you want to keep the names short, a hover-description would be pretty cool. Or just add a page describing what each metric represents and the units.
I think your OPR calculations are missing the level rung points.

I do like the site though! I’m interested in looking more at the match predictions soon.

1 Like

Thanks for the feedback! Site is now updated with a few changes. Should be quicker to load too as my DNS settings were not correct and redirects were taking a LONG time

That was definitely the case. Thank you for catching that!! I was also missing control panel

Added a level rung column, and kept current climb column as is (combined park and hang, but no level rung)

Clarified names of a few columns

Cool, well your values are much closer to mine now, but they are still a bit different and I’m not sure precisely why. Here’s a sheet showing your level rung values compared to mine at ndgf: Viper level rung comparison.xlsx (127.1 KB)

Our values have a pretty strong correlation, but somehow our calculations are different. They are most so for teams 2227, 2472, and 7028 that I have at over 4 points higher than you do. Also notable is that the average level rung contribution seems to be exactly 0.5 points higher for my method than it is for yours.

The biggest discrepancies on the match level are the following 3 matches
blue q 22
blue q 40
blue q 61

These all have:
no hang from blue 1 position
hang from the blue 2 position
no hang from blue 3 position
a level rung
Additionally matches blue q 18, blue q 32, and blue q 41 have this endgame setup, as well as a reasonably large discrepancy between us.

On the red side, it seems we have strong discrepancies for matches where:
hang from red 1
no hang from red 2
no hang from red 3
a level rung

I’m not saying that you are definitively the one that is wrong, but I think something about those cases is different between us. I’ll be investigating my code to see if I mis-handled those cases. I suspect though it’s something on your side since my RMSE seems to be lower than yours.

1 Like

Definitely my bug - just figured out what it was after your explanation.

I was only counting a level truss for 2 robots - I was excluding points for a level truss with only 1 robot.

I changed my logic and re-uploaded - should be updated on the site now. Looking at your spreadsheet, we now have matching numbers

1 Like

I love the fact that these results are updated live. It’s super handy and immediate.

The predictions page can’t really be seen when matches aren’t live (not a weekend). In fact, I haven’t seen a prediction yet, but the image above looks great. It would be interesting if the predictions page could display predictions for a particular match in the past, and you could compare the predictions to the actual results. It could be that the component opr’s and other statistics used to make the predictions continually evolve live, so you can’t get the actual values from just prior to the match being played. Even so, it may prove enlightening to use the current values. Being able to manually type in 6 team numbers may be interesting as well for analyzing potential alliances and how they stack up statistically prior to alliance selections.

Nevermind. Funny. You can still see the predictions after the match. I didn’t realize that you need to press the Red or Blue alliance button to see the predictions.

What do you mean by this? What predictions are you seeing that i’m not?

After you type a team number and press submit, you can click on “Red” or “Blue” to see the component opr prediction breakdown. The score below is the predicted score for that alliance color, but the actual full match score is listed above.

Going to be totally honest - I suck at graphic design and user interfaces. Glad you figured it out!

I used to have text boxes for entering team information but I found I pretty much only used it for the previous and next match, so this automated way suited my needs

are you counting level truss for 3 robots?
Why are your values different than on TBA?

Thanks for doing this

A couple of suggestions:

  • it would be nice to have row number on the tables.
  • general comment for a lot of sites: if you click a column header, have the first sort be descending. Other than penalties, for most of those numbers, you are interested in the high values.

Nice site!!

Yes

Been meaning to do this for a while! Should be a simple fix

And this is why our Community is so amazing!

Thank you

1 Like

@mray190, I just discovered this amazing tool now that the season is over. I’ve been looking everywhere for something that would predict how well our robot would have done. :wink: Unfortunately, match predictions aren’t working for me. Is that just because there are no matches happening or can I still view them somehow?

1 Like

Just want to say I used this site a lot this season. It’s really handy to be able get these values on the fly without having to break out a laptop. (It’s especially great when you’re at one event, but want to stay informed on another event, beyond just seeing match scores) Thanks for making a very useful resource; I hope it continues to be available for future seasons.

4 Likes

It is because there are no matches happening and/or TBA has some weird stuff going on for suspended events.

The match prediction works as follows:

  • Looks up team number you input
  • Checks to see if said team has a match that is coming up that hasn’t been played
  • If that check fails, checks to see if said team has a match that was previously played

My future plans include custom “global” predictions where you can input team numbers yourself and it will take the results from each team’s best tournament.

I definitely have some UI and usability improvements to make - not my strong-point!

Definitely will! Made improvements this year to make it easier to modify year-over-year. 1114’s old scouting databases definitely had an impact!

2 Likes