ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
Ai introduction
1. Artificial Intelligence
(CSc -355)
Artificial Intelligence Course Overview
Prepared by Bal Krishna Subedi
To B.Sc. Computer Science and Information Technology,
Tribhuvan University
By Bal Krishna Subdi 1
2. Artificial Intelligence Course Overview
Objective of the Course
• This course presents the basic principles and methods of
Artificial Intelligence, preparing the students to build complex
systems incorporating capabilities for intelligent processing of
information.
• Explores the AI strategies for searching.
• Introduced the expert system technologies to handle uncertainty.
By Bal Krishna Subedi 2
3. Artificial Intelligence Course Overview
Why learn this Course?
• Understand the principles that make intelligence possible
(in humans, animals, and artificial agents).
• Developing intelligent machines or agents (no matter
whether they operate as humans or not).
• Making the working with computers as easy as working
with people.
• Developing human-machine systems that exploit the
complementariness of human and automated reasoning.
By Bal Krishna Subedi 3
4. Artificial Intelligence Course Overview
Resources
Text Books:
1. S. J. Russell and P. Norvig, Artificial Intelligence: A modern
approach, Second Edition, Prentice Hall.
2. George F. Luger, Artificial Intelligence: Structures and
Strategies for Complex Problem Solving. Fourth/Fifth
Edition, Addition Wesley.
References:
1. Related research and technical papers.
By Bal Krishna Subedi 4
5. Artificial Intelligence Course Overview
Lab Tools & Resources
• SWI-Prolog Compiler.
• Prolog Programming Manual.
• SWI-Prolog Compiler Reference Manual.
Reference:
Ivan Bratko, Prolog Programming for Artificial Intelligence,
Addition Wesley.
By Bal Krishna Subedi 5
6. Artificial Intelligence Course Overview
Prerequisites
• Discrete mathematics
– Predicate calculus, graph theory.
• Data structures
– Tree, graph, recursion, stack, queue etc.
By Bal Krishna Subedi 6
7. Artificial Intelligence Course Overview
Tentative Schedule
1. Introduction: What is AI/Intelligent Agent. -4 hrs
2. Search: Uninformed method (state space search), Informed method
(Heuristic Search), Game Playing (Adversarial Search). -9hrs
First Mid Term
3. KReasoning: Propositional Logic, First Order Logic, Knowledge
representation and Inference. -12 hrs
4. Problem Solving -6 hrs
Second Mid Term
5. Structured Knowledge Representation & Machine Learning -8hrs
6. Application of AI -6hrs
By Bal Krishna Subedi 7
8. Artificial Intelligence Introduction
What is AI?
Reading: Chapter 1 of Textbook R&N
Artificial Intelligence, or AI, is the attempt to build intelligent
computer systems, that is, to make computer systems that are
similar to the human mind in certain aspect.
So, what is Intelligence?
“the capacity to learn and solve problems” -Webster’s dictionary
By Bal Krishna Subedi 8
9. Artificial Intelligence Introduction
What is AI?
There is no widely accepted definition of Artificial
Intelligence, therefore all AI definitions are grouped
into four categories:
Systems that think like humans (e.g. Cognitive Modeling)
Systems that act like humans (e.g. Turing's test)
Systems that think rationally (e.g. Deep Blue)
Systems that act rationally (e.g. Robots)
By Bal Krishna Subedi 9
10. Artificial Intelligence Introduction
Thinking like a human
• figure out how we think by introspection or
scientific experimentation and express the
theory for computer.
• Machine operates as human does.
“machine with minds”
By Bal Krishna Subedi 10
11. Artificial Intelligence Introduction
Turing Test
• Proposed by Allan Turing in 1950, measure the performance
of intelligent machine against that of human being.
• The computer posses the test if a human interrogator, after
posing some written questions, cannot tell whether the written
responses come from a person or not.
“ The art of creating machines that performs functions that require intelligence
when performed by people” - Kurzweil
By Bal Krishna Subedi 11
12. Artificial Intelligence Introduction
Turing Test
• For this, machine should be capable of Natural Language
Processing, Knowledge representation, automated
reasoning and machine learning.
Advantages:
– Provides the standard for determining intelligence.
– Eliminates any bias in favor of living organism.
Problem:
– Turing test is not reproducible, constructive, or amenable to
mathematical analysis
– Excludes physical aspect.
More satisfactory operational definition of AI
By Bal Krishna Subedi 12
13. Artificial Intelligence Introduction
Thinking Rationally
Rational: right decision based on given knowledge.
Given knowledge:
“Socrates is a man; all men are mortal; therefore Socrates is
mortal.”
Derive conclusion through logic:
Many mathematician derive logical notation and rules of
derivation for thoughts.
Problems:
– It is not easy to take informal knowledge and state in the formal notation.
– How much fact can store and how fast machine can process these facts?
“Sometimes quantity becomes quality” – Garry Kasparov (World
Chess Champion 1997)
By Bal Krishna Subedi 13
14. Artificial Intelligence Introduction
Acting Rationally
The rational agent: perform actions which will (most
likely) achieve one's goals.
• Knowledge may not be perfect all the times, we need
to go beyond strict rational thought in general.
– For example: recoiling from a hot stove must be a fast
action than a slower action taken after careful deliberation.
Advantages:
More general than lows of thought approach: correct inference
is just one of the several possible mechanisms for achieving
rationality.
By Bal Krishna Subedi 14
16. State of the Art
What can AI do Today?
Can we build Intelligent Hardware?
How complicated is our brain?
– a neuron, or nerve cell, is the basic information processing unit
– estimated to be on the order of 10^12 neurons in a human brain
– many more synapses (10^14) connecting these neurons
– cycle time: 10^-3 seconds (1 millisecond)
How complex can we make computers?
– 10^6 or more transistors per CPU
– supercomputer: hundreds of CPUs, 10^9 bits of RAM
– cycle times: order of 10^-8 seconds
Conclusion
YES: in the near future we can have computers with as many basic processing
elements as our brain, but with
– far fewer interconnections (wires or synapses) than the brain.
– much faster updates than the brain.
but building hardware is very different from making a computer behave like a
brain!
Artificial Intelligence Introduction
By Bal Krishna Subedi 16
17. State of the Art
What can AI do Today?
Artificial Intelligence Introduction
Can Computer be foolproof (error free)?
An intelligent system can make errors and still be intelligent
– humans are not right all of the time
– we learn and adapt from making mistakes
• e.g., consider learning to ski
– we improve by taking risks and falling
– an intelligent system can learn in the same way
Conclusion
NO: intelligent systems will not (and need not) be foolproof. System learn
from the errors
By Bal Krishna Subedi 17
18. State of the Art
What can AI do Today?
Artificial Intelligence Introduction
Could Computer beat human at chess?
– YES: today’s computers (Deep Blue) can beat even the best human (Gerry
Kasparov, World Champion).
Could Computer talk and sound like a human?
– NO, for complete sentences, but YES for individual words.
Could Computer recognize human speech?
– NO, normal speech is too complex to accurately recognize, but YES for
restricted problems.
(e.g., recent software for PC use by IBM, Dragon systems, etc)
By Bal Krishna Subedi 18
19. State of the Art
What can AI do Today?
Artificial Intelligence Introduction
Could Computer understand what we are saying?
Understanding is different to recognition:
“Time flies like an arrow”
• assume the computer can recognize all the words
• but how could it understand it?
1. time passes quickly like an arrow?
2. time flies the way an arrow flies
3. only time those flies which are like an arrow
4. “time-flies” are fond of arrows
• only 1. makes any sense, but how could a computer figure this out?
clearly humans use a lot of implicit commonsense knowledge in
communication
Conclusion: NO, much of what we say is beyond the capabilities of a
computer to understand at present.
By Bal Krishna Subedi 19
20. State of the Art
What can AI do Today?
Artificial Intelligence Introduction
Could Computer learn to adapt?
YES, computers can learn and adapt, when presented with
information in the appropriate way.
Could Computer see?
mostly NO: computers can only “see” certain types of objects under
limited circumstances: but YES for certain constrained problems (e.g.,
face recognition).
Could Computer plan and make decisions?
NO, real-world planning and decision-making is still beyond the
capabilities of modern computers
exception: very well-defined, constrained problems
By Bal Krishna Subedi 20
22. Artificial Intelligence Introduction
What is an Agent?
Anything that can perceives its environment with sensors
and then acts upon the environment with its effectors
to achieve its goals.
PAGE: Percepts (inputs), Actions (outputs) , Goals & Environment
Percept Sequence: complete history that agent has ever perceived.
By Bal Krishna Subedi 22
23. Artificial Intelligence Introduction
Examples of Agents
human agent
• eyes, ears, skin, taste buds, etc. for sensors
• hands, fingers, legs, mouth, etc. for effectors
– powered by muscles
robot
• camera, infrared, bumper, etc. for sensors
• grippers, wheels, lights, speakers, etc. for effectors
– often powered by motors
By Bal Krishna Subedi 23
24. Artificial Intelligence Introduction
Agents as Functions
Agent can be evaluated mathematically: Agent’s behavior
is described by an agent function.
• an agent function maps percept sequences to actions
• an agent program is a concrete implementation of the
respective function
– it runs on a specific agent architecture (“platform”)
• a rational agent does “the right thing”
– the action that leads to the best outcome under the given
circumstances
Rational ≠ Omniscient
Rational ≠ Successful
By Bal Krishna Subedi 24
25. Artificial Intelligence Introduction
Performance of Agents
criteria for measuring the outcome and the expenses of the agent
– often subjective, but should be objective
– task dependent
– time may be important
Performance Evaluation Examples
• vacuum agent
– number of tiles cleaned during a certain period
• based on the agent’s report, or validated by an objective authority
• doesn’t consider expenses of the agent, side effects
– energy, noise, loss of useful objects, damaged furniture, scratched
floor
• might lead to unwanted activities
– agent re-cleans clean tiles, covers only part of the room, drops dirt
on tiles to have more tiles to clean, etc.
By Bal Krishna Subedi 25
26. Artificial Intelligence Introduction
Environments
• determine to a large degree the interaction
between the “outside world” and the agent
– the “outside world” is not necessarily the “real world”
as we perceive it
• in many cases, environments are implemented
within computers
– they may or may not have a close correspondence to
the “real world”
By Bal Krishna Subedi 26
27. Artificial Intelligence Introduction
Environment Properties
• fully observable vs. partially observable
– sensors capture all relevant information from the environment
• deterministic vs. stochastic (non-deterministic)
– changes in the environment are predictable
• episodic vs. sequential (non-episodic)
– independent perceiving-acting episodes
• static vs. dynamic
– no changes while the agent is “thinking”
• discrete vs. continuous
– limited number of distinct percepts/actions
• single vs. multiple agents
– interaction and collaboration among agents
– competitive, cooperative
By Bal Krishna Subedi 27
28. Intelligent Agent Example with PAGE
Description
Artificial Intelligence Introduction
Agent Percepts Actions Goal Environment
Robot Stereo, infrared
camera images,
microphone
signals,
touch sensors,
battery voltage,
time of day,
coffee volume,
coffee temp.,
Spring roll
count, . . .
Turn left,
turn right,
advance,
serve
coffee,
serve spring
roll,
recharge
battery,
beep, . . .
To deliver hot
coffee and
fresh
Spring roll to
hungry
computer
science
students
Third
floor of
GN Complex
29. Artificial Intelligence Introduction
Structure of Intelligent Agents
Agent = Architecture + Program
• architecture
– operating platform of the agent
• computer system, specific hardware, possibly OS functions
• program
– function that implements the mapping from percepts to actions
– different levels of complexity of agent program
simple reflex agents
agents that keep track of the world
goal-based agents
utility-based agents
emphasis in this course is on the program aspect, not on the architecture
By Bal Krishna Subedi 29
30. Artificial Intelligence Introduction
Simple Reflex Agent
Select action on the basis of the current percept: if percept then action
e.g: If car-in-front-is-braking than initiate-braking
Efficient implementation, but limited intelligence
• environment must be fully observable
• easily runs into infinite loops
By Bal Krishna Subedi 30
31. Artificial Intelligence Introduction
Model-Based Reflex Agent
• an internal state maintains important information from previous
percepts
– sensors only provide a partial picture of the environment
– helps with some partially observable environments
• the internal states reflects the agent’s knowledge about the world
– this knowledge is called a model
– may contain information about changes in the world
By Bal Krishna Subedi 31
32. Artificial Intelligence Introduction
Goal-Based Agent
• the agent tries to reach a desirable state, the goal
• results of possible actions are considered with respect to the goal
– easy when the results can be related to the goal after each action
– in general, it can be difficult to attribute goal satisfaction results to individual
actions
• very flexible, but not very efficient
By Bal Krishna Subedi 32
33. Artificial Intelligence Introduction
Utility-Based Agent
• A utility function maps states onto a real number which describe the
associated degree of happiness.
• Permits rational actions for more complex tasks
• resolution of conflicts between goals
• multiple goals (likelihood of success, importance)
• a utility function is necessary for rational behavior, but sometimes it is not
made explicit
By Bal Krishna Subedi 33
34. Artificial Intelligence Introduction
Home Works
1. 1.1, 1.10, 1.11, 2.1, 2.2, 2.3, 2.5 & 2.6 from Textbook R&N.
2. Criticize Turing’s criteria for computer being intelligent.
3. List and discuss two potentially negative effects on the society of
development of artificial intelligence techniques.
4. For each of the agents in Figure 2.5 (R&N, page 40), determine what
type of architecture (i.e. simple reflex, model-based reflex, goal based,
utility based) is most appropriate. Justify your decision (a few sentences
should be enough).
5. Give two examples of real world systems that you consider to be
examples of Artificial Intelligence. Briefly describe the systems and
justify why you believe they fall in this category.
6. For one of the examples you chose in question 5, describe the system as
an agent in terms of its percepts, actions, goals, and environment.
By Bal Krishna Subedi 34