Lecture, Wednesday 8/21/2002

 

More on “Why AI is hard”:

 

The knowledge needed by AI methods –

-         may not be available in the world

-         may be HUGE, unmanageable

-         may be multimodal (in different forms),

-         may be incomplete, incorrect, uncertain

 

THUS, AI methods can fail; then what?  How to recover from failure in achieving goals? – Agents need to make use of experience; agents need to use feedback to learn, adapt.

 

Example – making coffee- an ill-defined problem; what’s “good” coffee?  Agent needs feedback to know what the user wanted, what went wrong, how to do a better job next time.

 

AI problems can be ill-defined, with:

-         ill-defined goals

-         ill-defined performance measures

 

(Example:  Chess – well-defined, easy goal; but even then, AI is hard…)

 

We need a way to evaluate the solutions produced.

(Note that when reading text-book, the output is a parse-tree – but outputs cannot always be so well-defined)

 

One wants agents that can learn – come up with new goals and performance measures.

 

(This need led to the book, “Principles of Bounded Rationality” (Simon, 1957).)

 

There are various definitions of “rationality”, and agents have limited computation and information resources;

therefore, their behavior is “satisficing,” not optimal (but, hopefully, nearly optimal).  Satisficing means “good enough”

 

Thus, we could add a third column to the think/act matrix:

 

think            think             think around bounded rationality

like human    rationally

------------|------------|------------------

 act human    act               Act around bounded rationality

                     rationally

 

An agent is “rational” in that its actions:

i)                    achieve goals

ii)                   that are commensurate with its resources

 

Sometimes it’s not the optimal solution that we want; e.g., the “total time” is the sum of planning time plus execution time.  The “optimal” solution might have the shortest execution time; but if it takes too long in planning time to get the best execution time, the total time is too long and it’s a bad solution, even though the execution time is shortest.

 

SO, we don’t optimize always – we pick a reasonable approach, then proceed to action; we use heuristics.  SO, there are two issues:

i)                    processing efficiency (how long it takes to get a solution)

ii)                   quality of the solution  (which, by the way, is not always measured just by execution time)

 

Now, for 1st “technical topic” of the course:  Agent Architectures

first, 2 general diagrams, alternative views of agent architectures:

 

1)     à  perception   à  cognition  à action  à effect on world

 

OR,

 

2)                  cognition  ß  (results)

                                  \

       à perception  à action   

(i.e., in architecture 2, perception can lead straight to action, without any thinking first; then we can think about the results and perhaps modify the action accordingly)

 

for example:  walking, reflexes, pulling hand away from hot stove – these follow architecture 2; you don’t have to think before taking the action of pulling hand from stove; best not to think first, better to act quickly, in that situation…

 

 

The book identifies four general agent architectures (but these are not the only 4):

 

  1. reactive (a reflex agent)

                            world now   ß  (sensors)           [

                                   |                                          [ WORLD

       RULES  à       actions     à   (effectors)        [

 

Notice, there’s no memory here – action depends solely on the current state of the world (and the rules)

 

Advantages: 

-         fast

-         doesn’t use many resources

-         could work well if new rules can be learned – (but if agent learns/modifies new rules, isn’t that a form of memory?)

 

     Disadvantages:

-         no way to learn from the past and remember things – (except perhaps to incorporate new rules)

-         if the rule set is incomplete, there won’t always be good decisions – e.g. can’t “path plan”; if agent hits a dead end, agent is stuck.

 

 

  1. state-based – contains a “little” memory; “memory / knowledge” architecture:  (still a reflex agent)

note: these diagrams are in the book, pp. 41-45. 

 

world state     à

 

world changes à       world now      ß     (sensors)    ß            [

                                          |                                                        [

past actions  à                  |                                                        [    WORLD

                                          |                                                        [

condition-action   |                                                        [

RULES              à       ACTION       à  effectors     à 

 

Example:  agent wants to change lanes on highway, but, can’t see to the left if there’s a car there.  A moment back, it knows (remembers) that nothing was there  (see “world state” above).  Also, knows that it has been accelerating (see “past actions” above).  So, it concludes what the world is like NOW (it’s unlikely that anything is there now), and based on the RULES, decides that it’s OK to change lanes.

 

Note, there could be architectures between 1 and 2 – e.g. agent could keep a notepad in view (which would then be part of the current world state), on which it records where it parked a car; that way, even without “memory” of past world states/changes, it could find the car in the parking lot.

 

 

  1. goal-based architecture – not just a reflex architecture; this one takes into account more than just the current state of the environment.

 

past world state             ->             

 

world changes               ->                   world now                                ß  (sensors)  ß

                                                            (compute “world now” based on

                                                            all three items on left)

what my actions       à       world “if”                                                                                         WORLD

 do                                            (compute what world would be like if I took a given action,

                                                   based on how the world changes AD what my actions do)

                                                  |

                                                  |

 

GOALS      à                       actions I                                               à  (effectors)   à

                                              should do now

                                              (based on world “if” and GOALS

 

Here, use goals to determine which action to take – we predict the effect of a possible action on the world, and consider goals of how the agent wants the world to become.

 

  1. utility-based architecture

 

here, we consider the usefulness of a state:

 

past world state                          

 

how the world evolves                                           world now     ß  (sensors)        ß

 

what my actions do       à       what world would be like if I do an action                                              WORLD

                                                  |  |  |  |  |

                                                  |  |  |  |  |   (these lines represent lots of different alternative ways to achieve a desired goal;

                                                  |  |  |  |  |       consider the utility of each such solution/action.)

UTILITY      à                       how happy I will be in such a state

                                                        |

                                             what action I should do now            à  (effectors)       à                                     

                                                                                        

 

For example, getting to airport is goal; lots of routes are available – need a measure of usefulness; “not only do I want to get to the airport, but another constraint/ measure of usefulness is, I need to get there quickly.  It’s more useful if I get places quickly.  For each of the alternatives, computer how “happy” the agent would be – how useful the result is.

Maybe could think of this as hard constraints v. soft constraints (can “bend” on the soft constraints)

 

By the book’s view, all of the constraints on actions can be translated into measures of utility.