The study explores the use of a random forest algorithm combined with genetic algorithms for feature selection to predict heart failure patient survival. The research finds that this method increases classification accuracy, achieving a prediction accuracy of 93.36%. The study utilizes a dataset of 299 clinical records, demonstrating the effectiveness of machine learning strategies in early diagnosis and better treatment outcomes for heart failure.