Document 394793

Ar#ficial Intelligence Agents Dr Alexiei Dingli Agents •  An agent is anything that can be viewed as perceiving its environment through sensors and ac#ng upon that environment through actuators •  Human agent: eyes, ears, and other organs for sensors; hands, legs, mouth, and other body parts for actuators •  Robo#c agent: cameras and infrared range finders for sensors; various motors for actuators Agents and environments •  The agent func#on maps from percept histories to ac#ons: [f: P* à A] •  The agent program runs on the physical architecture to produce f agent = architecture + program Vacuum-­‐cleaner world What are the sensors, actuators, rules, performance measure, world limita#ons? Vacuum-­‐cleaner world Percepts: loca#on and contents, e.g., [A,Dirty] Ac#ons: Le$, Right, Suck, NoOp A vacuum-­‐cleaner agent • 
• 
• 
• 
{ A, Clean }
{ A, Dirty }
{ B, Clean }
{ B, Dirty }
Right Suck LeT Suck Ra#onal agents •  An agent should strive to "do the right thing", based on what it can perceive and the ac#ons it can perform. •  The right ac#on is the one that will cause the agent to be most successful •  Performance measure: An objec#ve criterion for success of an agent's behavior •  E.g. performance measure of a vacuum-­‐
cleaner agent could be amount of dirt cleaned up, amount of #me taken, amount of electricity consumed, amount of noise generated, etc. Ra#onal agents •  Ra#onal Agent: For each possible percept sequence, a ra#onal agent should select an ac#on that –  is expected to maximize its performance measure, –  given the evidence provided by the percept sequence and –  whatever built-­‐in knowledge the agent has Ra#onal agents •  Ra#onality is dis#nct from omniscience (all-­‐knowing with infinite knowledge) •  Agents can perform ac#ons in order to modify future percepts so as to obtain useful informa#on (informa#on gathering, explora#on) •  An agent is autonomous if its behavior is determined by its own experience (with ability to learn and adapt) PEAS •  PEAS: Performance measure, Environment, Actuators, Sensors •  Consider the task of designing an automated taxi driver: –  Performance measure –  Environment –  Actuators –  Sensors •  Specify the se^ng for intelligent agent design … PEAS •  Must first specify the se^ng for intelligent agent design •  Consider the task of designing an automated taxi driver: –  Performance measure: Safe, fast, legal, comfortable trip, maximize profits –  Environment: Roads, other traffic, pedestrians, customers –  Actuators: Steering wheel, accelerator, brake, signal, horn –  Sensors: Cameras, sonar, speedometer, GPS, odometer, engine sensors, keyboard PEAS •  PEAS: Performance measure, Environment, Actuators, Sensors •  What are the PEAS for: –  Medical Diagnosis System –  Part-­‐picking robot –  Interac#ve English Tutor PEAS •  Agent: Medical diagnosis system •  Performance measure: Healthy pa#ent, minimize costs, lawsuits •  Environment: Pa#ent, hospital, staff •  Actuators: Screen display (ques#ons, tests, diagnoses, treatments, referrals) •  Sensors: Keyboard (entry of symptoms, findings, pa#ent's answers) PEAS •  Agent: Part-­‐picking robot •  Performance measure: Percentage of parts in correct bins •  Environment: Conveyor belt with parts, bins •  Actuators: Jointed arm and hand •  Sensors: Camera, joint angle sensors PEAS •  Agent: Interac#ve English tutor •  Performance measure: Maximize student's score on test •  Environment: Set of students •  Actuators: Screen display (exercises, sugges#ons, correc#ons) •  Sensors: Keyboard Environment types •  Fully observable (vs. par#ally observable): An agent's sensors give it access to the complete state of the environment at each point in #me. •  Determinis#c (vs. stochas#c): The next state of the environment is completely determined by the current state and the ac#on executed by the agent. (If the environment is determinis#c except for the ac#ons of other agents, then the environment is strategic) •  Episodic (vs. sequen#al): The agent's experience is divided into atomic "episodes" (each episode consists of the agent perceiving and then performing a single ac#on), and the choice of ac#on in each episode depends only on the episode itself. Environment types •  Sta#c (vs. dynamic): The environment is unchanged while an agent is delibera#ng. (The environment is semidynamic if the environment itself does not change with the passage of #me but the agent's performance score does) •  Discrete (vs. con#nuous): A limited number of dis#nct, clearly defined percepts and ac#ons. •  Single agent (vs. mul#agent): An agent opera#ng by itself in an environment. Environment types Exercise Fully observable
Determinis#c
Episodic Sta#c Discrete Single agent
Chess with a clock Chess without a clock Taxi driving Environment types Fully observable
Determinis#c
Episodic Sta#c Discrete Single agent
Chess with a clock Yes
Strategic No
Semi
Yes No
Chess without a clock Yes
Strategic No
Yes Yes
No
Taxi driving No No No No No No •  The environment type largely determines the agent design •  The real world is (of course) par#ally observable, stochas#c, sequen#al, dynamic, con#nuous, mul#-­‐agent Agent func#ons and programs •  An agent is completely specified by the agent func#on mapping percept sequences to ac#ons •  Aim: find a way to implement the ra#onal agent func#on concisely Agent types •  Four basic types in order of increasing generality: –  Simple reflex agents –  Model-­‐based reflex agents –  Goal-­‐based agents –  U#lity-­‐based agents Simple reflex agents •  Decides on the current state •  Ignore previous history •  Very simple •  Very limited in intelligence •  Can easily get into an infinite loop –  Only escapable via randomness •  Eg: Vacuum cleaner Simple reflex agents Model-­‐based reflex agents •  Similar to the simple reflex agent •  Possesses some knowledge about the world •  The state of the world is updated periodically •  Eg: Vacuum cleaner world, the system knows that aTer X hours, the room is dirty again Model-­‐based reflex agents Goal-­‐based agents •  Is following a par#cular goal •  So if more than one choice, the system does not systema#cally explore all op#ons but selects the one which will move him closer to the goal •  This does not mean that he chooses the best path! •  Eg: Taxi driver can reach point C using either A or B so he simply selects one of them Goal-­‐based agents U#lity-­‐based Agent •  Evaluates the paths and decides which one of them will make the agent “happy” at that point in #me •  Not all the informa#on might be available •  Eg: Taxi driver evaluates the paths and selects the quickest road. However he might not be aware that there is traffic! U#lity-­‐based agents Learning Agents •  Performance Element –  Responsible for selec#ng external ac#on •  Cri#c –  Provides feedback to the agent on the performance of the agent •  Problem Generator –  Decides what’s the best problem to tackle, not necessary what the performance element wants (because the most efficient route might not be the best one) Learning agents Real World Intelligent Agents •  An intelligent agent is a program that performs func#ons such as –  informa#on gathering, –  informa#on filtering, –  media#on running, –  in the background on behalf of a person or en#ty •  What agents can you think of? Interface Agents •  “Computer programs that employ ar#ficial intelligence in order to provide assistance to a user dealing with a par#cular applica#on. The metaphor is that of a personal assistant who is collabora#ng with the user in the same work environment.” •  Le#zia –  hpp://lieber.www.media.mit.edu/people/lieber/
Lieberary/Le#zia/Le#zia-­‐AAAI/Le#zia.html •  WebMate –  hpp://www.cs.cmu.edu/~lchen/index.html •  Other
–  hpp://www.sics.se/~annika/ii_links.html Informa#on Agents • 
“An informa#on agent is an agent that has access to at least one, and poten#ally many informa#on sources, and is able to collate and manipulate informa#on obtained from these sources to answer queries posed by the users and other informa#on agents.” • 
Spotire –  hpp://www.ivee.com • 
Pointcast • 
FireFly –  hpp://pioneer.pointcast.com/ –  hpp://www.ffly.com/ • 
Harvest –  hpp://harvest.cs.colorado.edu/ • 
Other –  hpp://www.ee.umd.edu/medlab/filter/soTware.html Commerce Agents •  A commerce agent is an agent that provides commercial services (e.g. Selling, buying, brokering, adver#sing, prices’ advice) for a human user or another agent.” •  BargainFinder –  hpp://www.bargainfinder.com •  Priceline –  hpp://www.priceline.com •  Auc#onBot –  hpp://auc#on.eecs.umich.edu •  Amazon –  hpp://www.amazon.com/ •  FastParts –  hpp://www.fastparts.com/ •  Other –  hpp://www.cs.umbc.edu/agents/commercial/ Entertainment Agent •  “ ... ar#s#cally interes#ng, highly interac#ve, simulated worlds ... To give users the experience of living in (not merely watching) drama#cally rich worlds that include moderately competent, emo#onal agents.” •  Alexandria –  hpp://www.alexlit.com/ •  Creatures
–  hpp://www.creatures.co.uk/creatures_frameset.htm •  eGenie –  hpp://egenie.opensesame.com/
•  MORSE -­‐ MOvie Recommenda#on SystEm –  hpp://www.labs.bt.com/innovate/mul#med/morse/ •  Other -­‐ Virtual Pets & Theatres –  hpp://www.botspot.com/s-­‐fun.htm Mobile Agents •  “ ... have the unique ability to transport themselves from one system in a network to another. This permits them to travel to systems that contain the services with which they want to interact and then to take advantage of being in the same host or network as the service.” •  D’Agents –  hpp://agent.cs.dartmouth.edu/ •  Tacoma
–  hpp://www.tacoma.cs.uit.no/ •  IBM Aglets –  hpp://www.aglets.org •  Concordia –  hpp://www.meitca.com/HSL/Projects/Concordia/ More Agents ... •  Search Agents –  Improve your informa#on retrieval on the Internet –  Used to find pages on the Web easily and quickly •  Meta Agents, Specialised (MP3), etc •  Web Agents –  Improve browsing experience •  Automate form filling, off-­‐line browsing, etc •  Monitoring Agents –  Monitor web sites or specific themes –  Used to get automa#c alerts about the latest news More Agents ... •  Virtual Assistants –  Ar#ficial life –  Characters, plants, animals or people living on your desktop •  Shop Bots –  Allow users to compare prices on the Internet –  Find the best price for books, CDs, movies, etc. •  Webmastering Agents –  Make it easy to manage a Web site and make it more effec#ve –  Monitor broken links, content gathering etc. More Agents ... •  Other agents … –  Development agents •  Used to develop other agents –  Games agents •  Used in games Ms Dewey not your ordinary search agent! Ques#ons? The Wumpus World •  The Wumpus –  Beast that eats tasty agents –  Lives in an interconnected cave –  Can be shot by an agent –  Stench of Wumpus can be smelt from the adjacent room The Wumpus World •  The Caves –  Contains a heap of gold –  Bopomless pits which emit a breeze when you’re in the adjacent room The Wumpus World •  Defini#on –  Performance +1000 for picking gold -­‐1000 for falling in a pit or get eaten -­‐1 for each ac#on taken -­‐10 for using the arrow –  Environment •  4 x 4 grid •  Agent starts in 1 x 1 •  Pits, Gold and Wumpus placed randomly The Wumpus World •  Defini#on –  Agent •  Move forward 1 square •  Turn 90 degrees leT or right •  Grab – used to grab objects •  Shoot used to fire the only arrow it posses right infront in the direc#on he’s facing The Wumpus World •  Defini#on –  Sensors •  In the squares adjacent the Wumpus (not diagonal) the agent will smell a stench •  In the squares adjacent the Pits (not diagonal) the agent will feel a breeze •  In the square where gold is, the agent will perceive gliper •  When an agent walks into a wall, it will perceive a bump •  When a Wumpus is killed, it will emit a scream which everyone will hear The Wumpus World Exercise •  Write the rules in pseudo code which your agent will follow ... Exercise 2 •  Let’s do a dry run of our agent ... How many points did you get in this world? +1000 for picking gold -­‐1000 for falling in a pit or get eaten -­‐1 for each ac#on taken -­‐10 for using the arrow Ques#ons ?