Recently, the importance of the application of computational models utilized in cognitive neuroscience to psychiatric disorders has been recognized. This study utilizes a recurrent neural network model to test aberrant sensory precision, a normative theory of autism spectrum disorder. We particularly focus on the effects of increased and decreased sensory precision on adaptive behavior based on a prediction error minimization mechanism. To distinguish dysfunction at the behavioral and network levels, we employ a humanoid robot driven by a neural network and observe ball-playing interactions with a human experimenter. Experimental results show that behavioral rigidity characteristic of autism spectrum disorder - including stopping movement and repetitive behavior - was generated from both increased and decreased sensory precision, but through different processes at the network level. These results may provide a system-level explanation of different types of behavioral rigidity in psychiatric diseases such as compulsions and stereotypies. The results also support a system-level model for autism spectrum disorder that suggests core deficits in estimating the uncertainty of sensory evidence.