“Mentalizing” is the ability to attribute mental states to other agents. The lack of online mentalizing, which is required in actual social contexts, may cause serious social disorders such as autism. However, the mechanism of online mentalizing is still unclear. In this study, we found that behavioral entropy (which indicates the randomness of decision making) was an efficient behavioral index for online mentalizing in a human-human competitive game. Further participants played the game with a humanoid robot; the results indicated that the entropy was significantly higher in participants whose gaze followed the robot's head turn than in those who did not, although the explicit human-likeness of the robot did not correlate with behavioral entropy. These results implied that mentalizing could be divided into two separate processes: an explicit, logical reasoning process and an implicit, intuitive process driven by perception of the other agent's gaze. We hypothesize that the latter is a core process for online mentalizing, and we argue that the social problems of autistic people are caused by dysfunction of this process.