Abstract The accurate prediction of air temperature is important in many areas of decision-making including agricultural management, transportation and energy management. Previous research has focused on the development of artificial neural network (ANN) models to predict air temperature from one to twelve hours in advance. The inputs to these models included a constant duration of prior data with a fixed resolution for all environmental variables for all prediction horizons. The overall goal of this research was to develop more accurate ANN models that could predict air temperature for each prediction horizon. The specific objective was to determine if the ANN model accuracy could be improved by applying a genetic algorithm (GA) for each prediction horizon to determine the preferred duration and resolution of input prior data for each environmental variable. The ANN models created based on this GA based approach provided smaller errors than the models created based on the existing constant duration and fixed data resolution approach for all twelve prediction horizons. Except for a few cases, the GA generally included a longer duration for prior air temperature data and shorter durations for other environmental variables. The mean absolute errors (MAEs) for the evaluation input patterns of the one-, four-, eight-, and twelve-hour prediction models that were based on this GA approach were 0.564°C, 1.264°C, 1.766°C and 2.018°C, respectively. These MAEs were improvements of 3.98%, 4.59%, 2.55% and 1.70% compared to the models that were created based on the existing approach for the same corresponding prediction horizons. Thus, the GA based approach to determine the duration and resolution of prior input data resulted in more accurate ANN models than the existing ones for air temperature prediction. Future work could examine the effects of various GA and fitness evaluation parameters that were part of the approach used in this study.