
ICARUS: rww notes
AbRA
The goal if the AbRA system is populate knowledge system
report back the beliefs and goals
-----
Responces to Will 4/10/12
Agents: me and bob. Bob is the speaker here.
"I had a goal to get A on B."
Nested:
(hear me (action t1 (say bob (goal bob (on a b t2)))))
* note that i'm allowing that something else has resolved
that "I" was bob. we could have (goal me (on a b)), but
that would require a unification operator that turns
"me" into "bob" (or whomever the correct agent is at some
level of nesting) when moving from "say" to acceptance of
the belief. as you'll see below, since we can't look inside
?x in the rule, we need to make that a special conversion.
imagine, "Bob said that Tom said that George said, 'I had a
goal to get A on B.'" The deepest me would refer to George.
* note also we need to hear that t2 < t1. not sure how to
do that yet, but i'll try below. the result has to be
translatable into a constraint that we can use to rule out
bindings of future events to past occurrences.
[RWW: Shouldn't t2 be an attribute os goa; NOT the 'on'?]
So we could reify the relation to get a more general representation:
(hear me (action t1 (say bob (goal bob (isR r1 on)))))
(hear me (action t1 (say bob (goal bob (top r1 a)))))
(hear me (action t1 (say bob (goal bob (bottom r1 b)))))
(hear me (action t1 (say bob (goal bob (endtime r1 t2)))))
(hear me (action t1 (say bob (goal bob (before t2 t1)))))
[RWW: aha I see - you mean r1 has 4 properties
1) r1 is a relation
2) the 'arg' of r1 bob calls 'top' is 'a'
3) the 'arg' of r1 bob calls 'bottom' is 'b'
4) the 'attribute' of r1 called 'endtime' is't2'
and
t1, the time of the 'say', is before t1, the 'endtime'.
[RWW: what about
(hear me t1 (say bob (that (lets-discuss 'blocks-world)
; 1. note this remark is in Pat's original email!!!!!
; 2. I now believe that if OUR general knowlwdge contains
; a theory of the blocks world
; this remark should result in
; moving it to our 'working memory'
;; explicitly stating what's in an agents long term memory (ltm)
;; here we have called (ltm agent) LTM to avoid full unification
;; in a general cognative architecture LTM could itself be a context
;; NOTE: sub agents currently do NOT have a LTM!!!
;; SO by 'default' have the same general beliefs as we do
(declare-type '[blocks-world]')
(assert LTM (subtype [blocks-world] [context])
(declare-indconst LTM 'blocks-world' '[blocks-world]')
(attach LTM 'blocks-world' (make-blocks-world-context)))
(assert LTM (knows-about me blocks-world)))
(
;; note: you assert [sentense]s your do [action]s
;; (know-about me blocks-world) is
;; a statement in the language SO
;; there are no quotes around blocks-world
;; whereas
;; (declare-indconst LTM 'blocks-world' 'contect')
;; describes an action which puts the symbol 'blocks-world'
;; into the language of LTM
;; and assigns it the type/sort called 'conntext'.
;;
(create-rule heard-lets-discuss (?A1 ?A2 ?name1 ?name2)
(:before
(hear ?A1 (say ?A2 (that (lets-discuss ?name2))))
; ?A2 must already has a 'meaning' (be known)
; (in our case the agent called 'bob')
; ?name2 must already has a 'meaning' (be known)
; (in our case ?name2 is 'blocks-world')
(belief ?A1 (name-for ?A2 ?name1))
(belief ?A1 (has-attachmant ?A1 ?name1))
(belief ?A1 (knows-about ?A1 ?Name2))
)
(:do
(import-into ?A1 LTM 'blocks-world')
(import-into ?A2 ?A1 'blocks-world')
(:after
; the '--' means a conclusion we could draw NOT nesessartily a belief
; you already do something to decide whether or not to assert a consequenses
-- `(Indconst ?A1 ?name1)
-- `(Indconst ?A1 ?name2)
-- `(type-of blocks-world [blocks-world])
-- `(belief ?A1 (knows-about ?A2 blocks-world))
-- `(belief ?A2 (knows-about ?A1 blocks-world))
...
))
;; above have reified the language of an agent
D ;; language needs to be reified or you can't say things like
;; 'dad calls her Mary but I call her mom.'
;; see note ms-es
;; this was moved from rww doc repository
;; I now believe that OUR madel of the blocks world comes with this already inited.
(create-rule init-language (?A1 ?bs ?bs-type)
(:before
(type-of ?A1 ?bs ?bs-type)
(init-lang ?bs-type ?l1)
(:do
; hierarchy
; (foreach sym 'in' ?l1)
(declare ?A1 (sym-info sym) ?s1)
(:after
; (foreach sym 'in' ?l1)
-- (in-lang ?bs sym)
(hear me t1 (say bob (that (goal me (belief blocks-world (on a b)))
or
(hear me t1 (say bob (that (goal bob (belief blocks-world (on a b)))
where the internal 'me' has been resolved to 'bob')
(define-belief-revisipn hear-about-goal
(:before
(hear ?A1 (say ?A2 (that (goal ?A3 (belief ?W1 ?statement))))
;; ?A1 hears ?A2 say that ?A3 has a goal
that ?statement is 'believed' in ?W1
)
(:do
(make-context ?A1 ?A2) ; nop if it exists
(make-context ?A2 ?A3)
(name E1 (goal ?A3 (that ?statement)))
(name E2 ?statement)
(add-to ?A1 (belief ?A1 E2)))
(:after
(belief ?a1 (goal-not-satisfied E1)))
(belief me (not (satisfied blocks-world E2)))
at this point can conclude that bob's goal is not satisfied
deeply because he said 'have' has not 'had'
but in our case because he 'said' it as a goal
(hear ?a1 (action ?t (say ?a2 ?x))) ->
(belief ?a1 (action ?t (say ?a2 ?x)))
* ?x above isn't currently supported by AbRA but is on
the agenda. rules of this form can only have one variable
that resolves to a literal. the rule will either fire
deterministically on all matching generated beliefs or
it will fire when it matches against the focus of
attention.
(belief ?a1 (action ?t (say ?a2 ?x))) ^ (conditions of reliability) ->
(belief ?a1 ?x)
* i've factored out the "inform" step because i'm not sure
what the conditions are, and having more than one rule
with ambiguous conditions seems unhelpful. i suppose the above
rule should go from a belief about an inform instead of a
belief about a say. we may want to push the conditions of source
reliability to the inform rule depending on whether we put
inform on the same level of lying or not.
Note that through default ascription, we get a defeasible assumption that I believe that bob believes that he said all that stuff that I heard.
Now we have all sorts of special symbols: goal, belief, action, hear, say.
-----
RWW thoughts April 10, 2012
This is pats email April 10, 2012 annotated by rww
Suppose that agent X has just solved a blocks world problem. In the
initial state, blocks A and B were on the table and block C was on B.
Further suppose the goals involved having A on B, and that X has
solved the problem by unstacking C from B to the table, then stacking
A on B. We should not have any difficulty representing this information.
[Note this assumes nonstandard versions of unstack and stack that move
a block directly from another block to the table and vice versa.]
However, if we ask agent X what was in his mind during his solution,
[RWW: he will tell us] much more. For example, he might say:
I had a goal to get A on B.
[RWW:
(say I (lets-call G1 (sentense (on A B))))
(say I
]
I expected that stacking A on B from the table would produce a state
in which A was on B.
Thus, I created a goal to stack A on B from the table.
But one of the conditions of stacking A on B, that B be clear, was
not satisfied.
So I created a goal to have B clear.
I expected that unstacking C from B to the table would produce a state
in which B was clear.
Thus, I created a goal to unstack C from B to the table.
The conditions for unstacking C from B were satisfied, so I carried
out this action.
Carrying out this action achieved the associated goal.
The action also produced a state in which, as expected, B was clear.
Thus, this state satisfied the goal of having B clear.
The conditions was stacking A on B were satisfied, so I carried out
this action.
Carrying out this action achieved the associated goal.
The action also produced a state in which, as expected, A was on B.
Thus, this state satisfied the goal of having A on B, which solved
the original problem.
This trace adopts the distinction between state-like and action-like
goals that we discussed at our recent meeting. It also distinguishes
between action-like goals and beliefs that the agent has actually
carried out the action. The trace hints at a need for explicit
expections, which we will definitely need at some stage, since they
may not always be met, although that does not happen in this case.