We propose a human-machine hybrid three-strategy spatial prisoner’s dilemma game model on a two-dimensional lattice with a tolerance-driven migration mechanism. The population consists of cooperative robots and ordinary individuals, where robots remain cooperative throughout evolution, while ordinary individuals can adopt cooperation, defection, or the loner strategy. We then investigate how the tolerance threshold, robot proportion, population density, and dilemma strength affect the evolution of cooperation. Results show that cooperation is maximized at an optimal population density. Moderate vacancy provides suffcient space for migration and spatial reorganization, and a lower tolerance threshold increases individuals’ responsiveness to defector-dominated neighborhoods; together, these effects facilitate the formation and stability of cooperative clusters. By contrast, excessive population density hinders migration, making it diffcult for individuals to escape defector-dominated neighborhoods and thus causing cooperation to break down. We further show that the effect of cooperative robots depends on both population density and dilemma strength. The role of cooperative robots is not always positive, under high dilemma strength and high population density, the introduction of cooperative robots can even suppress cooperation. Furthermore, we examine the effects of robots with a broader strategy space—specifically, robots that adaptively switch between cooperation and the loner strategy under high local defection pressure—and different game types on the evolution of cooperation, and similarly find that an optimal population density maximizes cooperation. The adaptive strategy switching reduces defector exploitation of robots and sustains higher cooperation levels under strong dilemmas. Robustness checks under the snowdrift game and the weak prisoner’s dilemma confirm that the unimodal density–cooperation relationship is a general feature independent of the specific game type. These findings deepen our understanding of the evolution of cooperation in human-machine hybrid systems.