A method for controlling safety of both an ego vehicle and at least one social object in an environment the ego vehicle is operating in, wherein the method comprises: receiving data representative of the at least one social object; determining a current state of the ego vehicle based on sensor data; predicting , based on the current state, for each possible behavior action in a set of possible behavior actions, an ego safety value corresponding to the ego vehicle, wherein predicting the ego safety value for each possible behavior action is performed by a general value function, GVF, implemented by a trained neural network; predicting , based on the current state, for each possible behavior action, a social safety value corresponding to the at least one social object in the environment of the ego vehicle, wherein predicting the social safety value for each possible behavior action for each of the plurality of social objects is performed by a further GVF implemented by a trained neural network; and selecting , based on the ego safety values, the social safety values, and one or more target objectives for the ego vehicle, a next behavior action for the ego vehicle; wherein, for each possible behavior action: the ego safety value indicates a probability that an obstacle will not be located in an ego safety zone of the ego vehicle if the possible behavior action is performed by the ego vehicle and the target policy followed thereafter; and the social safety value indicates a probability, for the at least one social object, that the ego vehicle will not be located in a social safety zone of the social object if the possible behavior action is performed by the ego vehicle and the target policy followed thereafter. receiving data representative of the at least one social object; determining a current state of the ego vehicle based on sensor data; predicting , based on the current state, for each possible behavior action in a set of possible behavior actions, an ego safety value corresponding to the ego vehicle, wherein predicting the ego safety value for each possible behavior action is performed by a general value function, GVF, implemented by a trained neural network; predicting , based on the current state, for each possible behavior action, a social safety value corresponding to the at least one social object in the environment of the ego vehicle, wherein predicting the social safety value for each possible behavior action for each of the plurality of social objects is performed by a further GVF implemented by a trained neural network; and selecting , based on the ego safety values, the social safety values, and one or more target objectives for the ego vehicle, a next behavior action for the ego vehicle; wherein, for each possible behavior action: the ego safety value indicates a probability that an obstacle will not be located in an ego safety zone of the ego vehicle if the possible behavior action is performed by the ego vehicle and the target policy followed thereafter; and the social safety value indicates a probability, for the at least one social object, that the ego vehicle will not be located in a social safety zone of the social object if the possible behavior action is performed by the ego vehicle and the target policy followed thereafter. <EOS>