Open-cell aluminum foams based on the cast A356 alloy were produced by the melt squeezing replication process using NaCl particles as space-holder material. The porosity and compressive mechanical properties of the produced foams, i.e. Young’s modulus, yield strength and energy absorption capacity, were measured under uniaxial compression condition. An artificial neural network (ANN) methodology was then employed to relate the foaming process parameters to the porosity and the compressive mechanical properties. The behaviors of the mechanical properties were predicted against cell size variation at various porosities, and the optimum condition for maximum strength–density ratio was determined. The prediction accuracy of the optimized ANN model was also compared with that of Gibson–Ashby equations. It was shown that there was a good agreement between the experimental and ANN predicted results with mean square error of 0.038; also, the developed ANN model with the optimal architecture of 2-3-6-4 enjoyed more accuracy in prediction of foam’s compressive properties in comparison with the Gibson–Ashby equations.