agent programming in dribble from beliefs to goals with plans birna van riemsdijk wiebe van der hoek...
Post on 20-Dec-2015
215 views
TRANSCRIPT
Agent programming in Dribble
from beliefs to goals with plans
Birna van RiemsdijkWiebe van der HoekJohn-Jules Ch. Meyer
Utrecht University John-Jules Meyer 2
Motivation
◊ Our group has done work on agent programming languages in the past– 3APL: beliefs and goals-to-do– GOAL: beliefs and goals-to-be
◊ Natural question: how to combine these?
Utrecht University John-Jules Meyer 3
Answer: Dribble
◊ Dribble is an agent programming language containing:– Beliefs– Goals-to-be– Goals-to-do (Plans)
Utrecht University John-Jules Meyer 4
Mental States
◊ Mental state – Belief base : set of prop. forms– Goal base : set of prop. forms– Plan : sequence of ‘basic
elements’ (imperative program)
Utrecht University John-Jules Meyer 5
Belief and Goal Formulas
◊ Belief formulas• B
◊ Goal formulas
• G• logical consequences of particular goal
are also goals, if not believed
◊ Logical combinations
Utrecht University John-Jules Meyer 6
Plans
◊ Plan is sequence of basic elements◊ Basic elements:
•Basic action •Abstract plan•If-then-else construct
Utrecht University John-Jules Meyer 7
Basic Actions
◊ Basic action•executable •belief update•goal update: goals removed when
realised (thru commitment strategy)
Utrecht University John-Jules Meyer 8
Abstract plans
◊ Abstract plan•not executable •abstraction mechanism (compare
procedures) •translation into basic actions
Utrecht University John-Jules Meyer 9
If-then-else
◊ If-then-else construct if then 1 else 2 fi
•executable •plan update
Utrecht University John-Jules Meyer 10
Executing Basic Actions
◊ A basic action has as effects:– Belief update
•E.g. after execution of moveLeft, the agent believes to have moved left
– Goal update•Indirect, side effect of belief update
via commitment strategy
Utrecht University John-Jules Meyer 11
Commitment Strategy
◊ Commitment strategy– connection between beliefs and goals
– when are goals dropped?• when believed to have been achieved
Utrecht University John-Jules Meyer 12
Goal Rules
◊ Goal rules have form – taken from GOAL : a– used for plan selection
– is condition on beliefs and/or goals• Beliefs: specify when the plan could be
executed• Goals: specify what the plan is good for
Utrecht University John-Jules Meyer 13
Goal Rules (ctd)
– applicable in E iff E (selection of new plan only if current plan is empty)
– resulting mental state is (adoption of plan )
Utrecht University John-Jules Meyer 14
PR Rules
◊ Practical Reasoning (PR) rules:h b
– taken from 3APL– is condition on beliefs– employed for
• Creating plans : p a;b;c
• Modifying plans : h b
• Modeling reactive behaviour : E b
Utrecht University John-Jules Meyer 15
PR Rules (ctd)
– applicable in h iff h
– resulting mental state is b (adoption of plan b instead of h )
Utrecht University John-Jules Meyer 16
Operational Semantics
◊ Operational semantics based on transition system
• definition of mental state transformations
◊ Transition rule for basic action execution
• T(a,) defines update of by executing action a
Utrecht University John-Jules Meyer 17
Transition rules
◊ Application of goal rule g:
E EapplyRule(g)
Utrecht University John-Jules Meyer 18
Transition Rules
◊ Execution of a basic action a:
T(a,) = ’_______________________aExecute(a) ’’E
where ’\’
Utrecht University John-Jules Meyer 19
Summary So Far
◊ Dribble agent– Mental state
• belief base, goal base, plan
– Goal rules• plan selection
– PR rules• plan creation and modification
Utrecht University John-Jules Meyer 20
Dynamic Logic
– specify and verify properties of programs
– programs: syntactic constructs in the logic
– p: possible to execute p and halt in state satisfying
– program is transformation function on states: reason about state transformations
Utrecht University John-Jules Meyer 21
Logic for Dribble
◊ Dynamic logic for Dribble– transformations on mental states
caused by:• goal and PR rule application and action
execution
– reason about state transformations• reason about rule application and action
execution of meta-actions
Utrecht University John-Jules Meyer 22
Syntax
◊ : sequence of meta-actions• applyRule(g), applyRule(), execute(a),
execute(if-then-else)
◊ : mental state formula• B(), G(), Com()
Utrecht University John-Jules Meyer 23
Semantics
◊ r* : semantics of meta-actions• transformation function on mental states through
meta-actions ◊ interpretation of diamond formulas:
– r*
◊ Com formulas– Com’’
Utrecht University John-Jules Meyer 24
Semantics
◊ Semantics of applyRule(g)
for g: ’
r* (applyRule(g)) (’
if = E and
Utrecht University John-Jules Meyer 25
Correspondence
◊ Mental state transitions
- defined by transition system(meaning of Dribble agent)
- defined by actions in the logic
(by means of the r* function)
Utrecht University John-Jules Meyer 26
Correspondence (ctd)
◊ Correspondence of logic and operational semantics– transition defined by actions in
the logic transition defined by transition system
– properties of actions in logic: properties of Dribble agent
Utrecht University John-Jules Meyer 27
Some Validities
◊ Results of meta-actions• [applyRule(g)] Com()
• Com(h) [applyRule()]Com(b)
• Com(a;) [a] [execute(a)](Com() )
• Com(if;) [execute(if)] Com(1), where if = if then 1 else 2 fi
[Where g: and : h b]
Utrecht University John-Jules Meyer 28
Some Validities (ctd)
◊ Realisability of meta-actions• Com(E) applyRule(g)T• Com(h) applyRule()
Com(b)
• Com(a;) aT execute(a)Com() • Com(if;) execute(if) T, where if = if then 1 else 2 fi
[Where g: and : h b]
Utrecht University John-Jules Meyer 29
Conclusion
◊ agent programming language– incorporating goals and planning
features– formally defined semantics
◊ programming logic– a first attempt to reason about these
‘self-modifying’ programs (via meta-actions)
Utrecht University John-Jules Meyer 30
Future Work
◊ incorporate first-order languages◊ selection of goal from wish base◊ explicit goal adopt and drop actions◊ drop goal when believed to be
unachievable◊ investigation of use of adding goal
formulas in PR rules