put "The sky is clear" into line 1 of card field "A1"
play "boing"
put "No gas in car" into line 2 of card field "A1"
choose eraser tool
drag from 164,244 to 349,278
choose line tool
set the linesize to 1
drag from 164,244 to 349,278
drag from 349,278 to 344,273
drag from 349,278 to 344,283
choose browse tool
put "No gas in car" into card field "C2"
wait 1 seconds
play "harpsichord" "e"
put "Key is in ignition" into line 1 of card field "A2"
wait 1 seconds
play "harpsichord" "g"
put "Gas gauge is empty" into line 2 of card field "A2"
show card field "Pass"
wait 1 seconds
play "harpsichord" "c5"
put "Take a walk" into card field "C1"
show card field "Comments"
end cardStuff
on closeCard
put empty into card field "A1"
put empty into card field "C1"
put empty into card field "A2"
put empty into card field "C2"
choose eraser tool
drag from 164,244 to 349,278
choose line tool
set the linesize to 1
drag from 191,238 to 191,265
drag from 190,238 to 190,265
drag from 298,258 to 298,286
choose browse tool
hide card field "Comments"
hide card field "Pass"
end closeCard
-- part 1 (field)
-- low flags: 01
-- high flags: 0001
-- rect: left=0 top=76 right=207 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 14
-- style flags: 256
-- line height: 18
-- part name:
-- part 2 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=43 top=216 right=238 bottom=73
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 14
-- style flags: 16640
-- line height: 18
-- part name:
-- part 3 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=75 top=218 right=253 bottom=228
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: A1
-- part 4 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=325 top=235 right=257 bottom=351
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 14
-- style flags: 16640
-- line height: 18
-- part name:
-- part 5 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=351 top=236 right=271 bottom=501
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: A2
-- part 6 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=17 top=251 right=273 bottom=71
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 14
-- style flags: 16640
-- line height: 18
-- part name:
-- part 7 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=76 top=253 right=273 bottom=229
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: C1
-- part 8 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=297 top=271 right=292 bottom=349
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 14
-- style flags: 16640
-- line height: 18
-- part name:
-- part 9 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=352 top=273 right=292 bottom=484
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: C2
-- part 11 (field)
-- low flags: 81
-- high flags: 0001
-- rect: left=13 top=277 right=334 bottom=289
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 14
-- style flags: 256
-- line height: 18
-- part name: Comments
-- part 15 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=367 top=212 right=233 bottom=419
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 14
-- style flags: 17664
-- line height: 18
-- part name: Pass
-- part contents for background part 1
----- text -----
Backward Chaining
-- part contents for card part 1
----- text -----
The inference engine would not be very effective at solving problems if it could only test one Rule. Other Rules that are related to the current problem can be tested by backward chaining them together. While testing each Fact in a Rule, the inference engine will try to find another Rule which has that Fact in it's Conclusion. If it succeeds, that Rule is added to the Goal Trail on the Smart Card of Rules to be tested.
-- part contents for card part 2
----- text -----
If:
-- part contents for card part 4
----- text -----
If:
-- part contents for card part 6
----- text -----
Then:
-- part contents for card part 8
----- text -----
Then:
-- part contents for card part 11
----- text -----
When the new Rule passed, the Fact being tested became true, and the first Rule then passed.