1. A system configured to control a behavior of an agent to cause the agent to selectively execute a plurality of subtasks for an object, the system comprising: a first arithmetic processing element configured to generate a plurality of state variable trajectories which represent time series of a state variable of the object according to a stochastic transition model in which the state variable of the object is represented as a random variable and in which the transition mode of the state variable is determined depending on each execution probability of the plurality of subtasks in which a probability distribution is represented by a Dirichlet distribution; and a second arithmetic processing element configured to control an operation of the agent so that the state of the object transits according to a desired state variable trajectory which is one state variable trajectory maximizing or optimizing a joint probability of a whole of the stochastic transition model among the plurality of state variable trajectories generated by the first arithmetic processing element.