Simulating dirt track races

Your home for scale slot car oval racing!

Simulating dirt track races

Postby slothead » Wed May 11, 2016 9:28 am

Hello everyone. In another post recently about solo racing I wrote about how I run and time all the cars in a race and then load the data into a program I wrote that simulates all the cars being on the track at the same time. So far I use this for road course races involving up to 20 cars and it's worked well. Running a 20-car 70-lap Trans Am race requires creating a database of 1400 lap times and I love it.

I also plan to use this method for oval races, but there are some complicating factors that I don't have to deal with for road course races. If a car spins out on the road course I simply make a note of it and apply a time penalty for that car on that lap, and in the section of the track where it occurred. For example one section of my road course is called the Loop Turn, and it has an area with reverse banking - cars make a quick left hand turn while losing elevation. If a car comes out of the slot here I assign a time penalty depending on where the car ends up. This can greatly increase that amount of time a car takes to get through the section during the simulation and allows trailing cars to pass it. There are no caution flags and the rest of the field is not effected by any incident.

In oval dirt track racing things are more complicated. When a car spins out in a race at one of the full scale tracks I attend, the yellow flag comes out which slows the field down, the car(s) involved in the incident goes to the rear, and once the field is reassembled there in another running start to resume the race. The restart order is always based on what it was at the last completed lap, which means a pass doesn't count until it's recorded at the start/finish line. A car might pass several others on the back straight but if the caution flag comes out before the lap is scored (completed by the leader) the car will restart behind them. There is also the issue of when the caution flag comes out which determines if the current lap will count or not. If an incident occurs behind the leader(s) sometimes the flagman will hold off with the yellow flag till the leader crosses the start/finish line to move the race along. But I need some standard rules to encode in my program.

I'd appreciate the input of anyone interested regarding the sequence of things in this scenario. Here's my current thinking - if the leader causes the incident the yellow flag comes out immediately and the race pace is slowed, otherwise just slow down the car involved in the incident and let the other cars complete the current lap before the caution period begins. In either case the car responsible for the incident is assigned last place, and everyone who was behind them moves up one position while under the caution. A car's position is determined based on it's official position that last time it passed the start/finish line either to start the race or under green flag conditions. Another issue is should the lap counter be frozen during all caution periods? From my experiences this is always the case in heat and consolation races which are typically only 8 - 12 laps long. Feature races are another issue. At most northeast dirt tracks laps completed under caution only count till the halfway mark, so that a race can never end under caution. I like this arrangement and think I will opt for it, which will mean ignoring a car's recorded lap time on a lap that is under caution during the race simulation, and instead assign all of the cars a pace lap speed once the distance (time) between positions is set.

Am I missing anything?

Slothead
User avatar
slothead
The Doctor is IN!
 
Posts: 1560
Joined: Sun Mar 17, 2013 7:04 pm

Re: Simulating dirt track races

Postby k0z0oo1 » Wed May 11, 2016 10:37 am

I read your other thread and find all of this very interesting. It is very cool that you can race each car, and still have it effect the other cars even though they are not races at the same time.

I think you have the oval short track caution rules pretty well understood, and it seems to me that you have a good system in place to enforce it.

Only suggestion I have if for determining when the caution flag should come out. If the spin happens in turn 1/2 maybe you would allow the lap to be completed... If it happens in turn 3/4 you could revert to the previous lap.

Are you going to run with heat and consolation races to see your feature race?

This is so cool!
User avatar
k0z0oo1
HRW SlotCar Veteran!
 
Posts: 257
Joined: Sat Mar 08, 2014 6:44 am
Location: Wilkes-Barre, PA

Re: Simulating dirt track races

Postby slothead » Wed May 11, 2016 2:53 pm

KOzO

Thanks for your comments. I know what I do is odd and obsessive, but it's my response to not having racing buddies and having a passion for cars, racing, and programming.

I've thought about incorporating where an incident occurs into the decision about when the caution flag comes out. So what you suggest makes sense, but did you state it as you intended to? I'd be more inclined to have the caution period happen immediately if the incident occurs before turn 3, while letting the leader record the current lap before initiating the caution period if the incident occurred from turn 3 through the start/finish line. Is this what you meant? If not please say so because you may have a rationale that hasn't occurred to me.

This is fun and important because while recording lap times for a feature any given car could be poised to make an important pass, be passed, or in a safe position and just need to not make any mistakes during the final few laps. But all I'll know while recording lap times is needing to be as fast as possible while not being the cause of a caution period that could mean snatching defeat from the jaws of victory.

For one of my classes, the Super Dirt Series, I have 20 replica northeast modified cars. A full event will consist of 3 heat races of 6 or 7 cars each, a consolation race of cars that finished from 4th place back in the heats, and a feature. The heats will be 10 laps each, the conis will be 12 laps, and the feature will be 35 laps. Cars will earn points for their finished in the heats and consi, and the feature will be inverted based on cumulative series points - last place on the pole and leader in points starting last. All 20 cars will make the feature regardless of how they did in the consolation race.

Slothead
User avatar
slothead
The Doctor is IN!
 
Posts: 1560
Joined: Sun Mar 17, 2013 7:04 pm

Re: Simulating dirt track races

Postby k0z0oo1 » Wed May 11, 2016 5:41 pm

What I was think in line with the cautions...

I have seen the flag man hold out on the caution until the last possible second, and it could work either the way I suggested, or through your way. If a spin happens in turn 1, and is near the front of the field, then they have most of a lap to correct it... And possibly the caution would not be thrown until the leaders cross the line again? Conversely, I see what your saying, and maybe the caution is thrown beforehand... Same could be said for a turn 3/4 spin, just in converse...

Maybe you could incorporate the position of the spun car as opposed to the leader... (Don't know if you could or not)

If they are near the front, the lap continues then yellow afterwards... If they are near the back or the field the caution comes out quicker...

On a side note, I also enjoy the local dirt tracks, and being from Wilkes-Barre, PA I have many options. Within 1-1/2 hours from the house I have Big Diamond, Penn Can, Five Mile Point, Grandview, and Selinsgrove. I don't get to as many races as I used to, but have been to many Super Dirtcar races. I also enjoy the ROC Dirt series. It's fun to see all the drivers "invade" the home tracks.
User avatar
k0z0oo1
HRW SlotCar Veteran!
 
Posts: 257
Joined: Sat Mar 08, 2014 6:44 am
Location: Wilkes-Barre, PA

Re: Simulating dirt track races

Postby slothead » Wed May 11, 2016 10:08 pm

You bring back sweet memories. In the 80's and early 90's I had a popup camper and would go to the races all over the northeast every weekend from April till Labor Day. Orange County Fair Speedway was my home track but I soon preferred to go see the 'invaders' on their home tracks. On trips into PA I'd go to Big Diamond on Friday, Grandview on Saturday, and Penn National on Sunday. On holiday weekends Penn National would run 4 20 lap features - wow, what fun that was. On trips to upstate NY I'd go to Five Mile Point, Fonda, Fulton, or Lebanon Valley on Saturday night and Weedsport on Sunday night. Now that I live in Maine the best I can do is get to Albany Saratoga speedway and Lebanon Valley twice a year or so, and make up for the drought with my slot cars.

Yes, I can have the program take the current position and location of the car involved with a spin into account. One way to do this would be not to have the caution period start automatically when the program encounters a deslot code in the database. (I encode a deslot using something like 'S6_08' after a car's lap time, which the program reads as a Spin in section 6 with a delay of 8 seconds.) A separate part of the program could decide if and how to respond based on numerous factors. Such as, if the last place car spun and posed no hazard to other cars it could be slowed down then resume racing speed with no caution at all. If a car spun in a section with cars behind it the caution could come out immediately. I just remembered Danny Sullivan's 360 degree spin in the Indy 500 when he didn't touch anyone or anything and went on to win the race, so it would pay to be thoughtful about both when and if to bring out the caution flag when there's a spin.

Slothead
User avatar
slothead
The Doctor is IN!
 
Posts: 1560
Joined: Sun Mar 17, 2013 7:04 pm

Re: Simulating dirt track races

Postby slothead » Fri May 13, 2016 11:02 am

I know I'm basically talking to myself here, but it helps me process things and also gives me something to reference when I resume work on the program.

After thinking more about what triggers a caution period in a dirt track race, I realized it's more complicate that I first thought. Basically, I want my program to function like a flagman which means including human-like decision making in the process. It's not a cut and dry thing. What might trigger a caution flag on lap 2 of a feature could be different from what would happen with 2 laps to go. The same goes for where on the track an incident takes place and the position of the car involved. While the primary reason a flagman brings out the yellow flag is to prevent secondary crashes and for safety, a bunch of factors contribute to the decision.

Ideally I'd like to have a conversation with a flagger and discuss the key variables. Since I don't know an experience race track flagman I may resort to watching dirt track videos and keeping track of situation that do or don't lead to caution flags. Another option would be to list all of the contributing factors and cycle through various settings (such as lap number, or position of car involved) and think about which combinations should cause a caution period to occur.

If anyone has flagging experience or knows a flagman willing to share insights, let me know.

Slothead
User avatar
slothead
The Doctor is IN!
 
Posts: 1560
Joined: Sun Mar 17, 2013 7:04 pm

Re: Simulating dirt track races

Postby k0z0oo1 » Fri May 13, 2016 7:47 pm

I was on the same line of thinking, but didn't know if you could incorporate a "human" like decision making in your program.
User avatar
k0z0oo1
HRW SlotCar Veteran!
 
Posts: 257
Joined: Sat Mar 08, 2014 6:44 am
Location: Wilkes-Barre, PA

Re: Simulating dirt track races

Postby slothead » Sat May 14, 2016 10:33 am

One way to humanize decision making is to vary the amount of information or evidence needed to trigger an action. For example, while camping once in central PA a dog at a nearby campsite started barking in the middle of the night. This normally would have been irritating but since the campground owner had mentioned reports of bears in the area it was my signal to go sleep in the truck. The context in which information is evaluated matters.

For my simulation of oval racing I can have various factors contribute to the information available, then vary the threshold at which there is considered to be enough information to trigger a caution period. A spin in turn 1 might be worth 1 point while a spin in turn 4 might be worth 2 points. The leader spinning might be worth 3 points while the last place car spinning might be zero points. The amount of traffic around the car that spun (cars in the same section of track) can also contribute points, with no traffic being worth zero points, and other values being worth several points. Totaling the various types of information points will summarize the current state of affairs. For the early laps in a heat race fewer points might be needed to trigger a caution than on the last lap. A spin in traffic might typically contribute enough points to act, but a spin in turn 4 behind the leader on the last lap might not. Some situations would require a higher threshold depending on who, when, and the type of race (heat, consolation, or feature).

I'm creating a table of factors that will contribute caution points, and another table for race information that will effect the caution threshold to be used under different circumstances. By playing around with values in these tables I should be able to approximate what's going on in a flagger's mind as he decides what to do. I'll also be able to easily tweak the outcomes by modifying values in the tables.

Slothead
User avatar
slothead
The Doctor is IN!
 
Posts: 1560
Joined: Sun Mar 17, 2013 7:04 pm


Return to Oval Racing HQ!



Who is online

Users browsing this forum: No registered users and 3 guests