A computer-implemented neural network method for enabling controlling a physical robot towards a goal state, including representing a state of the physical robot, wherein the physical robot comprises one or more movable parts, the physical robot being arranged with multiple observable states in which the physical robot may be configured, and a set of multiple actions which may be performed on the physical robot to cause a state transition from a first observable state of the physical robot to a second observable state of the physical robot, the goal state corresponding to a particular desired configuration of the movable parts, the method comprising - receiving sensor data representing the state of the physical robot, and comprising information describing the position and/or orientation of the one or more movable parts, wherein the sensor data comprises one or more location parameters, wherein a location parameter represents a location, a translation, or an angle of a movable part of the physical robot, and/or wherein the sensor data comprises an image of the physical robot, - applying an encoder function for mapping the sensor data to a latent representation of the state of the physical robot, the encoder function comprising one or more neural networks configured for extracting multiple objects from the sensor data and for mapping the multiple objects to the latent space, - applying a transition function to a latent representation of the state of the physical robot and to action data representing an action performed on the physical robot, the transition function comprising a neural network producing a predicted latent representation of the state of the physical robot after having the action performed on it, - training the encoder function and/or the transition function on a buffer comprising a first sensor data representing a first state of the physical robot, action data representing an action performed on the physical robot and a second sensor data representing a second state of the physical robot after the action has been performed on the system, - discretizing the latent space by selecting a set of vertices in the latent space, - defining a Markov decision process on the set of vertices, wherein transition probabilities are obtained from the latent transition function, - solving the Markov decision process obtaining a policy mapping, mapping from the latent states to actions to reach a latent goal state corresponding to the goal state. - receiving sensor data representing the state of the physical robot, and comprising information describing the position and/or orientation of the one or more movable parts, wherein the sensor data comprises one or more location parameters, wherein a location parameter represents a location, a translation, or an angle of a movable part of the physical robot, and/or wherein the sensor data comprises an image of the physical robot, - applying an encoder function for mapping the sensor data to a latent representation of the state of the physical robot, the encoder function comprising one or more neural networks configured for extracting multiple objects from the sensor data and for mapping the multiple objects to the latent space, - applying a transition function to a latent representation of the state of the physical robot and to action data representing an action performed on the physical robot, the transition function comprising a neural network producing a predicted latent representation of the state of the physical robot after having the action performed on it, - training the encoder function and/or the transition function on a buffer comprising a first sensor data representing a first state of the physical robot, action data representing an action performed on the physical robot and a second sensor data representing a second state of the physical robot after the action has been performed on the system, - discretizing the latent space by selecting a set of vertices in the latent space, - defining a Markov decision process on the set of vertices, wherein transition probabilities are obtained from the latent transition function, - solving the Markov decision process obtaining a policy mapping, mapping from the latent states to actions to reach a latent goal state corresponding to the goal state.