
APT.all-test.Wizards.wizards.ascribe-knowledge.soar Maven / Gradle / Ivy
#Ascribes public knowledge to internal model of another wizard
## If somebody knows that there is a mark on another wizard, then
## a wizard he is thinking about has access to that unless it is about
## that second wizard
sp {wizards*propose*ascribe-knowledge
(state ^name wizards
^knows )
( ^wizard
^knows )
( ^mark
^name )
( ^name <> )
-{( ^wizard )
( ^name
^mark )}
-->
( ^operator + =)
( ^name ascribe-knowledge
^knows
^wizard-name
^attribute mark
^mark )
}
sp {wizards*propose*ascribe-knowledge*guess
(state ^name wizards
^knows )
( ^wizard
^knows )
( ^guessed
^name )
-( ^name )
-{( ^wizard )
( ^name
^guessed )}
-->
( ^operator + =)
( ^name ascribe-knowledge
^knows
^wizard-name
^attribute guessed
^guessed )
}
sp {apply*ascribe-knowledge
(state ^operator )
( ^name ascribe-knowledge
^knows
^wizard-name
^attribute
^ )
( ^wizard
^name )
( ^name )
-->
(write (crlf) |In wizard's | | view, wizard | | has | | | )
( ^ )
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy