[[CogModel]]
Larkin and Simonに掲載されていたモデル。PSEWでは動作しない。
競合解消がうまくいかない。一度使ったバインディングで何度も発火。
条件節の順序を何度も入れ替えねばならない。ルールを使うたびに優先順位が下がるといいのかも。
*ワーキングメモリ [#s0ba6bfb]
- (Weight W1)
- (Roape Rp)
- (Roape Rq)
- (Pulley Pa)
- (hangs W1 from Rp)
- (pulley-system Rp Pa Rq)
- (Weight W2)
- (hangs W2 from Rq)
- (Rope Rx)
- (Pulley Pb)
- (Roape Ry)
- (Pulley Pc)
- (Rope Rz)
- (Rope Rt)
- (Rope Rs)
- (Ceiling c)
- (hangs Pa from Rx)
- (pulley-system Rx Pb Ry)
- (pulley-system Ry Pc Rz)
- (hangs Pb from Rt)
- (hangs Rt from c)
- (hangs Rx from c)
- (hangs Rs from Pc)
- (hangs W2 from Rs)
- (value W1 1)
*ルール [#w26dee79]
- name: P1
if:
- (Weight ?Wx)
- (Roape ?Ry)
- (value ?Wx ?n)
- (hangs ?Wx from ?Ry)
then:
- (*deposit (value ?Ry ?n))
- name: P2
if:
- (Pulley ?P)
- (Roape ?R1)
- (Roape ?R2)
- (pulley-system ?R1 ?P ?R2)
- (value ?R1 ?n1)
then:
- (*deposit (value ?R2 ?n1))
- name: P31
if:
- (Pulley ?P)
- (Roape ?R1)
- (Roape ?R2)
- (pulley-system ?R1 ?P ?R2)
- (hangs ?R3 from ?P)
- (value ?R1 ?n1)
- (value ?R2 ?n2)
then:
- (*deposit (value ?R3 (*addition ?n1 ?ne)))
- name: P32
if:
- (Pulley ?P)
- (Roape ?R1)
- (Roape ?R2)
- (pulley-system ?R1 ?P ?R2)
- (hangs ?P from ?R3)
- (value ?R1 ?n1)
- (value ?R2 ?n2)
then:
- (*deposit (value ?R3 (*addition ?n1 ?n2)))
- name: P4
if:
- (Weight ?W1)
- (Roape ?R1)
- (Roape ?R2)
- (hangs ?W1 from ?R1)
- (hangs ?W1 from ?R2)
- (value ?R1 ?n1)
- (value ?R2 ?n2)
then:
- (*deposit (value ?W1 (*addition ?n1 ?n2)))