First Place Solution in Fall 2024 Simulation Racing Series
Written by Derek Chen, Dylan Hackos, Anthony Wen, and Ron Veksler from Burlingame High School.
Github: https://github.com/DerekChen1/ROARCompetition
Table of Contents
Introduction
Our final solution is based on our summer 2024 solution. The final solution consists of optimizations to the existing algorithm and better data visualization tools. A significant amount of effort was also put into a failed new algorithm which is detailed later in the report.
Final Solution
Optimization
Our submitted solution relied primarily on optimizing the existing algorithm. Minor adjustments to section locations around turn 7 gave us better control over the car’s behavior at this point and allowed us to use a constant lookahead point rather than a variable one, which improved reliability and speed. We also made minor changes to the throttle behavior to use a higher 𝚫V before recognizing a high speed change and made minor adjustments to the steering multiplier to ensure the car stayed on target. Overall, our changes resulted in about a three-second improvement over our prior solution.
Graphing Improvements
We improved our debug graphing utility to be able to output a 3D graph with speed on the Z axis using Plotly. Our 3D graph indicates that the problem areas we saw before, notably the issues with the car throttling up when it was supposed to be braking, were actually incredibly minor and likely had an insignificant impact on our lap time.
2D:

3D:

Experimental Solution
Pre-calculated Turns
The majority of our efforts this season were focused on creating a solution that pre-calculated the turns of the track rather than relying on computing the projected radius of approaching turns. We hoped that this would increase the reliability of our solution as the calculated radius of the turn would be more consistent, with the minor benefit of decreasing the number of calculations per tick, as we would no longer be calculating five radii to figure out our throttle response. In order to identify turns, we created a basic program that would identify the beginning, middle, and end of turns by calculating the angle difference and use the Menger Curvature formula to calculate the radius of the turn. The program outputs points shown on the graph below, with the yellow, blue, and green points corresponding to the beginning, middle, and end of the turn.

We then modified the throttle response to take in the distance from the start of the turn, the current speed, and the max deceleration we found using our debug data and use a basic kinematic equation (Vf2=V02+2a𝚫X) to find the braking distance needed to reach the maximum speed the upcoming corner allowed. The algorithm would then command the car to brake when the calculated braking distance was greater than the distance to the corner. While the car’s deceleration when it begins braking is non-linear, we felt that the time it took to reach maximum deceleration was insignificant and wasn’t worth the effort to find the jerk (change in acceleration) during this period. However, a potential improvement to this algorithm would be utilizing an equation that included jerk to find the distance needed to brake, as well as improving the accuracy of the maximum deceleration value.
While this algorithm offers a number of theoretical benefits over the existing solution, we found that it was more difficult to tune, and we still encountered the issue we found in the existing solution, where the car would accelerate before a corner when it should have been braking. This solution did not run faster than our existing solution, achieving a fastest time of 327.35 seconds. While we did not use pre-calculated turns in our final solution, we still decided to include this version of our solution in our GitHub repository in the hopes that the knowledge we gained from this solution could be used in another project.
Conclusion
We would like to thank Mr. Huo Chao Kuan, Dr. Allen Yang, Aaron Xie, and the rest of the team at UC Berkeley for their time and effort in running this competition. This competition has once again been an enjoyable and educational experience, and we are excited to see what future competitions hold.