An apparatus for controlling a system, comprising: a memory configured to store a particle filter configured to estimate weights of a set of particles based on fitting of the particles into a measurement model, wherein a particle includes a motion model of the system having an uncertainty modeled as a Gaussian process over possible motion models of the system and a state of the system determined with the uncertainty of the motion model of the particle, wherein a distribution of the Gaussian process of the motion model of one particle is different from a distribution of the Gaussian process of the motion model of another particle, wherein each execution of the particle filter updates the state of the particle according to a control input to the system and the motion model of the particle with the uncertainty, and determines the weight of the particle by fitting the state of the particle in the measurement model subject to measurement noise; and a processor configured to execute the particle filter to produce the weight of each particle and the state of each particle determined with the uncertainty of the motion model of each particle; update the distribution of the Gaussian process of a particle based on a difference between the state of the particle determined with the uncertainty of the motion model of the particle and a state of the particle determined without the uncertainty of the motion model of the particle; determine a current estimate of the motion model as a weighted combination of the motion models of the particles weighted according to the weights of the particles; determine a current estimate of the state of the system as a weighted combination of the states of the particles weighted according to the weights of the particles; and execute a controller configured to generate a value of the control input based on the current estimate of the motion model and the current estimate of the state of the system and control the system using the value of the control input wherein the controller determining the control input is a model based controller. a memory configured to store a particle filter configured to estimate weights of a set of particles based on fitting of the particles into a measurement model, wherein a particle includes a motion model of the system having an uncertainty modeled as a Gaussian process over possible motion models of the system and a state of the system determined with the uncertainty of the motion model of the particle, wherein a distribution of the Gaussian process of the motion model of one particle is different from a distribution of the Gaussian process of the motion model of another particle, wherein each execution of the particle filter updates the state of the particle according to a control input to the system and the motion model of the particle with the uncertainty, and determines the weight of the particle by fitting the state of the particle in the measurement model subject to measurement noise; and a processor configured to execute the particle filter to produce the weight of each particle and the state of each particle determined with the uncertainty of the motion model of each particle; update the distribution of the Gaussian process of a particle based on a difference between the state of the particle determined with the uncertainty of the motion model of the particle and a state of the particle determined without the uncertainty of the motion model of the particle; determine a current estimate of the motion model as a weighted combination of the motion models of the particles weighted according to the weights of the particles; determine a current estimate of the state of the system as a weighted combination of the states of the particles weighted according to the weights of the particles; and execute a controller configured to generate a value of the control input based on the current estimate of the motion model and the current estimate of the state of the system and control the system using the value of the control input execute the particle filter to produce the weight of each particle and the state of each particle determined with the uncertainty of the motion model of each particle; update the distribution of the Gaussian process of a particle based on a difference between the state of the particle determined with the uncertainty of the motion model of the particle and a state of the particle determined without the uncertainty of the motion model of the particle; determine a current estimate of the motion model as a weighted combination of the motion models of the particles weighted according to the weights of the particles; determine a current estimate of the state of the system as a weighted combination of the states of the particles weighted according to the weights of the particles; and execute a controller configured to generate a value of the control input based on the current estimate of the motion model and the current estimate of the state of the system and control the system using the value of the control input wherein the controller determining the control input is a model based controller.