Thanks man appreciate it!
Yeah I know I tried making the ai better but its hard. Looking back I would've added a dedicated AI library like Yama or something.
For falling off the track, that's intended. Its a similar mechanic to other games like this.