REM Goal loop example REM ================= REM This knowledge base will produce run time error 205 (Goal loop) REM The first rule tried will be [loop 2] because it can determine a value of the [action] attribute. REM The backward chaining process tries to find rules to conclude goals an interim goals before invoking a prompt REM A value of [interim] is required to fire [loop 2]. The [connection] rule can determine this value. REM A value of [reaction] is required to fire [connection]. The [loop 1] rule can determine this value. REM A value of [action] is required to fire [loop 1]. The [loop 2] rule can determine this value -- and loop begins. RULE [loop 1] If [action] = true Then [reaction] = false RULE [connection] If [reaction] = false Then [interim] = true RULE [loop 2] If [interim] = true Then [action] = true PROMPT [interim] YesNo "Is interim true?" GOAL [action]