Animal individuals should have rationality in the sense that they can behave adaptively to their environments, executing various tasks concerning reproduction and⁄or survival. Such rationality as exhibited by animals is called “ratiomorph”, when it may not be attributed to their conscious thinking. A ratiomorph is considered to have been implemented by means of certain physiological mechanisms, which have been subjected to various selection pressures for animal cognitive capacities. In the present study, we conducted computer simulations on models of ratiomorphic mechanisms and a simple stimulus-response (SR) rule; a modal behavior pattern of the pill bug called “Turn Alternation” (TA) response is modeled as an example of ratiomorphic behavior. In the TA behavior, a pill bug turns to left and right alternately. It has been suggested that one of the simplest and the most plausible explanations of the TA response is the Bilaterally Asymmetrical Leg Movements (BALM). We constructed computer models to reproduce the pill bug's behavior by formulating the BALM mechanism as logical formulas and transforming them into dynamical systems. Our models can be recognized as expressions of ratiomorphic property of the pill bug in terms that “rationality”, expressed as logical formulas, is implemented in the forms of dynamical systems, and produced more diverse behaviors than the model based on the SR rule. From the results of our computer simulations, it is suggested that an animal with ratiomorphic mechanism may carry flexibility and cognitive aspects in its behavior.