Next: tohuff-test, Previous: asm-disasm, Up: Example Programs [Contents][Index]
asmat
This program performs the same function as the program represented in Figure 7.1, but uses the Multinode Model API instead of direct creating a pair of actors to solve the task. A workspace for the state transition matrix and the action emission matrix is defined using an internally generated assembler program which is dumped to file prg_src in the current directory.
The asmat
program prints the number of node states defined by the assembler program and prints the amount of spur accumulated during interaction of a single-node model with a deterministic environment defined by three matrices hard-coded in the program source text.
State transition and action emission probabilities learned in the process of interaction are dumped to file var_out in the current directory.
A random seed can be specified by a program argument. If the random seed is non-negative, then the single-node model will operate normally. If the random seed is negative, then the single-node model will generate output signals completely randomly.
Like the apsamp
program, the asmat
program can be built for various schemes of using a pair of actors upon which the multinode model is based.
To build the program for a selected scheme, delete executable and object files of the program if they exist, and run command
make name_of_executable_of_program_asmat
AP_MODE=name_of_scheme
in directory samples. The supported names of schemes are: ‘S1_S1’, ‘S1_S3’, ‘S1_L3’, ‘S3_S1’, ‘S3_S3’, ‘S3_L3’, ‘L3_L3’. If a scheme is not specified when building the program, then default scheme ‘S1_S1’ will be used. See apsamp, for a description of how to decode the names of schemes.
Here is given the output of the example program built for scheme ‘S1_S1’.
$ ./asmat -3 nstate = 30 spur = 399
$ ./asmat 3 nstate = 30 spur = 2108
Next: tohuff-test, Previous: asm-disasm, Up: Example Programs [Contents][Index]