2.6.4 Spur Perception

Most of relative probability function formulas in Relative Probability Function Types contain the function C(h,z,i) equal to ratio between spur increment velocity and mean spur increment velocity. The method of computing C(h,z,i) depends on the way of spur perception for spur type i. The way of spur perception determines whether the ratio will be generally positive or negative for generally positive or negative spur increments supplied to the actor. There are two ways of spur perception: normal and inverse. The normal way of spur perception provides generally positive ratio for generally positive spur increments and generally negative ratio for generally negative spur increments. The inverse way of spur perception provides generally negative ratio for generally positive spur increments and generally positive ratio for generally negative spur increments.

The following enumeration specifies the way of perception of spur of a particular type.

Enumeration: qsmm_spur_perception_e

This enumeration specifies the way of spur perception for a spur type.

Below there are notations used in descriptions of enumeration elements. In descriptions of notations, a cycle of type <h,z> is the event history segment between an occurrence of action choice state h with emitting output signal z and a subsequent occurrence of h.

t[i]

Discrete time or continuous time with a particular type for spur type i.

E[i]

The value of spur of i type.

H(h,z)[i]

The sum of increments of spur of i type over cycles of <h,z> type.

ω(h,z)[i] 

The sum of cycle periods for cycles of <h,z> type in discrete time or continuous time with a particular type for spur type i.

The enumeration contains the following elements.

QSMM_SPUR_PERCEPTION_NORMAL

The value of C(h,z,i) is the ratio of spur increment velocity to the absolute value of mean spur increment velocity for a cycle type:

percept_normal.formula

When spur increments over the event history are non-negative, C(h,z,i) increases as spur increment velocity increases. If spur increment velocity for a cycle type is positive and equal to mean spur increment velocity, C(h,z,i) is equal to 1.

QSMM_SPUR_PERCEPTION_INVERSE

The value of C(h,z,i) is the negative ratio of the absolute value of mean spur increment velocity to spur increment velocity for a cycle type:

percept_inverse.formula

When spur increments over the event history are negative, C(h,z,i) increases as spur increment velocity increases. If spur increment velocity for a cycle type is negative and equal to mean spur increment velocity, C(h,z,i) is equal to 1.

The function qsmm_set_actor_spur_time selects discrete time or continuous time with a particular type for computing increment velocity of spur with a specific type. A time type selected for spur type i affects values t[i] and ω(h,z)[i].

Use the following functions to query or set the way of spur perception for a spur type.

Function: int qsmm_get_actor_spur_perception (qsmm_actor_t actor, int spur_type, enum qsmm_spur_perception_e *spur_perception_p)
Function: int qsmm_set_actor_spur_perception (qsmm_actor_t actor, int spur_type, enum qsmm_spur_perception_e spur_perception)

If spur_perception_p is not NULL, the function qsmm_get_actor_spur_perception sets *spur_perception_p equal to the way of spur perception for a spur_type by an actor. The function qsmm_set_actor_spur_perception sets to spur_perception the way of spur perception for a spur_type by an actor. The values of spur_perception not matching to the elements of qsmm_spur_perception_e enumeration lead to undefined actor behavior.

Spur types have zero-based indices. If the actor is the large one, the functions query or set the way of spur perception for a spur_type of a small actor associated with the large actor.

On success, the functions return a non-negative value. If spur_type is negative or greater than or equal to the number of spur types specified in the field nspur of qsmm_actor_desc_s structure when creating the actor, the functions return negative error code QSMM_ERR_INVAL.

The function qsmm_actor_create initializes the way of spur perception for all spur types of a newly created actor to QSMM_SPUR_PERCEPTION_NORMAL.