Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
enter attributes that match the patterns the rules

Enter attributes that match the patterns the rules for example has

Oops — Room Knowledgebase (room.okb)

3: not(position(end_table, W)),
4: wall(W, L),
L >= TL]
==>
[retract(1),
assert(position(end_table, W, nolamp)),
NewSpace = L - TL,
retract(4),
assert(wall(W, NewSpace))].

rule f12:
[1: position(tv, W),
2: not(position(plug, W))]
==>
[assert(buy(extension_cord, W)),
assert(position(plug, W))].

rule f13:
[1: position(table_lamp, W),
2: not(position(plug, W))]
==>
[assert(buy(extension_cord, W)),
assert(position(plug, W))].

183

% from Winston & Horn's LISP

% Rules for animal identification. The first three rules are an % input loop. Enter attributes that match the patterns in the rules.

initial_data([goal(animal_id)]).

rule 1:
[1: goal(animal_id)]
==>
[assert(read_facts),
retract(1)].

rule id3:
[1: has(X,feathers)]
==>
[assert(isa(X,bird)),
retract(all)].

184

Appendices - Full Source Code

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Sara Robinson

PageId: ELID009BF2