Stanford AI - Unit 1

Embed Size (px)

Citation preview

  • 7/31/2019 Stanford AI - Unit 1

    1/15

    Introduction to Artificial Intelligence

    Unit 1 of Artificial Intelligence

    Purpose of this class: to teach you the basics of artificial intelligence to excite you

    Structure of the class:

    VIDEOS QUIZZES ANSWER VIDEOS HOMEWORK

    ASSIGNMENT EXAMS

    Intelligent agent

    The agent can perceive the state of the environment through its

    sensor, and itr can affect its state through its actuators. The

    big question of artificial intelligence is the function that

    maps sensors to actuators. That is called the control policy for

  • 7/31/2019 Stanford AI - Unit 1

    2/15

    the agent. So all of this class will deal with how does an agent

    make decisions that it can carry out with its actuators based on

    past sensor data. Those decisions take place many, many times,

    and the loop of environment feedback to sensors, agent decision,

    actuator interaction with the environment and so on is calledperception action cycle.

    AI in Finance

    dv

    There is a huge number of applications of artificial intelligence in

    finance, very often in the shape of making trading decisions - in

    which case, the agent is called a trading agent. And the

    environment might be things like the stock market or the bond

  • 7/31/2019 Stanford AI - Unit 1

    3/15

    market or the commodities market. And our trading agent can

    sense the course of certain things, like the stock or bonds or

    commodities. It can also read the news online and follow certain

    events. And its decisions are usually things like buy or sell

    decisions - trades.friends

    Theres a huge history of artificial intelligence finding methods to

    look at data over time, and make predictions as to how courses

    develop over time, and then put in traits behind those. And vary

    frequently, people using artificial intelligence trading agents have

    made a good amount of money with superior trading decisions.

    AI in Robotics

    Theres also a long history of AI in Robotics. There are many

    different types of robots, and they all interact with their

    environments through their sensors, which include things like

    cameras, microphones, tactile sensors (or touch). And the way

  • 7/31/2019 Stanford AI - Unit 1

    4/15

    they impact their environments is to move motors around. In

    particular, their wheels, their legs, their arms, their grippers, then

    goes to say things to people using voice.

    Now theres huge history of using artificial intelligence inrobotics. Pretty much, every robot that does something

    interesting today uses AI. In fact, often AI has been studied

    together with robotics, as one discipline. But because robots are

    somewhat special in that they use physical actuators and deal

    with physical environments, they are a little bit different from

    just artificial intelligence, as a whole.

    When the Web came out, the early Web crawlers were called

    robots and to block a robot from accessing your web site, to thepresent day, theres a file-block robot.txt, that allows you to deny

    any Web crawler to access and retrieve that information from

    your Web site.

    So historically, robotics played a huge role in artificial intelligence

    and a good chunk of this class will be focusing on robotics.

    AI in Games

  • 7/31/2019 Stanford AI - Unit 1

    5/15

    AI has a huge history in games - to make games smarter or feel

    more natural. There a two ways in which AI has been used in

    games, as a game agent.

    One is toplay against you, as a human user. So for example, if

    you play the game of Chess, then you are the environment to the

    game agent. The game agent gets to observe your moves and it

    generates its own moves with the purpose of defeating you in

    Chess. So most AI-surreal games, where you play against an

    opponent - and the opponent is a computer program - the game

    agent is built to play against you - against your own interests -

    and make you lose. And of course, your objective is to win. Thats

    an AI games-type situation.

    The second thing is that games against in AI also are used to

    make games feel more natural. So very often, games have

    characters - and these characters act in some way. And its

  • 7/31/2019 Stanford AI - Unit 1

    6/15

    important for you, as the player, to feel that these characters are

    believable. Theres an entire sub-field of artificial intelligence to

    use AI to make characters in game more believable - look

    smarter, so to speak - so that, you as a player, think youre

    playing a better game.

  • 7/31/2019 Stanford AI - Unit 1

    7/15

    AI in medicine

    Artificial intelligence has a long history in medicine as well. The

    classic example is that ofdiagnostic agent. So here you are - and

    you might be sick, and you go to your doctor. And you doctor

    wishes to understand what the reason for your symptoms and

    your sickness is. The diagnostic agent will observe you through

    various measurements. For example, blood pressure and heart

    signals, and so on - and itll come up with the hypothesis as to

    what you might be suffering from. But rather than intervene

    directly - in most cases, the diagnostic of your disease is

    communicated to the doctor, who then takes on the intervention.

    This is called a diagnostic agent.

    There are many others versions of AI in medicine. AI is used in

    intensive care to understand whether there are situations that

    need immediate attention. Its been used for life-long medicine to

    monitor signs over a long period of time. And as medicine

  • 7/31/2019 Stanford AI - Unit 1

    8/15

    becomes more personal, the role of artificial intelligence will

    definitely increase.

    AI in the Web

    The most generic version of AI is to crawl the Web and

    understand the Web, and assist you in answering questions. So

    when you have this search box over here and it says Search on

    the left, and Im Felling Lucky on the right, and you type in a

    word, what AI does for you - it understands what words you typed

    in and finds the most relevant pages. That is really co-artificialintelligence. Its used by number of companies, such as Microsoft

    and Google, Amazon, Yahoo, and many others.

  • 7/31/2019 Stanford AI - Unit 1

    9/15

    And the way this works is that theres a crawling agent that can

    go to the World Wide Web and retrieve pages, through just a

    computer program. It then sorts these pages into a big database

    inside the core and also analyzes developments of each page to

    any possible query. When you then come and issue a query, the

    AI system is able to give you a response - for example, a

    collection of 10 best Web links.

    In short, every time you try to write a piece of software, that

    makes you appear, yourself, as smart likely you will need

    artificial intelligence. And this class, Peter and Sebastian will

    teach you many of the basic tricks of the trade to make your

    software really smart.

    Terminology

  • 7/31/2019 Stanford AI - Unit 1

    10/15

    It will be good to introduce some basic terminology that iscommonly used in artificial intelligence to distinguish differenttypes of problems:

    1. FULLY versus PARTIAL OBSERVABLE

    An environment is called fully observable if what your agent can

    sense at any point in time is completely sufficient to make the

    optimal decision. So for example, in many card games, when all

    the cards are on the table, the momentary site of all those cards

    is really sufficient to make the optimal choice. That is in contrast

    to some other environments where you need memory on the side

    of the agent to make the best possible decisions. For example, inthe game of poker, the cards are not openly on the table, and

    memorizing past moves will help you make a better decision.

    The fully understand the difference, consider the interaction ofan agent with the environment to is sensors and its actuators,and this interaction takes place over many cycles, often calledtheperception-action cycle. For many environments, itsconvenient to assume that the environment has some sort ofinternal state. For example in cards game where the cards are

  • 7/31/2019 Stanford AI - Unit 1

    11/15

    not openly on the table, the state might pertain to the cards inyour hand. An environment is fully observable if the sensors canalways see the entire state of environment. Itspartiallyobservable if the sensors can only see a fraction of the state, yet

    memorizing past measurements gives us additional informationof the state that is not readily observable right now.

    So any game, for example, where past moves have informationabout what might be in a persons hand, those games arepartially observable, and they require different treatment.

    Very often agents that deal with partially observableenvironments need to acquire internal memory to understandwhat the state of the environment is, and well talk extensively

    when we talk about hidden Markov models about how thisstructure has such internal memory.

    2. DETERMINISTIC versus STOCHASTIC

    Deterministic environmentis one where your agents actionsuniquely determine the outcome. So, for example, in chess,theres really no randomness when you move a piece. The effectof moving a piece is completely predetermined, and no matter

    where Im going to move the same piece, the outcome is thesame. That we call deterministic. Games with dice, for example,like backgammon, are stochastic. While you can stilldeterministically move your pieces, the outcome of an actionalso involves throwing of the dice, and you cant predict those.

    Theres a certain amount of randomness involved for theoutcome of dice, and therefore, we call this stochastic.

    3. DISCRETE versus CONTINUOUS

    A discrete environmentis one where you have finitely manyaction choices, and finitely many things you can sense. So, forexample, in chess, again, theres finitely many board positions,and finitely many things you can do. That is different from a

  • 7/31/2019 Stanford AI - Unit 1

    12/15

    continuous environmentwhere the space of possible actions orthings you could sense may be infinite. So, for example, if youthrow darts, theres infinitely many ways to angle the darts andto accelerate them.

    4. BENIGN versus ADVERSARIAL

    In benign environments, the environment might be random. Itmight be stochastic, but it has no objective on its own that wouldcontradict the own objective. So, for example, weather is benign.It might be random. It might affect the outcome of your actions.But it isnt really out there to get you. Contrast with adversarialenvironments, such as many games, like chess, where youropponent is really out there to get you. It turns out its much

    harder to find good actions in adversarial environments wherethe opponent actively observes you and counteracts what youretrying to achieve relative to benign environment, where theenvironment might merely be stochastic but isnt reallyinterested in making your life worse.

    AI and Uncertainty

    AI is the technique of uncertainly management in computersoftware. But differently, AI is the discipline that you apply when

    you want to know what to do when you don't know what to do.

    Now, theres many reason why there might be uncertainty in a

    computer program. There could be a sensor limit. That is, your

    sensors are unable to tell me what exactly is the case outside the

    AI system. There could be adversaries who act in a way that

    makes it hard for you to understand what is the case. There

    could be stochastic environments. Every time you roll the dice ina dice game, the stochasticity of the dice will make it impossible

    for you to be absolutely certain of whats the situation. There

    could be laziness. So perhaps you can actually compute what the

    situation is, but your computer program is just too lazy to do it.

    And ignorance,plain ignorance. Many people are just ignorant of

  • 7/31/2019 Stanford AI - Unit 1

    13/15

    whats going on. They could know it, but they just don't care. All

    of this things are cause for uncertainty. AI is discipline that deals

    with uncertainty and manages it in decision making.

    Machine translation

    One of the best successes of AI technology at Google has been

    the machine translation system. Here we see an example of anarticle in Italian automatically translated into English. Now, thesesystem are built for 50 different languages, and we can translatefrom any of the languages into any of the other languages. So,thats over 2500 different systems, and weve done this all usingmachine learning techniques, using AI techniques, rather thanbuild them by hand.So we find, say, a newspaper that publishes 2 editions, and now

    we have examples of translations. And then when we see a new

    example of text that havent seen before, we can just look upwhat weve seen in the past for that correspondence. And the

    way it works is that we go out and collect examples of text thats

    a line between the 2 languages.

    So the task is really two parts. Off-line, before we see example oftext we want to translate, we first build our translation model. We

  • 7/31/2019 Stanford AI - Unit 1

    14/15

    do that by examining all of the different examples and figuringout which part aligns to which. Now, when were given a text totranslate, we use that model, and we go through and find themost probable translation.

    For example, heres a bilingual text. Now, for large-scale machinetranslation, examples are found on the Web. This example wasfound in a Chinese restaurant by Adam Lopez. Now its given, fora text of this form , that a line in Chinese corresponds to a line inEnglish, and thats true for each or individual lines. But to learnfrom this text, what we really want to discover is what individualwords in Chinese correspond to individual words or small phrasesin English. Ive started this process by highlighting the word

    wonton in English. It appears 3 times throughout the text. Now,in each of those lines, theres a character that appears, andthats only place in the Chinese text where that characterappears. So, that seems like its a high probability that thischaracter in Chinese corresponds to the world wonton inEnglish.

  • 7/31/2019 Stanford AI - Unit 1

    15/15

    Unit 1 Summary

    key applications of AI intelligence agent

    4 key attributes sources of uncertainty rationality