Software effort estimation has constituted a significant research theme in recent years. The more important provocation for project managers concerns reaching their targets within the fixed time boundary. Machine learning strategies can lead software management to an entire novel stage. The purpose of this research work is to compare an optimized long short-term memory neural network, based on particle swarm optimization, with six machine learning methods used to predict software development effort: K-nearest neighbours, decision tree, random forest, gradient boosted tree, multilayer perceptron, and long short-term memory. The process of effort estimation uses five datasets: China and Desharnais, for which outputs are expressed in person-hours; and Albrecht, Kemerer, and Cocomo81, for which outputs are measured in person-months. To compare the accuracy of these intelligent methods four metrics were used: mean absolute error, median absolute error, root mean square error, and coefficient of determination. For all five datasets, based on metric values, it was concluded that the proposed optimized long short-term memory intelligent method predicts more accurately the effort required to develop a software product. Python 3.8.12 programming language was used in conjunction with the TensorFlow 2.10.0, Keras 2.10.0, and SKlearn 1.0.1 to implement these machine learning methods.