In order to achieving the Automation of profile optimization and offering more reasonable schemes,the author proposes a kind of computer method based on hereditary algorithm,which is using mathematic methods to simplify the profile lines as a list of points and using cut-fill gross as aim's function and using restriced conditions to control the profile lines,the authors optimize the list of points of changing slopes,the results of the method are more accurate than the artificial design and can provide many kinds of schemes within short time.In the actual projects we can properly increase the condition restraints to design more high-quality lines.If GIS platform is added to it,the profile can be optimized more effectively and more intuitionisticly.