Full Transcript

INTELLIGENT AGENTS by Prawin Raja AGENTS AND ENVIRONMENTS An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators by Prawin Raja ...

INTELLIGENT AGENTS by Prawin Raja AGENTS AND ENVIRONMENTS An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators by Prawin Raja Example A human agent has eyes, ears, and other organs for sensors and hands, legs, vocal tract, and so on for actuators. A robotic agent might have cameras and infrared range nders for sensors and various motors for actuators. A software agent receives keystrokes, le contents, and network packets as sensory inputs and acts on the environment by displaying on the screen, writing les, and sending network packets. by Prawin Raja fi fi fi percept to refer to the agent’s perceptual inputs at any given instant. An agent’s percept sequence is the complete history of everything the agent has ever perceived. An agent’s choice of action at any given instant can depend on the entire percept sequence observed to date, but not on anything it hasn’t perceived by Prawin Raja Agent Function : n gent’s beh vior is described by the gent function th t m ps ny given percept sequence to n ction. It is n bstr ct m them tic l description. Agent Progr m : is concrete implement tion, running within some physic l system. by Prawin Raja a a a a a a a a a a a a a a a a a a a Vacuum Cleaner This particular world has just two locations: squares A and B. The vacuum agent perceives which square it is in and whether there is dirt in the square. It can choose to move left, move right, suck up the dirt, or do nothing. Agent function is , if the current square is dirty, then suck; otherwise, move to the other square. Agent program that implements it in physical world. by Prawin Raja GOOD BEHAVIOR: THE CONCEPT OF RATIONALITY Rational Agent : A rational agent is one that does the right thing. — conceptually speaking, every entry in the table for the agent function is lled out correctly. by Prawin Raja fi What does it mean to do the right thing? Consequences of the agent’s behavior : When an agent is plunked down in an environment, it generates a sequence of actions according to the percepts it receives. This sequence of actions causes the environment to go through a sequence of states. If the sequence is desirable, then the agent has performed well. This notion of desirability is captured by a performance measure that evaluates any given sequence of environment states. by Prawin Raja We said environment states, not agent states. If we de ne success in terms of agent’s opinion of its own performance, an agent could achieve perfect rationality simply by deluding itself that its performance was perfect. Human agents in particular are notorious for “sour grapes”—believing they did not really want something after not getting it. by Prawin Raja fi Vacuum Cleaner Agent Performance Lets propose to measure performance by the amount of dirt cleaned up in a single eight-hour shift. by Prawin Raja A Rational agent can maximize this performance measure by cleaning up the dirt, then dumping it all on the oor, then cleaning it up again, and so on. by Prawin Raja fl A more suitable performance measure would reward the agent for having a clean oor. A penalty for electricity consumed and noise generated and number of steps taken by Prawin Raja fl As a general rule, It is better to design performance measures according to what one actually wants in the environment, rather than according to how one thinks the agent should behave. by Prawin Raja Same average cleanliness can be achieved by two different agents, one of which does a mediocre job all the time while the other cleans energetically but takes long breaks. Which is preferable might seem to be a ne point of janitorial science, but in fact it is a deep philosophical question with far-reaching implications. Which is better— a reckless life of highs and lows, or a safe but humdrum existence? by Prawin Raja fi Rationality What is rational at any given time depends on four things: The performance measure that de nes the criterion of success. The agent’s prior knowledge of the environment. The actions that the agent can perform. The agent’s percept sequence to date. by Prawin Raja fi Let us assume the following for vacuum agent : The performance measure awards one point for each clean square at each time step, over a “lifetime” of 1000 time steps. The “geography” of the environment is known a priori but the dirt distribution and the initial location of the agent are not. Clean squares stay clean and sucking cleans the current square. The Left and Right actions move the agent left and right except when this would take the agent outside the environment, in which case the agent remains where it is. The only available actions are Left, Right, and Suck. The agent correctly perceives its location and whether that location contains dirt. by Prawin Raja De nition of a rational agent: For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and whatever built-in knowledge the agent has. by Prawin Raja fi Omniscience An omniscient agent knows the actual outcome of its actions and can act accordingly ; but omniscience is impossible in reality. by Prawin Raja I am walking along the Champs one day and I see an old friend across the street. There is no traf c nearby and I’m not otherwise engaged, so, being rational, I start to cross the street. Meanwhile, at 33,000 feet, a cargo door falls off a passing airliner, and before I make it to the other side of the street I am attened. Was I irrational to cross the street? It is unlikely that my obituary would read “Idiot attempts to cross street..” by Prawin Raja fi fl Rationality is not the same as perfection. Rationality maximizes expected performance, while perfection maximizes actual performance. by Prawin Raja Information Gathering Looking into ll the percepts of the environment by Prawin Raja a Exploration In n initi lly unknown environment explor tion should be done. by Prawin Raja a a a Learning A rational agent not only to gather information but also to learn as much as possible from what it perceives. The agent’s initial con guration could re ect some prior knowledge of the environment, but as the agent gains experience this may be modi ed and augmented. There are extreme cases in which the environment is completely known a priori. In such cases, the agent need not perceive or learn; it simply acts correctly. Of course, such agents are fragile. by Prawin Raja fi fl fi Autonomy To the extent that an agent relies on the prior knowledge of its designer rather than on its own percepts, we say that the agent lacks autonomy. A rational agent should be autonomous—it should learn what it can to compensate for partial or incorrect prior knowledge. As a practical matter, one seldom requires complete autonomy from the start: when the agent has had little or no experience, it would have to act randomly unless the designer gave some assistance. Evolution -> Independent by Prawin Raja

Use Quizgecko on...
Browser
Browser