Making an AI car that dodges traffic

I am making a racing game where you race an AI opponent across a traffic-filled 3 lane highway, and I’m trying to figure out what would be the best way to make the opponent AI dodge the traffic. Currently I just check what traffic is ahead of the car by reading the position (with some additional checks) and tell the car to turn accordingly, however it often gets stuck between traffic that is too close to eachother or doesn’t turn fast enough. Any help is appreciated.