Roasted pistachio nuts are consumed as snack foods and used as ingredients in confectionery, chocolates and ice-cream industries. Response surface methodology (RSM) and Gene Expression Programming (GEP) were used to optimize the roasting process for production of the pistachios in shell, kernel, and ground-kernel forms over a range of temperature (100-180 degrees C) and for various times (10-60 min). The moisture content and color parameters (L, a, b and yellowness index (YI)) were evaluated during roasting and modeled by RSM and GEP. The moisture content changes of the pistachios during roasting were successfully described by RSM and GEP models. The results showed that the L, a and b values could be used as parameters for the development of the predictive models during roasting of in shell pistachios, but the color of kernel and ground-kernel pistachios could be monitored by measuring only a and a, b values, respectively. The quadratic models developed by RSM adequately described the changes in selected color parameters during roasting. The GEP models were found to be slightly better than RSM models. The response surface of desirability function was used successfully in optimization procedure of pistachio nut roasting. (c) 2007 Swiss Society of Food Science and Technology. Published by Elsevier Ltd. All rights reserved.