This paper proposes a particle swarm optimization with strategy dynamics (SDPSO) to solve single-objective optimization problems. SDPSO consists of four PSO search strategies. Evolutionary game theory is introduced to control the population state. In evolutionary game theory, through the interaction between players, better strategies will eventually dominate among the players. By extending this idea to PSO, a selection mechanism and a mutation mechanism are proposed. By using the selection mechanism, the adoption probability of the high payoff strategies will increase. The mutation mechanism can examine the stability of the incumbent strategy to evolutionary pressures. The performance of SDPSO is compared with 14 algorithms on the CEC 2014 test suite. The results show that SDPSO has the highest rank. SDPSO is applied to solve a real-world problem. SDPSO can find the best mean results comparing with 4 algorithms. The findings show that the proposed evolutionary game theory-based framework can adaptively control the population state. This study proposes a new application of evolutionary game theory to the design of swarm intelligence and contributes to a better understanding of the usefulness of the evolutionary game theory in the optimization method. The source codes of SDPSO are available at https://github.com/zi-ang-liu/SDPSO.