Environmental stressors significantly influence molecular pathways underlying behavioral adaptations in animals. In this study, we integrated game theory and molecular biology to explain molecular interactions regulating mating behavior in guppy fish (Poecilia reticulata), focusing on the expression of androgen receptor (AR) gene, and the melanocortin 4 receptor (MC4r) gene as players. Experimental treatments included varying predator densities (none, low, high) and male competitor intensities (low, high), with gene expression analyzed at four time points (5 minutes, 5 hours, 5 days, and 15 days). MC4r expression showed significant variation at multiple time points post-exposure, with the greatest difference observed 5 hours after exposure to both predator and rival males (P < 0.05). AR gene expression decreased significantly 5 minutes after exposure, especially under high-risk conditions, correlating with reduced reproductive activity (P < 0.05). Subsequently, the Nash equilibrium analysis identified low expression of both genes as the optimal strategy, minimizing energy expenditure under stress. These findings offer novel insights into adaptive molecular responses and propose a framework for integrating game theory into behavioral and ecological studies.