Small actors support setting the weight of an output signal for all possible action choice states at once.
The functions qsmm_get_actor_sig_weight and qsmm_set_actor_sig_weight described below make it possible to inspect or modify the array of output signal weights of a small actor.
A large actor does not support setting the weight of an output signal for all possible action choice states at once and does not use that array.
The function qsmm_actor_create initializes to 1 weights of all output signals of a newly created small actor in the array.
The function qsmm_set_actor_nsig_out initializes to 1 weights of output signals added to a small actor.
If an output signal of a small actor has a profile probability specified for an action choice state in statistics storage, the overall output signal weight is the product of a corresponding weight in the array and the profile probability.
The function qsmm_actor_calc_action_prob applies weights contained in the array to computed relative probabilities regardless of a requested type of probabilities to calculate.
After multiplying computed relative probabilities by corresponding weights, qsmm_actor_calc_action_prob normalizes a resulting array to obtain probabilities that sum up to 1.
int qsmm_get_actor_sig_weight (qsmm_actor_t actor, qsmm_sig_t sig, double *weight_p) ¶This function sets *weight_p to the weight of output signal sig of an actor.
If weight_p is NULL, the function does not set *weight_p.
Otherwise, *weight_p is a finite and non-negative number.
The function returns a non-negative value on success or a negative error code on failure. Currently, the function can return the following error codes.
QSMM_ERR_INVALSignal sig is not an output signal of the actor.
QSMM_ERR_NOTSUPThe actor is the large one.
int qsmm_set_actor_sig_weight (qsmm_actor_t actor, qsmm_sig_t sig, double weight) ¶This function sets the weight of output signal sig of an actor to weight.
The function returns a non-negative value on success or a negative error code on failure. Currently, the function can return the following error codes.
QSMM_ERR_INVALSignal sig is not an output signal of the actor, or weight is not a finite number or is a negative number.
QSMM_ERR_NOTSUPThe actor is the large one.