Wednesday, September 25, 2019

Judging Track Styles

For a while now, I've been organizing tracks on my web site by the play style those tracks tend to favor.  In this case I'm judging tracks along the race-from-the-front and race-from-the-back axis of broad strategic choices.  All other things being equal, some tracks are just easier to hold a lead on than others.

Besides being interesting information, I like to use this data when picking tracks to use in a series.  Picking different kinds of tracks keeps the racing interesting from race to race.  I've also noticed that some drivers are just better at different strategic styles so a variety of tracks helps to keep the competition fair for everyone.

I've updated the table and some of the calculations that go into some of the scores.

How to Read the New Table
There is a lot of information below and in the key at the bottom of the track listing, but the top line are Raw Score and Adjusted Score.

Raw Score is my best guess based on results and Track Score of how a track favors play from the front (negative numbers) and play from the back (positive numbers).  A score over 1 or under -1 are suggestive of a strong lean.  Scores closer to zero are pretty balanced (or could favor middle strategies).

Adjusted Score is basically the same thing but relative to all the other tracks,  So where raw score tries to objectively describe a track, Adjusted Score is comparing that track to all the others.  Interestingly, there is less variation in those two things after using my new Layout Score than there used to be.

Measuring Tracks Based on Results
Ideally I score tracks based on actual race results from organized play.  In a perfect world I would ask each driver before the race how they were approaching the race strategically... instead I find proxies.  The two proxies I work with are qualifying position and start speed.

Qualifying position is an obvious stand-in for strategy.  Race from the front strategies like to start out front.  However, its not perfect.  There are times you make a pole bid hoping to end up one place only to end up somewhere completely different.

Start speed is another decent proxy in my view.  Race from the front people tend to like a 100 start speed.  Again, not always a perfect approach.  I've seen people take the 100 start speed not because they wanted to start with the lead but because they wanted to bid nothing and work up to the mid-field in a couple turns.  Some tracks are also laid out in such a way that 100 start speed may be of minimal value or hugely valuable regardless of overall strategy.

Certainly these two measures can produce mixed signals.  I've seen cars on the front row of a starting grid with a 20 start speed and cars near the back with 100 start speeds.  That said, I think these are decent tools to work with.

Math:
Basically I find the average number of points scored by people who started the race in the front 2 rows ("the front"), middle 2 rows ("middle"), and back 2 rows ("back").  [See the bottom of this page for how I score results.] I do the same for start speeds with "fast" being 100 or 120, "medium" being 60, and "slow" being 20 start speed.

I then figure out how much better front did than middle and how much better back did than middle.  Then I add those two numbers together.  A result of 0 means that middle was best or that neither front nor back seemed to hold an advantage, a negative result means that results favored cars starting in the front 2 rows, a positive result shows that results favored the back 2 rows.  Then I do the same for start speeds... negative results showing the high start speeds did better and positive results showing that the 20 start speeds did better.
( (Qbd-Qfd)*Q + (Ssd-Sfd)*S ) / (Q+S)
Q = the number races where I have data for qualifying
Qbd = Qb - Qm
Qfd = Qf - Qm
Qb = the average points scored by someone starting in the first two rows on this track
Qm = the average points scored by someone starting in the middle two rows on this track
Qb = the average points scored by someone starting in the last two rows on this track
S = the number races where I have data for start speed
Ssd = Ss - Sm
Sfd = Sf - Sm
Sf = the average points scored by someone with a 100 or 120 start speed on this track
Sm = the average points scored by someone with a 60 start speed on this track
Ss = the average points scored by someone with a 20 start speed on this track
In the end this is a track's score if I have enough data to feel good about that.  I'm not sure how many results makes me feel really good about this method, but for now I pretend to feel good at 10 races.

Before I get to 10 races, I also look at some elements of the track layout.  I weight the results score more and more as I get more and more result data.

Measuring Tracks Based on Layout
Finding objective attributes of a track that predict how it will play has proven difficult.  I started with 5 attributes based mostly on gut.  But recently I've reassessed how well those attributes predict actual results and that led me to find new attributes.

Originally I used 1) Long Straights, 2) Corner Density, 3) Width, 4) Longest Straight, and 5) Track Length to concoct a layout score.

Long straights was a weighted count of straights longer than 7 spaces.  Corner Density was the length of the track in spaces divided by the number of corners on the track.  Those two measures were meant to explore how tight and twisty a track is.  Are there a lot of short straights between tightly packed corners?  If so, this could contribute to a race from the front strategy.

For width I measured the percentage of 3-wide track against the total length of the track.  This is all about passing.  Two wide track gets bottled up and blocked a lot easier than 3-wide track.  So a higher percentage of 3-wide should be better for running from behind.

Longest straight and track length are exactly what they say they are.  Race from the front cars tend to buy wear and start speed at the expense of acceleration, deceleration, and top speed.  So long straights can hurt those kinds of cars -- and by extension, racing from the front.  Finally, the shorter the track the easier it should be to hold on to that lead.

However, after updating my data recently I ran some regressions to see how good I my layout scores were at predicting results.  Turns out... not so well.

Y-axis is number of long straights.  X-axis is results score (lower favors play from the front).
Y-axis is corner density.  X-axis is results score (lower favors play from the front).

Y-axis is the length of the longest straight.  X-axis is results score (lower favors play from the front).

Y-axis is the track length in spaces.  X-axis is results score (lower favors play from the front).
Turns out track length, longest straight, corner density and number of long straights really aren't very predictive of how these tracks seem to be playing out.

Y-axis is the % of the track that is 3-wide.  X-axis is results score (lower favors play from the front).
3-wide is better... although the internet tells me that 0.3 is considered a weak correlation so this still isn't terribly predictive.

So I took a bunch of other measures and made up some new ones to try and find more predictive track attributes.  Literally the only thing I could find that hit the 0.3 mark is the number of corners that are 3-wide (for corners that change width I count it as 3-wide if it ends 3-wide).

Y-axis is the number of 3-wide corners.  X-axis is results score (lower favors play from the front).
This makes sense.  Corners are bottlenecks and good opportunities to pass so having more room in the corner, especially the all important exit row, makes sense as something that would assist running from behind.  Interestingly, the raw number of 3-wide corners was more predictive than the percentage of corners that are 3-wide.  This also makes sense... more raw opportunities per lap is better.

I tried creating a new layout score just based on this metric as it had the best fit, but the result included obvious blind spots.  I added back in the percentage of the overall track that was 3-wide and that helped a little but it felt like I needed more attributes to round out this track-based score.  So I went searching for modestly predictive things.

Turns out the number of "medium" straights is more predictive than a lot of other things I can measure.  In this case medium straights means straights that are longer than 3 spaces and shorter than 10 spaces long.  Why?  Because that data ended up being the most predictive.  Why?  No idea.

Y-axis is the number of medium straights.  X-axis is results score (lower favors play from the front).
Finally, I tweaked corner density to make it more predictive by only counting the number of corners that have a speed under 120.  (When I assign a single speed to a corner this way, I use the fastest speed through the corner that is not obviously less efficient than other options.)

Y-axis is track length divided by slow corners.  X-axis is results score (lower favors play from the front).
So I created a new Layout Score based on these 4 things, but I weighed the score so that the first two things counted more than the last 2.

No comments:

Post a Comment