The Soar less than Frequently Asked Questions List: Appendum to Soar FAQ

Last updated 16-August-97
Frank Ritter:

Table of Contents

Section 0: Introduction

This is the introduction to the appendum to the Soar FAQ.

In the appendum, we put stuff that doesn't belong in the FAQ itself. These answers are either too specialized, or too transitory, or not yet frequent. Right now it's a bit of a hodge-podge, dog's breakfast sort-of-thing, but there are some useful items, and serves as a repository until a proper casebook it built. We also have started to save some reusable mail from the soar-bugs mailing list.

Suggestions for new questions, answers, re-phrasing, deletions and so on, are all welcomed. Please include the word "FAQ" in the subject of your e-mail. Please use the mailing lists noted below for general questions, but if they fail or you do not know which one to use, contact one of us.

Gordon D. Baxter ( or (

Frank E. Ritter (

Back to Table of Contents

Section 1: General Resources

(G1) Burl: a general learning mechanism

It answers the question: How do I do psychologically plausible lookahead search in Soar?

Burl is a general learning mechanism for using bottom-up recognition learning as a way to build expertise written by Todd Johnson. A description of it is available from .

Code is available from Todd at

(G2) A comparison between Soar and ActR

Todd Johnson has written a paper laying out the theoretical distinctions in Act-R and Soar and then compares control in Act-R and Soar from a cognitive perspective. The paper looks at how each architecture fares with respect to relevant behavioral phenomena.

Todd intends to expand this paper into a general comparison of Act-R and Soar for the cognitive science community. To this end, he would appreciate your comments on the present version.

A web-based version is available at

Johnson, T. R. (1996). Control in Act-R and Soar, Proceedings of the First European Workshop on Cognitive Modeling (pp. 201-208): Technische Universitat Berlin.

A revised version appeared in the Proceedings of the 1997 Cognitive Science conference

Gary Jones has written up a comparison between Soar and ActR. The long version is available on the web in the ONREUR Newsletter, and a more condensed version was published in AISBQ:

Jones G. (1996). The architectures of Soar and ACT-R, and how they model human behaviour. Artificial Intelligence and Simulation of Behaviour Quarterly, Winter 1996, 96, 41-44.

Back to Table of Contents

(G3) A general model of teamwork

As you may well know, the Soar/IFOR-CFOR project has been
developing agents for complex multi-agent domains, specifically
distributed interactive simulation (DIS) environments.

As part of this effort at ISI, we have been developing a general model of teamwork, to facilitate agents' coherent teamwork in complex domains. This model, called STEAM, at present involves about 250 productions. We have used this model in developing three separate types of agent teams (including one outside of DIS environments). Since this model may be of use to some of you working with multi-agent Soar systems, we are now making it available to the Soar group.

Here is a pointer to the relevant web page describing STEAM: Documentation for the model is available on the web page; however, if there are additional questions, I will be happy to answer them.

Any feedback on this topic is very welcome.

Milind Tambe (Thu, 6 Mar 1997 18:27:30 PST) Information Sciences Institute tel:310-822-1511 & Computer science department University of Southern California fax:310-822-0751 4676 Admiralty Way Marina del Rey, CA 90292

Back to Table of Contents

(G4) How does Soar currently stand as a psychology theory?

Sadly, there is not cut and dried answer to this. Answering this really will require you to figure out what you expect from a psychology theory and then evaluate Soar on those criteria. If you expect a theory to predict that humans are intelligent and that they have been and can be shown learn in several domains, it is nearly the only game in town. If you require limited short term memory directly in the architecture, that's not in Soar yet.

That said, there are numerous resources for finding out more. The first port of call should be Newell's 1990 book, Unified theories of cognition. This makes the most coherent case for Soar, although it is slowly becoming out of date with respect to the implementation. This may satisfy you. There are also two big books, The Soar papers, that provide numerous examples of Soar's use. The examples tend to be more biased towards AI, but there are numerous psychology applications in them.

If you go to the ISI paper archive (or the Nottingham mirror), or often the CHI and Cognitive Science conference proceedings, you will find some more up-to-date papers showing what the community is currently working on. You may also find the pointers in the FAQ and lower down on individual web sites to be quite useful in seeing the current state of play in the area you are interested.

Todd Johnson proposed a list of fundamental cognitive capacities in 1995 that we have started to organize papers around. Each paper (or system) has only been cited once, and it is far far from complete, but the framework is now in place for expanding it. If you have suggestions, please do forward them for inclusion.

Declarative memory
Pelton, G. A., and Lehman, J. F., ``Everyday Believability,'' Technical Report CMU-CS-95-133, School of Computer Science, Carnegie Mellon University, 1995. Episodic Learning to recall Learning to recognize
Learning by analogy
Instrumental Conditioning
Classical Conditioning
Causal Reasoning
Causal induction
External Interaction
Pelton, G. A. and Lehman, J. F., ``The Breakdown of Operators when Interacting with the External World,'' Technical Report CMU-CS-94-121, School of Computer Science, Carnegie Mellon University, 1994.

Nelson, G., Lehman, J. F., John, B., Integrating Cognitive Capabilities in a Real-Time Task, in Proceedings of the Sixteenth Annual Conference of the Cognitive Science Society, 1994.

Natural language
Lehman, J. F., Van Dyke, J., and Rubinoff, R., Natural Language Processing for IFORS: Comprehension and Generation in the Air Combat Domain, in Proceedings of the Fifth Conference on Computer Generated Forces and Behavioral Representation, 1995.
STM limitations
Problem solving
Lehman, J. Fain, Toward the Essential Nature of Statistical Knowledge in Sense Resolution, Proceedings of the Twelfth National Conference on Artificial Intelligence, 1994.
Recovery from incorrect knowledge
Reactive behavior
Nelson, G., Lehman, J. F., John, B. E., Experiences in Interruptible Language Processing, Proceedings of the 1994 AAAI Spring Symposium on Active NLP, 994.
Interleaved actions
Parallel reasoning
Managing WM (it keeps growing and growing and growing...)
Self explanation
Limited lookahead learning
Reinforcement learning
Delayed feedback learning

Back to Table of Contents

(G5) A model that does reflection

From: Ellen Jane Bass []
Subject: reflection and deduction code
Date: Wed, 20 Sep 1995 17:02:09 -0400 (EDT)

For grabs ---

My reflection model is written in Soar 6.2.5 nnpscm.
I have created a version of it that does not require the
Nottingham environment.  It starts up after the ATC task has been
performed and the aircraft has disappeared from the display.

Although it is being updated based on comments from the Soar Workshop,
the current version of the code should be available by anonymous FTP from

Go to the directory ~ftp/chmsr/ellen/reflect.
If that does not get you to the directory, try the whole path name

The file README-reflect-after-run tells you what to load.
Basically you need to load


Let me know if you need help.
Comments on the code and/or the comments appreciated.

Ellen Bass			Center for Human-Machine Systems Research
work : (404) 894-4318		School of Industrial and Systems Engineering
fax  : (404) 894-2301		Georgia Institute of Technology
home : (404) 378-4918		765 Ferst Drive	Atlanta, GA 30332-0205

Back to Table of Contents

(G6) A model that does concept/category acquisition

Symbolic Concept Acquisition (SCA): Symbolic Concept Acquisition Version2 (SCA): to be filled in

Back to Table of Contents

(G7) Unofficial mirror

The Soar FAQ is also mirrored (unofficially) at Michigan by Seth Rogers ( as This may be more convenient for those users not located in England or Europe.

Back to Table of Contents

(G8) Soar and Linux

[Forwarded by Thomas Head [] Fri, 13 Jun 1997 13:39:53 -0400]

SAL (Scientific Applications on Linux, http://SAL.KachinaTech.COM) has an entry of your software Soar at

Before the official release in June, we send this message to all software developers in SAL database to acquire any necessary update.

We would like our page of your software offers accurate and up-to-date information to the Linux/Unix community. Hence we made a template page (http://SAL.KachinaTech.COM/.template.html) which hopefully would help you understand the terminology used in the SAL pages. If there is no addition/modification needed in the page of your software, you could simply do nothing. If your software are among those recently added items in SAL, we encourage you to have a look of the page of your software and then let us know any changes needed. For example: Is the description covers most keywords associated with the software? (since many SAL users take advantages of SAL's search engine) How about adding some Screen Shot images or a Logo/Icon image? Please look at http://SAL.KachinaTech.COM/.template.html for more detail.

SAL belongs to all Linux/Unix users, and we hope it will make some contribution to encourage people to use/port software on Linux/Unix platforms. We certainly appreciate you made your software available to Linux community.

SAL Team http://SAL.KachinaTech.COM

Back to Table of Contents

(G9) Soar memorabilia

Here's a heretofore unrevealed top ten list I [Bob Doorenbos] wrote back in June '93 when, shortly before a Soar workshop, Rick Lewis asked people to send him their "concerns about Soar" -- issues, problems, worries, etc. that he would try to summarize during the workshop. I sent him the following list. For some strange reason, Rick failed to address any of these. BTW, today is Rick's birthday, so everybody wish him a happy b-day!
Top Ten Concerns About Soar
10.  Will we have a workshop at Georgia Tech during the '96 summer olympics?
 9.  100,000 chunks take up too much memory on my workstation
 8.  Should get Billy Joel to write an official Soar theme song
 7.  Lloyd Bridges
 6.  One of the default productions has a name 111 characters long
 5.  Those pesky attribute-impasses!
 4.  Still no Tetris-Soar
 3.  P.I.'s should change their middle names to "Rodham"
 2.  Don't have a Soar logo or Soar t-shirts, hats, & coffee mugs
 1.  Not enough celebrity cameos in the Soar video
From Bob Doorenbos []
Fri, 18 Apr 1997 12:56:52 -0700

Back to Table of Contents

Section 2: Technological Issues

(T1) How can I tie Soar to other pieces of software/simulate an external world?

There are several ways that Soar has been tied to other pieces of software. A now slightly out of date overview is available from:

Ritter, F. E., & Major, N. P. (1995). Useful mechanisms for developing simulations for cognitive models. AISB Quarterly, 91(Spring), 7-18.

A list, in order of complexity, is:


You can tie Soar to itself through multi-agents, that is, having multiple Soar agents and having them talk with each other. See the next question.

Back to Table of Contents

(T2) How can I do multi-agent communication with Soar 7?

 [I believe this is originally by Tom Head, around Oct '96.]
 Reading and writing text from a file can be used for communication.
 However, using this mechanism for inter-agent communication would be
 pretty slow and you'd have to be careful to use semaphores to avoid
 deadlocks.  With Soar 7, I see a natural progression from Tcl to C
 in the development of inter-agent communication.

 1. Write inter-agent communication in Tcl.  This is possible with
    a new RHS function (called "tcl") that can execute a Tcl script.
    The script can do something as simple as send a message to a
    simple simulator (which can also be written in Tcl).  The
    simulator can then send the message to the desired recipient(s).
    You could also do things such as add-wme  in a RHS
    but I'd advise against it since its harder to see what's going
    on and more error prone.
 2. Move the simulator into C code.  To speed up the simulated world
    in which the agents interact, recode the simulator in C.  Affecting
    the simulator can be accomplished by adding a few new Tcl commands.
    The agents would be largely unchanged and the system would simply
    run faster.
 3. Move communication to C.  This is done by writing Soar I/O functions
    as documented in section 6.2 of the Soar Users Manual.  This is
    the fastest method.

Back to Table of Contents

(T3) Why is "send" in Soar different from "send" in Tk? or, What do I do if my soar process comes up as 'soar2'?

[This stuff will be subject to some change in Soar 7.1, I suspect, -FER]

"send" in Soar is and is not different from "send" in Tk.

By default, Soar's send is different from Tk.

When Soar 7 is compiled with Tk, and -useIPC is specified on the command line at runtime, Soar's send is the same as Tk.

To support multiple agents, Soar 7 takes care of all the overhead of creating and maintaining multiple interpreters (which wasn't supported by Tcl < 7.6). Soar 7 creates a flat space of interpreters -- no single interpreter is the supervisor or owner of another. To allow for communication among agents, Soar uses the "send" command. Tcl itself doesn't have a "send" command, it comes from Tk. But we didn't want to require Tk (i.e., X Windows) in order to run Soar. So Karl wrote an X-server-less version of "send" that could be used to support multiple agents in soar when Tk was not compiled in. This version of send works only for agents/interps within the same process.

Tk's send function registers with the X server to use IPC's (interprocess communications). It tries to register using the name of the application. IF, when Tk/send registers, the X server already has a process by that name, then the name gets a number appended to it so that the name will be unique and then the registration can be done. Then Soar/Tk/send also changes the name of the interpreter to match the process name that was registered by the X server. Through the X server, interpreters can can communicate with other interpreters in other processes.

What was happening to novice and not-so-novice Soar users who wanted to test applications and run multiple copies on the same machine was this: Start the first copy, soar.soar gets sourced to start the application, and "soar" gets registered with X server (invisible to the soar user). Everything (gui etc) comes up fine. Start the 2nd copy: soar interp gets renamed to soar2, no soar2.soar file is found, so no file gets sourced and the application doesn't run as expected. This was happening to nearly all the soar developers at Michigan. This was also happening for an COG SCI class [at Nottingham] trying to all run the same application (subtraction world) to explore theories of learning. It was VERY confusing. But, we had this nice little workaround since Karl had written the "send" command for Tcl-only Soar that avoided registering with the X server.

Since it was anticipated that most Soar users would not be starting out wanting IPCs ("what's that?"), we made the default method for running Soar use the IPC-less version of send. For those users savvy enough to run multiple processes and want to communicate among those processes, we added the commandline flag -useIPC. The doc could be more explicit about how "send" works in Soar, but the -useIPC flag is in the help pages. And I still believe this was the right way to go. Otherwise we would have had to tell users to have as many soar[n].soar files as they ever thought they would need to support running multiple copies of an application if Tk was compiled in their version of Soar. OR we tell the users who need IPCs (far fewer in number), oh yes, you need to specify -useIPC when you start up soar.

Now that Tcl 7.6 supports multiple interpreters, Soar no longer has to manage the overhead, we no longer have to create our own methods for communicating among agents, and we won't be shadowing Tcl or Tk commands. It also looks like Soar won't be autoloading any 'interpname'.soar files, so this whole problem goes away (only to be replaced by something else, no doubt). And Soar programmers who want to communicate with other agents and processes will have to read the Tcl doc to figure out how to do it =8-O ;)

Taken from: "Karen J. Coulter" []
Subject: Re: [Soar-Bugs #85] Why is "send" in Soar different from "send" in Tk?
Date: Fri, 11 Apr 1997 17:42:16 -0400 (EDT)

Back to Table of Contents

(T4) How does Soar7 differ from Soar6?

Question from Monica Weiland []

Basically the Soar kernel architecture in Soar 7 is the same as what's in Soar 6, with additional bug fixes, and changes to the timers to be more accurate and informative when the 'stats' cmd is issued. However, the timers don't work on the Mac just yet. There were also changes to using multiple agents and NNPSCM is the only model supported. The advantages are all the user extensions that can be done by using Tcl for the user interface.

In the Soar distribution there is a tool for converting from Soar 6 format productions to Soar 7. It was written by Doug Pearson and it's called convert (written in C). I don't know if it is included in the Mac distribution, but I would assume it is. It does a good job of converting productions; most applications run after being processed by this routine. If Monica has the SimTime productions, she should be able to convert to Soar 7. If she has trouble with the conversions, she can contact me and I'll help her figure them out.

Answer from: "Karen J. Coulter" []
Date: Mon, 9 Jun 1997 12:17:16 -0400 (EDT)

Back to Table of Contents

Section 3: Advanced Programming Tips

(APT1) How can I get log to run faster?

I'm using the log command record a trace for a very long simulation (15k+ decisions) I'm running. is there a "quiet" mode so that the trace doesn't redundantly print the screen? the printing really slows things down. is there a clever/obvious way to presently do this? maybe it's a feature to consider in the future??? thanks.
There isn't a quiet mode on the log command, but in general for any xterm, ^O toggles the output to the screen. If you only want the output of the trace, you can redirect it to a file using output-strings-destination. I believe then the text would be sent only to the file and not to the screen.

Answer from: "Karen J. Coulter" []
Date: Mon, 16 Dec 1996 13:01:50 -0500 (EST)

Back to Table of Contents

(APT2) Are there any reserved words in Soar?

This is a slightly odd question, for Soar is a production system language, not a procedural language like Pascal. But we know what you mean. What symbols have special meaning, and how can I use them and how do I have to use them?

The most important symbol is 'state'. To start their match, productions have to start with a clause that starts with the state, e.g., (state ^attribute value). On the top state, there are a few attributes that the system uses. These are ^IO, which holds IO information; ^superstate, which holds a pointer to the superstate or nil if it's the top state; ^type, which indicates if the object is a state, operator, or user defined; ^operator, which holds the current operator. In lower states caused by impasses, there are additional attributes: ^attribute, which is the type of object causing the impasse, such as state or operator; ^choices, which holds the tied choices in a tie impasse, or none in a no-change impasse; ^impasse, which indicates the type of impasse, such as no-change; ^quiescence, which indicates if the impasses happened with rules left to fire (nil), or if the impasse happened with all the rules fired (t). If quiescence is checked in an impasse, a chunk is not built. This is a way of avoiding learning based on a lack of knowledge. These attributes can all be matched by user productions, but either cannot or should not be changed by the user.

Many modelers use ^problem-space to be treated like a reserved word. It used to be modifiable only by an explicit decision by the architecture. Now it can be done by models directly. Most objects have an ^name. It is nearly a necessity to name your operators, and if states are named, their names will appear in the trace.

The default rules use their own conventions for using attributes. These conventions amount to reserved words that your models can use and sometimes, for example, the selection knowledge, encourages domain knowledge to assist in evaluating objects. If you are not sure about what attributes are there, just print out the objects, for this information is enough to get you started.

Back to Table of Contents

(APT3) How can I create a new ID and use it in the production?

> Jonathan Gratch [] wrote
> >
> > I've noticed the following:
> >
> > the rule
> > sp {....
> > -->
> > ( ^foo (make-constant-symbol |foo|) + &)}
> >
> > expands to
> >
> > sp {....
> > -->
> > ( ^foo (make-constant-symbol |foo|) +
> >      ^foo (make-constant-symbol |foo| &)}
> >
> The workaround solution, if I remember correctly, involved a
> two step process of generating your symbol and then separately
> putting it to whatever use you had in mind. Not being an expert
> at writing Soar productions, I may be way off base on this one,
> but I did not want to leave you without any initial response to
> your bug report.
> I do not believe any kernel solution to this irritating behavior
> would be easy to implement, but that is just a guess at this
> point. If you do not come up with a workaround, let me know and
> I will look into this further.
> Heck, let me know either way, the information would make a good
> addition to the soar-bugs archives or perhaps the FAQ.
> Tom

From: Aladin Akyurek []
Date: Thu, 13 Mar 1997 21:08:32 +0200

A workaround is to split the production that creates a value
by make-constant-symbol for an attribute that is intended to be a

 sp {gratch-1
     (state  ^superstate nil)
     ( ^foo (make-constant-symbol |foo|))}

 sp {gratch-2
     (state  ^superstate nil ^foo )
     ( ^foo  & )}

Back to Table of Contents

(APT4) How can I access Tcl and Unix variables?

soar_library and default_wme_depth, for example, are defined as a global variable, and all Soar files can be obtained through relative path names from it. On the Mac this is a bit trickier, but doable as well. Check out the TSI source code for examples.

Unix environmental variables are also available through the "env" matrix of variables (e.g., $env(MANPATH). Advanced users can also set variables in their shells by hand or with init files.

You should keep in mind that the Tcl scoping of variables is non-intuitive (to us, at least, at times) and it is a common problem in setting up paths and installation flags.

This sort of problem is becoming a trend as its easy to overlook. All Soar global tcl variables, such as $default, need to be defined with a tcl "global" command when used in a script. When procedures call procedures that call scripts which call scripts ..., your variable scope will change!

If variables are not visible as you expect them to be, often the problem is that they are global but not declared in your function or file. Insert a 'global var_name' and often the variable will appear again.

Expanded from email between Tom Head [], Karen J. Coulter [], and on soar-bugs, Tue, 25 Mar 1997 12:33:26 -0500, and later email as well.

Back to Table of Contents

(APT5) How can I access Soar objects?

Question from Harko Verhagen (, How do I get access to WMEs?

Answer from Bruce Israel [], Fri Dec 20 1996

If you're working in soartk, in the TCL shell you can use the function "wmem" to retrieve WMEs. "wmem" prints its output, but you can use "output-strings-destination -push -append-to-result" to get it into a form you can use programmatically.

Here's some TCL routines I built for accessing WMEs. You can use the routines wm_elts, allobs, and wm_value for different types of retrievals within TCL code.

# utility routines for WM retrievals
# -- Written by Bruce Israel [], Fri Dec 20 1996
# -- Copyright ExpLore Reasoning Systems, Inc. 1996.  All rights reserved.

# member- is ITM an element of the list LST?
#   Usage: member ITM LST
proc member {itm lst} {
    if {-1 == [lsearch -exact $lst $itm]} { return 0} else { return 1}}

# addset - add an item to a set
proc addset {itm lst} {
    if {! [member $itm $lst]} {
        lappend lst $itm
    return $lst

# wm_elts - Return triples of all WM elements matching pattern
proc wm_elts {ob attr val} {
    output-strings-destination -push -append-to-result
    set wmemstr [wmem "($ob ^$attr $val)"]
    output-strings-destination -pop
    set def ""
    while {[scan $wmemstr "%\[^\n\]%\[ \t\n\]" wm_elt ws] > 0} {
        set ct [scan $wm_elt "(%d: %s %s %\[^)\])" time nob nattr nval]
        if {$ct > 0} {
            lappend def "$nob $nattr $nval"
            set len [string length $wm_elt]
            set len [expr $len + [string length $ws]]
            set wmemstr [string range $wmemstr $len end]
        } else {
            set wmemstr ""
    return $def

# Return all WM objects matching the specified ATTR / VAL
# e.g.
#    all objects - allobs * *
#    all states - allobs superstate *
#    top state - allobs superstate nil
proc allobs {attr val} {
    set obs ""
    foreach wm [wm_elts * $attr $val] {
        set obs [addset [lindex $wm 0] $obs]
    return $obs

# Return the value(s) of an attribute of a particular id.
# Multiple values are separated by newlines.
proc wm_value {id attr} {
    set wmitems [wm_elts $id $attr *]
    set res ""
    foreach item $wmitems {
        set val [string trim [lrange $item 2 end] "| \t\n"]
        set res "${res}\n${val}"
    return $res

Back to Table of Contents

(APT6) How can I trace state changes?

The -trace switch to the print command is intended to be used in conjunction with a Tcl command in a RHS to provide a runtime diagnostic tool.

Andrew's [Howes's suggested] "trace" RHS function was intended to provide a way to print out objects during production firing. I thought it better to add a "-trace" option to the print command and have that command be used via the "tcl" RHS function:

syntax: print -trace [stack-trace-format-string]

Sample RHS usage: (tcl |print -trace | | | ) uses a nice default format string and prints out with indenting appropriate for (goal) state .

Expanded from email between Tom Head [], Kenneth J. Hughes [], Karen J. Coulter [], and Clare Congdon. Thu, 16 Jan 1997 18:46:54 -0500, and other emails.

Back to Table of Contents

(APT7) How can/do I add new Tcl/Tk libraries?

Question from Rich Angros: I want to add some other TCL widget extensions into tksoar. Does the tcl/tk code have any special modifications that are specific to Soar? What restrictions are there on the version of tcl/tk used?

The versions of Soar that are currently available on the web pages all require Tcl 7.4 and Tk 4.0. In order to allow for multiple agents in Soar, we had to extend Tcl within Soar and so we modify some of the Tcl files and keep a private copy. Then when Soar is built, the linker uses the "private' copies of these routines instead of the ones Tcl comes with. So you can pull Tcl 7.4 and Tk 4.0 off the Tcl web sites and use them when building Soar, but Soar will link in a few extended routines of its own. You should be able to add other Tcl extensions in a straightforward manner, without any concern for Soar's modifications of Tcl. In fact, Soar used to be distributed with Blt, but it was cumbersome to support building it on multiple platforms, and we weren't sure how much it was used, so we took it out. You would add Tcl extensions in the soarAppInit.c file, just as you would add it to tkAppInit.c

Soar 7.1 (to be released soon) uses Tcl 7.6 and is completely decoupled from the Tcl routines, since Tcl 7.6 provides support for multiple interpreters. So from Soar 7.1 on, you should be able to upgrade Soar or Tcl packages independent of each other.

From "Karen J. Coulter" []
Date: Mon, 9 Jun 1997 12:06:25 -0400 (EDT)

Back to Table of Contents

(APT8) How can I stick beans up my nose metaphorically in Soar?

There is intended to turn into a rogue's gallery of frequently found bugs that are hard to diagnose on your own.
  • If something fishy happens where items drop out of memory and come back in again in a cycle, check I and O-support. If you have a production cycling (firing repeatedly on the same symbols, the rule does not have o-support like you think it does, and it is removing one of the values that matches its conditions, which forces it to retract and its results to retract. The rule now matches again and the loop continues. You need to rewrite the rule to give it o-support, either by fixing its clauses so that they get o-support, giving it o-support explicitly, or by breaking its results up into o-supported clauses and non-o-supported clauses.

  • If something fishy happens where items drop out of memory and don't come back in, check for attribute value ties. If two values are both acceptable, but not indifferent and not parallel, they will clobber each other and neither will appear.

  • If an operator is proposed but not selected, and there are preferences for making it best, you may wish to check to see if the operator has an acceptable preference. In order to be selected, operators must be acceptable. Best is not good enough on its own.

  • Creating a link in a subgoal to a supergoal. This is an error because it can make the supergoal a result of the subgoal and then all hell breaks loose. [ed. I think, essentially returning a result to a subgoal that's not there any more.]

    Answer from John Laird, Thu, 30 May 1996 09:53:07 PDT

  • If you change the state of Soar with tcl calls, you can get back to the shell fairly quickly. For example, a production that deletes itself.
         sp {delete-me 
            (state  ^superstate nil)
           (tcl |excise delete-me|)}
    Tom Head (16/1/97) noted that he didn't believe that the ramifications of all the possible tcl RHS actions are guarded against, such as (tcl |init-soar|), (tcl |source monkey-time.soar|), or (tcl |soar|). If you are looking for a way to shoot yourself in the foot, using a tcl RHS action is easier than most.

  • If your code is missing a close bracket, Soar will hang, as this exchange of emails explains.
    Date: Tue, 15 Apr 1997 13:54:20 -0400
    From: Tom Head 
    To: Aladin Akyurek 
    Subject: Re: [Soar-Bugs #197] missing closing brace makes Soar hang 
    Aladin Akyurek [] wrote 
    > In case this is not reported, the production
    > sp {x
    >     (state  ^{ << car bicycle >>)
    >     -->
    >     ( ^private-vehicle t)}
    > with a closing brace missing makes Soar hang.
    > On the other hand, if an opening brace is missing, we get:
    > soar> sp {y
    >     (state  ^<< car bicycle >> })
    > extra characters after close-brace
    > soar>     -->
    >     ( ^private-vehicle t)}
    > invalid command name "-->"
    > invalid command name "("
    > soar> 
    Thanx, Aladin, this is probably another candidate for the FAQ.
    Conjunctions that are not properly enclosed with both "{" and
    "}" braces confuse Tcl command completion when your sp command
    also uses braces to enclose your production. If you replace the
    outer sp braces from your examples with double quotes instead,
    you will get a more reasonable response. A proper error can
    not be generated because Tcl either does not believe that a
    production has been completed or completes it prematurely, 
    depending on which brace is missing.

Back to Table of Contents

[End of The Soar less than Frequently Asked Questions List: Appendum to Soar FAQ]