1 / 29

Intelligent Agents and Rationality: Key Concepts and Environments

This chapter explores intelligent agents and their rationality, including their performance measures, knowledge about the environment, and actions they can perform. It also discusses the autonomy of agents and different types of environments they operate in. Examples of intelligent agents and their structures are provided.

akoller
Download Presentation

Intelligent Agents and Rationality: Key Concepts and Environments

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Plans for Today • Chapter 2: Intelligent Agents (until break) • Lisp: Some questions that came up in lab • Resume intelligent agents after Lisp issues

  2. Intelligent Agents • Agent: anything that can be viewed as… • perceiving its environment through sensors • acting upon its environment through actuators • Examples: • Human • Web search agent • Chess player • What are sensors and effectors for each of these?

  3. Rational Agents • Conceptually: one that does the right thing • Criteria: Performance measure • Performance measures for • Web search engine? • Tic-tac-toe player? Chess player? • When performance is measured plays a role • short vs. long term

  4. Rational Agents • Omniscient agent • Knows actual outcome of its actions • What info would chess player need to be omniscient? • Omniscience is (generally) impossible • Rational agent should do right thing based on knowledge it has

  5. Rational Agents • What is rational depends on four things: • Performance measure • Percept sequence: everything agent has seen so far • Knowledge agent has about environment • Actions agent is capable of performing • Rational Agent definition: • Does whatever action is expected to maximize its performance measure, based on percept sequence and built-in knowledge

  6. Autonomy • “Independence” • A system is autonomous if its behavior is determined by its percepts • An alarm that goes off at a prespecified time is not autonomous • An alarm that goes off when smoke is sensed is autonomous • A system without autonomy lacks flexibility

  7. The Task Environment • An agent’s rationality depends on • Performance Measure • Environment • Actuators • Sensors What are each of these for: • Chess Player? • Web Search Tool? • Matchmaker? • Musical performer?

  8. Environments: Fully Observable vs. Partially Observable • Fully observable: agent’s sensors detect all aspects of environment relevant to deciding action • Examples? • Which is more desirable?

  9. Environments: Determinstic vs. Stochastic • Deterministic: next state of environment is completely determined by current state and agent actions • Stochastic: uncertainty as to next state • If environment is partially observable but deterministic, may appear stochastic • If environment is determinstic except for actions of other agents, called strategic • Agent’s point of view is the important one • Examples? • Which is more desirable?

  10. Environments: Episodic vs. Sequential • Episodic: Experience is divided into “episodes” of agent perceiving then acting. Action taken in one episode does not affect next one at all. • Sequential typically means need to do lookahead • Examples? • Which is more desirable?

  11. Environments: Static vs. Dynamic • Dynamic: Environment can change while agent is thinking • Static: Environment does not change while agent thinks • Semidynamic: Environment does not change with time, but performance score does • Examples? • Which is more desirable?

  12. Environments: Discrete vs. Continuous • Discrete: Percepts and actions are distinct, clearly defined, and often limited in number • Examples? • Which is more desirable?

  13. Environments: Single agent vs. multiagent • What is distinction between environment and another agent? • for something to be another agent, maximize a performance measure depending on your behavior • Examples?

  14. Structure of Intelligent Agents • What does an agent program look like? • Some extra Lisp: Persistence of state (static variables) • Allows a function to keep track of a variable over repeated calls. • Put functions inside a let block • (let ((sum 0)) (defun myfun (x) (setf sum (+ sum x))) (defun report () sum))

  15. Generic Lisp Code for an Agent • (let ((memory nil)) (defun skeleton-agent (percept) (setf memory (update-memory memory percept)) (setf action (choose-best-action memory)) (setf memory (update-memory memory action)) action ; return action ))

  16. Table Lookup Agent • In theory, can build a table mapping percept sequence to action • Inputs: percept • Outputs: action • Static Variable: percepts, table

  17. Lookup Table Agent • (let ((percepts nil) (table ????) (defun table-lookup-agent (percept) (setf percepts (append (list percept) percepts)) (lookup percepts table)) ))

  18. Specific Agent Example:Pathfinder (Mars Explorer) • Performance Measure: • Environment: • Actuators: • Sensors: • Would table-driven work?

  19. Four kinds of better agent programs • Simple reflex agents • Model-based reflex agents • Goal-based agents • Utility-based agents

  20. Simple reflex agents • Specific response to percepts, i.e. condition-action rule • if new-boulder-in-sight thenmove-towards-new-boulder • Advantages: • Disadvantages:

  21. Model-based reflex agents • Maintain an internal state which is adjusted by each percept • Internal state: looking for a new boulder, or rolling towards one • Affects how Pathfinder will react when seeing a new boulder • Can be used to handle partial observability by use of a model about the world • Rule for action depends on both state and percept • Different from reflex, which only depends on percept

  22. Goal-Based Agents • Agent continues to receive percepts and maintain state • Agent also has a goal • Makes decisions based on achieving goal • Example • Pathfinder goal: reach a boulder • If pathfinder trips or gets stuck, can make decisions to reach goal

  23. Utility-Based Agents • Goals are not enough – need to know value of goal • Is this a minor accomplishment, or a major one? • Affects decision making – will take greater risks for more major goals • Utility: numerical measurement of importance of a goal • A utility-based agent will attempt to make the appropriate tradeoff

  24. Lisp Questions

  25. Why the dot in cons?Two Explanations: • High level: cons expects a list in the second position • Lower level: • Cons takes a cons cell from the free storage list • Puts first argument in “first” position • Puts second argument in “rest” position • Separates by a dot, unless “rest” position is a pointer (indicates continuing list)

  26. How does append work? • Makes copy of first list • Takes last pointer and points to second list • Picture

  27. How to debug? • Can trace function calls with (trace function) and (untrace function) • Demonstration with mystery function from lab • At a Break> prompt, can see call stack with • backtrace • Can go through code step by step • (step (mystery 2 3)) • Use step and next to go through each function as you go along • Use (print var)

  28. Random bits Why the p in (zerop x)? • p = predicate • NOT true that p = positive

  29. Scoping and binding • let declares a scope where variable bindings are insulated from outside • usual notions of local and global variables apply • if you want to change a global variable from within a function

More Related