The present invention provides a robot apparatus that can perform
appropriate actions in accordance with the ambient conditions, and a
method of controlling the behavior of the robot apparatus. The robot
apparatus includes a data-acquiring unit that acquires data, externally
and/or internally, a subject-identifying unit that identifies a subject
performing an action, by using the data externally acquired, a
condition-recognizing unit that recognizes external conditions and/or
internal conditions, by using the data externally acquired and/or the
data internally acquired, an action-pattern acquiring unit that acquires
an action pattern of the subject, by using the data externally acquired,
a storage unit that stores action data representing the action of the
subject, in association with condition data and subject identification
data, the condition data representing conditions external and/or internal
of the robot apparatus, and the subject identification data identifying
the subject, and an action-performing unit that performs actions, wherein
the action-performing unit performs an action represented by the action
data stored in the storage unit, in accordance with the identification
data and the external and/or internal condition data, when the
subject-identifying unit identifies the subject.