sitcalc sli

Upload: vivek-parmar

Post on 03-Apr-2018

242 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Sitcalc Sli

    1/21

    SITUATION CALCULUS WITH ACTIONS A

    OTHER EVENTS

    John McCarthy

    Computer Science DepartmentStanford University

    [email protected]

    http://www-formal.stanford.edu/jmc/

    2005 Nov 17

    A slogan for AI: Whatever a person can do, he shable to make a computer do for him.

    Almost all of my papers are on the above-mention

    page.

    This lecture proposes Events Primary Sequential sicalculus, EPS sitcalc for short.

  • 7/28/2019 Sitcalc Sli

    2/21

    SITUATION CALCULUS

    Proposed 1963 for formalizing effects of actions

    Improved 2002 to include occurrence axioms.

    http://www-formal.stanford.edu/jmc/sitcalc.htm

  • 7/28/2019 Sitcalc Sli

    3/21

    ACTIONS ARE EVENTS

    In EPS situation calculus, events are primary and

    by actors are a kind of event. EPS is sequential.

    The logic is first order logic without causal ope

    Second order formulas are used for circumscriptio

    An event e has some effect axioms formalizing

    Holds(f luent, Result(e, s))

    An internal event e also has an occurrence axio

    Occurs(e, s),

    and an axiom for the next situation

    Occurs(e, s) Next(s) = Result(e, s).

  • 7/28/2019 Sitcalc Sli

    4/21

    Some phenomena previously axiomatized with

    constraints are often more accurately and conve

    axiomatized by using internal events. When bot

    are blocked the room becomes stuffy.

    We minimize change a situation at a time.

    becoming blocked and the room becoming stuffy

    in different situations.

    When the theory is used for projection of the

    quences of sequences of events, the nonmonoton

    soning is done one situation at a time.

    When an event e is not governed by an occ

    axiom, we have branching time, i.e. non-determ

    When Occurs(e, s) holds, we have linear time.

  • 7/28/2019 Sitcalc Sli

    5/21

    Processes that dont settle down cannot be

    with state constraints. The buzzer is an examp

    the stuffy room elaborated to buzz is another.

  • 7/28/2019 Sitcalc Sli

    6/21

    Result, N ext, N ext

    Result(e, s) gives the situation resulting from

    ter the events formalized to occur have happeneexample, if vent1 is closed, then Result(Block

    Result(Getstuf f y, Result(Block2, s)).

    When what occurs in a situation is determined,

    a next situation satisfying

    Occurs(e, s) Next(s) = Result(e, s).

    When other actions are asserted to occur Nex

    sometimes wanted. Result and Next are undefine

    the system doesnt settle down as in the buzzer

    buzzing stuffy room.

  • 7/28/2019 Sitcalc Sli

    7/21

    A BUZZER1

    A simple buzzer consists of a relay operating a

    switch. When the relay isnt energized, current cthrough the switch operating the relay. When

    lay operates it opens the switch, cutting off the

    through the relay. The system then oscillates, i.e.

    The buzzer has only internal eventsfour of them

    ating and releasing the relay, and operating and re

    the switch.

  • 7/28/2019 Sitcalc Sli

    8/21

    A BUZZER2

    Effect axioms:

    Holds(On(R), Result(Onn(R), s))Holds(On(R), Result(Offf(R), s))Holds(On(Sw), Result(Onn(Sw), s)Holds(On(Sw), Result(Offf(Sw), s)).

    Occurrence axioms:

    Holds(On(Sw), s) Holds(On(R), s) Occurs(Offf(R), s)

    Holds(On(Sw), s) Holds(On(R), s) Occurs(Onn(R), s))

    Holds(On(R), s) Holds(On(Sw), s) Occurs(Offf(Sw), s)

    Holds(On(R), s) Holds(On(Sw), s) Occurs(Onn(Sw), s)

  • 7/28/2019 Sitcalc Sli

    9/21

    THE STUFFY ROOM

    A room has two vents, vent1 and vent2. The ve

    be opened or closed. When both vents are closroom is, or becomes stuffy. Matt Ginsberg propos

    scenario in 1988 to show that simply minimizing

    gives an unintended model, namely a model in whic

    one vent is closed, the other opens, which avoids ch

    the stuffiness of the room.

    We formalize this using the internal events of th

    becoming stuffy or unstuffy.

    We then elaborate the scenario to express that w

    room is stuffy, Pat then opens a vent.

  • 7/28/2019 Sitcalc Sli

    10/21

    THE STUFFY ROOMsimple

    Effect axioms:Holds(Blocked1, Result(Block1, s))

    Holds(Blocked2, Result(Block2, s))Holds(Blocked1, Result(Unblock1, s))Holds(Blocked2, Result(Unblock2, s))Holds(Stuf f y, Result(Getstuff y, s))Holds(Stuf f y, Result(U ngetstuf f y, s))

    Occurrence axioms:

    Holds(Blocked1, s) Holds(Blocked2, s)Holds(Stuffy,s)

    Occurs(Getstuf f y, s)and

    (Holds(Blocked1, s) Holds(Blocked2, s))Holds(Stuff y, s)

    Occurs(U ngetstuf f y, s)

  • 7/28/2019 Sitcalc Sli

    11/21

    ELABORATING THE STUFFY ROOM

    The first elaboration says that when Pat finds th

    stuffy he unblocks vent2. We have

    Holds(Stuffy,s) Occurs(Does(P at, U nblock2),

    A second elaboration in which Mike finds the roo

    when there is an unblocked vent and blocks vent

    pressed by

    Holds(U nstuf f y, s) Occurs(Does(M ike, Block2

    With both elaborations, we get an oscillation; P

    blocks vent2 and Mike blocks it again.

  • 7/28/2019 Sitcalc Sli

    12/21

    NONMONOTONIC REASONING IN SITCA

    Projection is the easy case of nonmonotonic rea

    about the effects of events.

    When we project, we can circumscribe in each

    tion successively. It gives the same results as Sh

    chronological minimization but is much simpler

    cally. It doesnt suit the stolen car scenario in w

    fact about the future is given.

    We minimize the predicates Occurs, Prevents, C

    etc. Strictly speaking, we circumscribe (e)Occu

    and (f e)Prevents(f , e , s), (e f)Changes(e , f , s).

  • 7/28/2019 Sitcalc Sli

    13/21

    NONMONOTONIC REASONING2

    F oo s F oo (vars)(F oo(vars, s) F oo(vars(F oo

  • 7/28/2019 Sitcalc Sli

    14/21

    Axiom(F oo, vars) (f oo vars)(Axiom(f oo, vars) ((vars)(f oo(vars, s)

    F oo(vars, s)) (vars)(F oo(vars, s) f oo(vars, s)))).

    Call this formula Circ(Axiom; F oo; vars; s).

    The general frame axioms are

    Changes(e,p,s) (Holds(p, Result(e, s)) Holds

    for propositional fluents and

    Changes(e , f , s) V alue(f, Result(e, s)) = V alue

    for general fluents.

  • 7/28/2019 Sitcalc Sli

    15/21

    NARRATIVES

    A narrative is a set of situations, event, and ass

    about situations and maybe assertions about even

    A simple narrative consists of two sequences (S1and (E1, E2, . . .), where Si+1 = Result(Ei, Si) for e

    Unfortunately, real narratives, whether historicational, are rarely if ever simple.

  • 7/28/2019 Sitcalc Sli

    16/21

    SOME PHILOSOPHY

    Assume a deterministic worldif you like with s

    tic processes and quantum processes. That doesfree will.

    Some entities, including people and chess promake choices.

    Making a choice involves considering the conseq

    of alternative actions, e.g. using a non-deterministlike situation calculus. This is minimal free will.

    Thus deterministic entities use non-deterministries.

    Do the philosophy as you like, but this is how AIbe done.

  • 7/28/2019 Sitcalc Sli

    17/21

    FREE WILL IN A DETERMINIST WORLD

    We can make our theory of a process more dete

    by adding occurrence axioms. We can do it if wmore or adopt rules for deciding on actions.

    Human free will may consist of using a non-dete

    theory to decide deterministically on an action.

    Heres a minimal example of using a non-determin

    ory within a determinist rule.

    Occurs(Does(John,if Prefers(John, Result(Does(J ohn, a1), s),

    Result(Does(J ohn, a2), s))then a1else a2

    ), s).

  • 7/28/2019 Sitcalc Sli

    18/21

    Here Prefers(J ohn, s1, s2) is to be understood as

    ing that John prefers situation s1 to s2.

    Do animals, even apes, make decisions based o

    paring anticipated consequences? If not, can a

    trained to do it? Chess programs do. Accord

    Dan Dennett, some recent experiments suggest th

    sometimes consider the consequences of altern

    tions.

    We envisage an extended theory of free will th

    treat whether an action was done freely and wh

    merits blame or praise.

  • 7/28/2019 Sitcalc Sli

    19/21

    CONCLUSIONS AND REMARKS

    This formalism is preliminary. It needs to be ela

    to allow concurrent and continuous events.

    Sequential processes, as treated in EPS, are wort

    rate formalization, because most common sense na

    and planning fit within the sequential case.

    The eventual formalism must permit elaboratinquential theory by adding a few or many concur

    continuous processes. On the other hand, specia

    to the sequential case also needs to be a simple op

    on a theory allowing concurrent events.

    For the future: It would be more Newton-likethat a proccess continues until something interrup

  • 7/28/2019 Sitcalc Sli

    20/21

    OTHER WORK

    Events that are not actions have been previously us

    least by Fangzhen Lin, Sheila McIlraith, and Javie

    Occurrence axioms are even more important in th

    ment of concurrent events in situation calculus

    the subject of another article.

    http://www-formal.stanford.edu/jmc/freewill2.ht

    these ideas to formalizing simple deterministic fre

    This work benefited from discussions with Eya

    Tom Costello, Ron Fadel, Hector Levesque, Vladim

    chitz, Fangzhen Lin, Sheila McIlraith, Leora Morge

    Aarati Parmar, Raymond Reiter, and Tran Son a

    comments of three anonymous referees.

  • 7/28/2019 Sitcalc Sli

    21/21

    This research was partly supported by SRI Subc

    No. 34-000144 under SPAWAR Prime Contract No

    00-C-8018.