Applying the improved geneticalgorithm, the whole cost of long-short-pile is taken as an objective function. All the constraints are listed following the corresponding specification, a mathematical model of optimal design is established and the corresponding calculation procedure is developed. Meanwhile, a case study about optimal design of long-short-pile composite foundation is given in this paper. The results show that one can optimize design and reduce engineering cost by using this method and the method has the referenced value for engineering designs.