how to give A.I. ????

i’ve made a racing game. I don’t know how to give A.I to opponents. can anyone help me with this. tutorials would help a lot.

For a racing game it would be good to give the car ray sensors that will sense the walls and cause the car to turn one way or the other. This is just a very primitive way to make AI for a racing game. You can adjust it to fit the workings of your game.