In this study, for the first time, we introduce the application of reinforcement learning—a state-of-the-art machine learning technique—to optimize systemic treatment strategies for patients with epidermal growth factor receptor (EGFR)-mutant advanced NSCLC, aiming to maximize progression-free survival. This evidence concerns the gene EGFR and non-small cell lung carcinoma.