This paper designs a model based on convolutional neural network to simulate the deflection angle of a driverless car while running. The model is first trained by extracting the features in the images of the training set, and then the simulated car sends the images taken by the on-board camera into the trained model, so that the driverless car can predict the direction and angle according to the real-time road conditions. After testing, the model's judgment loss on the input road condition images during the training process is reduced to 0.3, which enables the driverless car to predict the direction in which it should deflect based on the actual road conditions in the virtual environment.