Pat email April 10, 2012
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,
he will tell us much more. For example, he might say:
I had a goal to get A on B.
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.
====================================
simple formalization
This leaves out Pat's mete comments and takes Will's remark
seriously that blocks world is not mentioned in the dialog
Two people me and bob (bob is describing to me what he did)
I had a goal to get A on B.
(hear me (say bob (that
(goal me (in W1 (on A B))) )))
I expected that stacking A on B from the table would produce a state
in which A was on B.
(hear me (say bob (that
(expected me (in (do me W1 (stack A B)) (on A B))) )))
here we have the problem of what is an 'action'
(stack A B) is unlikely to be an 'action/rule' for us
as it does not articulate ALL the parameter. Perhapss
(expected me (in (do (stack me W1 A B)) (on A B))) )))
here (in ?W ?E) means that
?E can be found in the belief structure of ?W
note that 'do' is imagined to be descrictive SO
(do (stack bob W1 A B)) (if doable) would result in changing
the belief structure of W1 to contain the effects of stacking
and it would 'replace' the belief structure W1 in bob
SO in the next utterance bob would still refer to this as W1
in this sense we (temporarily) beg the issue of time.
Thus, I created a goal to stack A on B from the table.
(hear me (say bob (that
(done (add-to me me (goal me (do (stack me W1 A B))))) )))
This ugly collections of me is because 'add-to' is an action
which requires both an agent and a world as a parameter
But one of the conditions of stacking A on B, that B be clear, was
not satisfied.
(hear me (say bob (that (and
(precondition (do me W1 (stack A B)) (in W1 (clear B)))
(not (in W1 (clear B))) ))))
note (in W1 (clear B)) means that
the expression (clear B) can be found
in the belief structure of W1
confusing logical 'satisfaction' with this seems wrong
so I use 'in' instead of 'satisfy' for relations
abduction could be used here
to fill in bob's knowledge about actions in W1
So I created a goal to have B clear.
(hear me (say bob (that
(done (add-to me me (goal me (do (clear me W1 B))))) )))
I expected that unstacking C from B to the table would produce a state
in which B was clear.
(hear me (say bob (that
(expected me (in (do me W1 (unstack C B)) (clear B))) )))
Thus, I created a goal to unstack C from B to the table.
(hear me (say bob (thet
(done (add-to me me (goal me (in W1 (unstack C B)))) )))
The conditions for unstacking C from B were satisfied, so I carried
out this action.
(hear me (say bob (that (and
(all-in W1 (predonditions (unstack me W1 C B)))
(done (unstack me W1 C B)) ))))
Carrying out this action achieved the associated goal.
(hear me (say bob (that
(achieved (doing (do (unstack me W1 C B))) (goal me (in W1 (clear B)))) )))
The action also produced a state in which, as expected, B was clear.
(hear me (say bob (that (and
(satisfied (expected me (in (do (unstack me W1 C B)) (clear B))))
(in W1 (clear B)) ))))
Thus, this state satisfied the goal of having B clear.
(hear me (say bob (that
(satisfied (goal me (in W1 (clear B))) )))
The conditions was stacking A on B were satisfied, so I carried out
this action.
(hear me (say bob (that (and
(all-satisfied W1 (preconditions (stack A B)))
(done (stack me W1 A B)) ))))
Carrying out this action achieved the associated goal.
(hear me (say bob (that
(satisfied (goal me (in W1 (on A B)))) )))
The action also produced a state in which, as expected, A was on B.
(hear me (say bob (that
(satisfied (expectation me (in W1 (on A B))))
(in W1 (on A B)) )))
Thus, this state satisfied the goal of having A on B, which solved
the original problem.
(hear me (say bob (that (and
(satisfied (goal me (in W1 (on A B))))
(solved problem) ))))
by abduction
(do (solve-problem me me (on W1 A B)))
This contains a litany
Have expectation
create goal
try to satisfy goal
this could be turned into a 'higher level' activity/action
===============
Now with time
Two people meand bob.
I had a goal to get A on B.
(hear me (say bob t1 (that (goal me (on A B)))))
I expected that stacking A on B from the table would produce a state
in which A was on B.
(hear me (say bob t1 (that
(expected me
(result (doing me t3 blocksworld (stack A B))
(belief me t4 (in blocksworld (on A b)))
Thus, I created a goal to stack A on B from the table.
(hear me (say bob (that
(added-to-goals me (goal me (do blocksworld (stack A B)))) )))
But one of the conditions of stacking A on B, that B be clear, was
not satisfied.
(hear me (say bob (that (and
(precondition (do-in blocksworld (stack A B)) (in blocksworld (clear B))
(not (satified blocksworld (clear B))) ))))
So I created a goal to have B clear.
(hear me (say bob (thet (added-to-goals me (goal me (clear B))))))
I expected that unstacking C from B to the table would produce a state
in which B was clear.
(hear me (say bob (that
(expected me (result (doing me (UNSTACK C B)) (belief me (CLEAR B)))))))
Thus, I created a goal to unstack C from B to the table.
(hear me (say bob (thet (added-to-goals me (goal me (unstack C B) )))))
The conditions for unstacking C from B were satisfied, so I carried
out this action.
(hear me (say bob (that (and
(all-satisfied blocksworld (predonditions (unstack C B)))
(did me (unstck C b)) ))))
Carrying out this action achieved the associated goal.
(hear me (say bob (goal-saisfied blocksworld (???)))))
The action also produced a state in which, as expected, B was clear.
(hear me (say bob (that (in blocksworld (clear B)))))
Thus, this state satisfied the goal of having B clear.
(hear me (say bob (goal-satisfied me (in blocksworld (clear B)))))
The conditions was stacking A on B were satisfied, so I carried out
this action.
(hear me (say bob (and (all-satisfied blocksworld (preconditions (stack A B)))
(preformed-acction blocksworkd (stack A B)))))
Carrying out this action achieved the associated goal.
(hear me (say bob (goal-saisfied blocksworld (???)))))
The action also produced a state in which, as expected, A was on B.
(hear me (say bob (that
(exp-satisfied (expectation me (in blocksworld (on A B)))) )))
Thus, this state satisfied the goal of having A on B, which solved
the original problem.
(hear me (say bob (and
(goal-satisfied me (goal me (in blocksworld (on A b))))
(belief me (solved blocksworld 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.
-working responses to pats email------------------
Will 4/10/12 strat
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'.
do we reipy isR, top, bottom, endtime, before
why not
if we don't - how do we know when to stop
]
[RWW: what about (he rambles on)
(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
;; 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
]
[RWW:
"I had a goal to get A on B."
as Triples (almost (except hears and say)
(hear me t1 (say bob T2 (that
(and (is-goal me G1)
(context-of G1 blocks-world)
(expr-of G1 (on a b))
(time-of G1 T3)
(time-before T3 T2) ) )))
of course
we might have already resolved bob's 'I' to 'bob')
(time-before T3 T2) because of the 'had'
we have to worry about 'quantifying in' with T2
but I think we are safe here (why?)
(define-rule hear-about-goal (?A1 ?T1 ?A2 ?T2 ?A3 ?T3 ?context ?expr)
(:before
(hear ?A1 ?T1 (say ?A2 ?T2 (that (and
(is-goal ?A3 ?G1)
(time-of ?G1 ?T3)3
(context ?G1 ?context)
(expr-of ?G1 ?expr)
(time-of ?G1 ?T3)
(before ?T2 ?T3) ))) )
;; At ?t1 ?A1 hears
?A2 say that ?A3 has a goal
in ?context whose expr is ?expr
;; I changed 'goal' (model) to 'is-goal' (relation)
;; once we begin reifying stuff there is no end AND
;; triples force reification anyway
(know-about ?A1 ?context)
(know-about ?A1 ?A2)
(know-about ?A1 ?A3)
(belief ?A1 (knows-about ?A3 ?context))
)
(:do
(name E2 ?expr)
(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.
-----