A non-transitory machine readable medium on which are stored instructions, the instructions, when executed by a computer, causing the computer to determine a motion trajectory for a mobile robot based on occupancy priors indicating probabilities of presence of dynamic objects and/or individuals in a map of an environment, wherein the occupancy priors are determined by a reward function defined by reward function parameters, wherein for the determining of the reward function parameters, the instructions cause the computer to perform the following steps:
- providing a number of semantic maps;
- providing a number of training trajectories for each of the number of semantic maps;
- computing a gradient as a difference between an expected mean feature count and an empirical mean feature count depending on each of the number of semantic maps and on each of the number of training trajectories, wherein the empirical mean feature count is a first sum of averages, each of the averages of the first sum being an average number of features accumulated over the provided training trajectories of a different semantic map of a plurality of the semantic maps, and wherein the expected mean feature count is a second sum of averages, each of the averages of the second sum being an average number of features accumulated by trajectories generated, for a different semantic map of the plurality of semantic maps, depending on current reward function parameters;
- and
- updating the reward function parameters depending on the gradient.