Next: , Previous: , Up: Adaptive Probabilistic Mapping   [Contents][Index]


2.10 Automatic Spur

Automatic spur is an important concept related to an actor. This concept corresponds to the idea that an intrinsic feature of intelligent system would be adherence to the principle of minimum energy (or maximum probability). The use of the automatic spur may substantially increase the efficiency of actor operation and allow application of an actor in cases when there are no explicit spur increments supplied to it.

Automatic spur is especially useful when output signals of an actor represent its internal states and each action choice state is a superposition of the previous internal state of the actor and an input signal received when the actor was in that previous internal state. That is, the actor operates as a finite automaton, which has a certain number of internal states, and current internal state changes on the basis of the previous internal state and an input signal received. In this case, automatic spur is a measure of adequacy of a model of internal states within the actor to a sequence of input signals received.

In QSMM, the common approach to building a state model for identifying internal states of a (possibly abstract) entity to solve a problem is the use of a spur scheme with two spur types, which correspond to negative (inhibitory) spur and positive (excitatory) spur that countervail each other. Negative spur is the automatic spur, which typically has a normal way of perception. Positive spur is the user-supplied one, specific to the problem to be solved.

If is used by an actor, automatic spur is equal to the sum of automatic spur increments calculated within the function qsmm_actor_reg_sig_in for action choice states that occur in the event history during actor operation for which prior occurrences in the event history exist. If the prior occurrence of an action choice state exists, then within the function qsmm_actor_reg_sig_in there will be known an output signal that was emitted in the action choice state when it had occurred the previous time. (For the last occurrence, an output signal emitted in the action choice state is not yet known in qsmm_actor_reg_sig_in.)

An automatic spur increment is calculated for a pair that represents logical consequence h → z and consists of action choice state h and output signal z emitted in that action choice state. The automatic spur increment is equal to the natural logarithm of the probability of occurrence of that pair in the event history:

auto_spur_incr.formula

Here the following notations are used:

ν(h,z) 

The number of occurrences of the pair in the event history since the beginning of actor operation.

t0

The discrete time of the previous occurrence of the pair in the event history. Function qsmm_actor_reg_sig_action records this time.

0<K≤1 

The mean number of output signals per one signal in the event history.

When an actor uses one spur type at all, which corresponds to the automatic spur, it is recommended to set the type of relative probability function for the actor to QSMM_RELPROB_BUILTIN2 or QSMM_RELPROB_BUILTIN3. However, it is also recommended using the automatic spur in pair with the other, countervailing spur, which measures progress in solving the problem in some other way.

To query or set an actor spur type, which corresponds to the automatic spur, functions described below can be used. By default, automatic spur is not used by an actor created by the function qsmm_actor_create, except that the automatic spur is used by an implicitly created small actor associated with a large actor.

Function: int qsmm_get_actor_auto_spur_type (qsmm_actor_t actor)

This function returns the non-negative index of a spur type, which corresponds to the automatic spur used by an actor, or negative error code QSMM_ERR_NOTFOUND if the actor does not use the automatic spur.

Function: int qsmm_set_actor_auto_spur_type (qsmm_actor_t actor, int spur_type)

This function sets a spur type for the automatic spur of an actor specified by handle actor. The spur type is set to spur_type. Spur types have zero-based indices. If spur_type is equal to -1, then the actor will not use the automatic spur (this will not affect the use of the automatic spur by a small actor associated with the large actor).

On success, the function returns a non-negative value. If spur_type is less than -1 or is greater than or equal to the number of spur types specified when creating the actor, then negative error code QSMM_ERR_INVAL will be returned.

Use the following functions to query or set the value of K.

Function: double qsmm_get_actor_naction_per_evt (qsmm_actor_t actor)

This function returns a number greater than 0 and less than or equal to 1, which specifies the mean number of output signals per one signal in the event history of actor.

Function: int qsmm_set_actor_naction_per_evt (qsmm_actor_t actor, double val)

This function sets the mean number of output signals per one signal in the event history of actor to val.

On success, the function returns a non-negative value. If val is not a finite number, or is a number less than or equal to 0, or is a number greater than 1, then negative error code QSMM_ERR_INVAL will be returned.

The function qsmm_actor_create initializes the mean number of output signals per one signal in (future) event history of a newly created actor to 0.5, which means that every second signal in the event history of the actor is expected to be an output signal.

A small actor can use at most one spur type that corresponds to the automatic spur. The functions qsmm_get_actor_auto_spur_type and qsmm_set_actor_auto_spur_type called for a small actor retrieve and set the index of a spur type, which corresponds to that automatic spur.

A large actor can use at most two spur types that correspond to the automatic spur. Automatic spur of the first type is used by a small actor associated with the large actor. Increments of that spur are calculated for action choice states, which correspond to nodes of Huffman trees traversed when generating output signals by the large actor. Increments of the automatic spur of the second type are calculated for action choice states from the event history of the large actor. The functions qsmm_get_actor_auto_spur_type and qsmm_set_actor_auto_spur_type called for a large actor retrieve and set the index of a spur type that corresponds to the latter automatic spur.

Historically, a large actor is created with the automatic spur of the first type turned on by default. A developer may want to turn off the automatic spur of the first type and make the large actor use automatic spur of the second type instead. To turn off the use of automatic spur of the first type by large actor actor_large, write lines of code

qsmm_set_actor_auto_spur_type(
    qsmm_get_actpair_actor_env(
        qsmm_get_actpair(qsmm_get_actor_large_model(actor_large))),
    -1);

To conserve memory, a spur type, which corresponds to this automatic spur, can be reused for another purpose. For a small actor associated with the large actor, this spur type has index 0. Keep in mind that by default, the small actor uses discrete time to compute the increment velocity for this spur type. For the large actor, this spur type has special index -1.


Next: , Previous: , Up: Adaptive Probabilistic Mapping   [Contents][Index]