The watch command controls run-time tracing of Soar. With no arguments, this command prints out the current watch status. The various levels are used to modify the current watch settings. Each level can be indicated with either a number or a named flag as follows:
0 none 1 decisions 2 phases 3 productions 4 wmes 5 preferences
The numerical arguments (0 - 5) do not take any arguments or modifiers. They inclusively turn on all levels up to the number specified. To use numerical arguments to turn off a level, specify a number which is less than the level to be turned off. For instance, to turn off watching of productions, specify "watch 2" (or 1 or 0). Numerical arguments are provided for shorthand convenience. For more detailed control over the watch settings, the named arguments should be used.
For the named arguments, setting either the -on or -off switch selectively turns on or off only that setting. Setting the -inclusive switch (which can be abbreviated as -inc) or setting no flag at all has the effect of setting all levels up to and including the level specified. For example, watch productions -on selectively turns on the tracing of production firings/retractions; watch productions -off selectively turns it off again. watch productions [-inc] turns on the tracing of productions and also turns on tracing of all levels below productions: decisions and phases, too. Individual watch parameters may be used to modify the inclusive settings as well, selectively turning on or off any levels outside or inside the inclusive range.
The following options are allowed (status is given as either -on, -off, or -inclusive, -inc is the default):
To improve state tracing, the following filter-options are available to watch wmes for monitoring a specified object-attribute-value triplet:{-add-filter type filter} | {-remove-filter type filter} | {-reset-filter type } | {-list-filter type }where:
type = -adds | -removes | -both filter = {id|*} {attribute|*} {value|*}
-noprint|-print|-fullprint
-noprint prints nothing, -print prints the production name, -fullprint prints the entire production. (not done as of 8.2)
The following options control printing of other Soar parameters and are not part of the above set of levels which can be controlled as a group.
watch 0which turns off all printing of Soar internals (same as watch none), or
watch 3which turns on printing of decisions, phases and productions (same as watch productions). Of course, individual options can be changed as well:
watch 1 wmes -onturns on printing of decisions and wmes, but not phases and productions. While
watch 4 phases -offturns on printing of decisions, productions and wmes, and turns phases off.
To watch the firing and retraction of only USER productions:
watch productions -user -print
whereas this command would watch decisions, phases and ALL productions:
watch productions