In the present work, it has been suggested that the gene expression programing is a good tool for determination of hardness of metal matrix nanocomposite produced by mechanical alloying (MA). For example, we studied the Al matrix nanocomposite, and to build the models, 35 input-target data were gathered from the literature, randomly divided into 28 and 7 data sets and then were respectively trained and tested by the proposed models. The differences between the models were in their gene number, chromosomes, and head size. The amount of reinforcement, ball to powder ratio, compaction pressure, milling time, reinforcement hardness, sintering temperature, sintering time, and vial speed were 8 independent input parameters. The output parameter was mean hardness of nanocomposites. The results indicate that gene expression programing is a powerful tool for predicting the hardness of the nanocomposite produced by MA.