Artificial Intelligence Introduction Prepared by Ari M Saeed
Artificial Intelligence Introduction Prepared by: Ari M. Saeed
What is AI? Systems that think like humans “The exciting new effort to make computers think… machines with minds, in the full and literal sense” (Haugeland 1985) Systems that act like humans “The art of creating machines that perform functions that require intelligence when performed by people” (Kurzweil, 1990) Systems that think rationally “The study of mental faculties through the use of computational models” (Charniak et al. 1985) Systems that act rationally A field of study that seeks to explain and emulate intelligent behavior in terms of computational processes” (Schalkol, 1990)
What tasks require AI? • “AI is the science and engineering of making intelligent machines which can perform tasks that require intelligence when performed by humans …” • What tasks require AI?
What tasks require AI? • Tasks that require AI: – Solving a differential equation – Brain surgery – Inventing stuff – Playing Wheel of Fortune – What about walking? – What about pulling your hand away from fire? – What about watching TV?
Acting Humanly: The Turing Test • Alan Turing's 1950 article Computing Machinery and Intelligence discussed conditions for considering a machine to be intelligent – “Can machines think? ” “Can machines behave intelligently? ” – The Turing test (The Imitation Game): Operational definition of intelligence.
Acting Humanly: The Turing Test • Computer needs to possess: Natural language processing, Knowledge representation, Automated reasoning, and Machine learning • Are there any problems/limitations to the Turing Test?
Acting Humanly: The Full Turing Test Problem: 1) Turing test is not reproducible, constructive, and amenable to mathematic analysis. 2) What about physical interaction with interrogator and environment? Trap door
What would a computer need to pass the Turing Test? • Natural language processing: to communicate with examiner. • Knowledge representation: to store and retrieve information provided before or during interrogation. • Automated reasoning: to use the stored information to answer questions and to draw new conclusions. • Machine learning: to adapt to new circumstances and to detect and extrapolate patterns.
What would a computer need to pass the Turing test? • Vision (for Total Turing test): to recognize the examiner’s actions and various objects presented by the examiner. • Motor control (total test): to act upon objects as requested. • Other senses (total test): such as smell and touch.
The Turing Test Example
The Turing Test Example(cnt)
The Turing Test Example(cnt)
Thinking Humanly: Cognitive Science • 1960 “Cognitive Revolution”: information-processing psychology replaced behaviorism • Cognitive science brings together theories and experimental evidence to model internal activities of the brain – What level of abstraction? “Knowledge” or “Circuits”? – How to validate models? • Predicting and testing behavior of human subjects (top-down) • Direct identification from neurological data (bottomup) • Building computer/machine simulated models and reproduce results (simulation).
Thinking Rationally: Laws of Thought • Aristotle (~ 450 B. C. ) attempted to codify “right thinking” What are correct arguments/thought processes? • E. g. , “Socrates is a man, all men are mortal; therefore Socrates is mortal” • Several Greek schools developed various forms of logic: notation plus rules of derivation for thoughts.
Acting Rationally: The Rational Agent • Rational behavior: Doing the right thing! • The right thing: That which is expected to maximize the expected return • Provides the most general view of AI because it includes: – Correct inference (“Laws of thought”) – Uncertainty handling – Resource limitation considerations (e. g. , reflex vs. deliberation) – Cognitive skills (NLP, AR, knowledge representation, ML, etc. ) • Advantages: 1) More general 2) Its goal of rationality is well defined
How to achieve AI? • How is AI research done? • AI research has both theoretical and experimental sides. The experimental side has both basic and applied aspects. • There are two main lines of research: – One is biological, based on the idea that since humans are intelligent, AI should study humans and imitate their psychology or physiology. – The other is phenomenal, based on studying and formalizing common sense facts about the world and the problems that the world presents to the achievement of goals. • The two approaches interact to some extent, and both should eventually succeed. It is a race, but both racers seem to be walking. [John Mc. Carthy]
Branches of AI • • • • Logical AI Search Natural language processing pattern recognition Knowledge representation Inference From some facts, others can be inferred. Automated reasoning Learning from experience Planning To generate a strategy for achieving some goal Epistemology Study of the kinds of knowledge that are required for solving problems in the world. Ontology Study of the kinds of things that exist. In AI, the programs and sentences deal with various kinds of objects, and we study what these kinds are and what their basic properties are. Genetic programming Emotions? ? ? …
AI History
AI State of the art • Have the following been achieved by AI? – World-class chess playing – Cross-country driving – Solving mathematical problems – Discover and prove mathematical theories – Observe and understand human emotions – Express emotions –…
What is an (Intelligent) Agent? • Anything that can be viewed as perceiving its environment through sensors and acting upon that environment through its effectors to maximize progress towards its goals.
Rational Agents How to design this? Sensors percepts ? Agent Environment actions Effectors
Success of Rational agent • Rational Agent does the correct thing • How to measure the success of the agent?
What Rationality Means What is rational at any given time is depends on: - Performance Measure Degree of success - Percept History - What the agent knows about the environment - The actions agent CAN perform Rational = Best Rational = Optimal to the best of its knowledge to the best of its abilities
Autonomy • If agents actions only depends on built-in knowledge it is not autonomous • Autonomous agent should be adaptable
What is important in Agent Design? • PAGE (Percepts, Actions, Goals, Environment) • Task-specific & specialized: well-defined goals and environment • The notion of an agent is meant to be a tool for analyzing systems,
A Windshield Wiper Agent How do we design an agent that can wipe the windshields when needed? • • • Goals? Percepts? Sensors? Effectors? Actions? Environment?
A Windshield Wiper Agent (Cont’d) • • • Goals: Keep windshields clean & maintain visibility Percepts: Raining, Dirty Sensors: Camera (moist sensor) Effectors: Wipers (left, right, back) Actions: Off, Slow, Medium, Fast Environment: Inner city, freeways, highways, weather …
Interacting Agents Collision Avoidance Agent (CAA) • Goals: Avoid running into obstacles • Percepts ? • Sensors? • Effectors ? • Actions ? • Environment: Freeway Lane Keeping Agent (LKA) • Goals: Stay in current lane • Percepts ? • Sensors? • Effectors ? • Actions ? • Environment: Freeway
Interacting Agents Collision Avoidance Agent (CAA) • Goals: Avoid running into obstacles • Percepts: Obstacle distance, velocity, trajectory • Sensors: Vision, proximity sensing • Effectors: Steering Wheel, Accelerator, Brakes, Horn, Headlights • Actions: Steer, speed up, brake, blow horn, signal (headlights) • Environment: Freeway Lane Keeping Agent (LKA) • Goals: Stay in current lane • Percepts: Lane center, lane boundaries • Sensors: Vision • Effectors: Steering Wheel, Accelerator, Brakes • Actions: Steer, speed up, brake • Environment: Freeway
Behavior and performance of IAs • Perception (sequence) to Action Mapping: f : P* A – Ideal mapping: specifies which actions an agent ought to take at any point in time. – Description: Look-Up-Table, etc. • Performance measure: a subjective measure to characterize how successful an agent is (e. g. , speed, power usage, accuracy, money, etc. ) • (degree of) Autonomy: to what extent is the agent able to make decisions and take actions on its own?
Look up table Distance 10 Action obstacle No action sensor 5 Turn left 30 degrees 2 Stop agent
How is an Agent different from other software? • Agents are autonomous, that is, they act on behalf of the user • Agents contain some level of intelligence, from fixed rules to learning engines that allow them to adapt to changes in the environment • Agents don't only act reactively, but sometimes also proactively
How is an Agent different from other software? • Agents have social ability, that is, they communicate with the user, the system, and other agents as required • Agents may also cooperate with other agents to carry out more complex tasks than they themselves can handle • Agents may migrate from one system to another to access remote resources or even to meet other agents
Structure of Intelligent Agents • Agent = architecture + program • Agent program: the implementation of f : P* A, the agent’s perception-action mapping function Skeleton-Agent(Percept) returns Action memory Update. Memory(memory, Percept) Action Choose. Best. Action(memory) memory Update. Memory(memory, Action) return Action • Architecture: a device that can execute the agent program (e. g. , general-purpose computer, specialized device, etc. )
Using a look-up-table to encode f : P* A • Example: Chess Playing Agent Percept? Action? Goals? Environment? Shall we use look up table? What would be the size?
Environment Types • Characteristics – Accessible vs. inaccessible – Deterministic vs. nondeterministic – Episodic vs. nonepisodic – Static vs. dynamic – Discrete vs. continuous
Environment Types • Accessible vs Inaccessible • If an agent can obtain complete and accurate information about the state's environment, then such an environment is called an Accessible environment else it is called inaccessible. • An empty room whose state can be defined by its temperature is an example of an accessible environment. • Information about an event on earth is an example of Inaccessible environment. • E. g chess – the board is fully accessible, as are opponent’s moves. Driving – what is around the next bend is inaccessible(yet).
Environment Types • Deterministic vs Stochastic: • If an agent's current state and selected action can completely determine the next state of the environment, then such environment is called a deterministic environment. • A stochastic environment is random in nature and cannot be determined completely by an agent. • In a deterministic, accessible environment, agent does not need to worry about uncertainty. • Chess is deterministic while taxi driving is stochastic.
Environment Types • Episodic vs Sequential: • In an episodic environment, there is a series of one-shot actions, and only the current percept is required for the action. • However, in Sequential environment, an agent requires memory of past actions to determine the next best actions. • Image analysis system is episodic but Chess and taxi driving are sequential. • In sequential environments, on the other hand, the current decision could affect all future decisions.
Environment Types • Static vs Dynamic: • If the environment can change itself while an agent is deliberating then such environment is called a dynamic environment else it is called a static environment. • Static environments are easy to deal because an agent does not need to continue looking at the world while deciding for an action. • However for dynamic environment, agents need to keep looking at the world at each action. • Taxi driving is an example of a dynamic environment whereas Crossword puzzles are an example of a static environment.
Environment Types • Discrete vs Continuous: • If in an environment there a finite number of percepts and actions that can be performed within it, then such an environment is called a discrete environment else it is called continuous environment. • A chess game comes under discrete environment as there is a finite number of moves that can be performed. • A self-driving car is an example of a continuous environment.
Environment types Environment Operating System Virtual Reality Office Environment Mars Accessible Deterministic Episodic Static Discrete
Environment types Environment Accessible Operating System Yes Virtual Reality Yes Office Environment No Mars No Deterministic Episodic Static Discrete
Environment types Environment Accessible Deterministic Operating System Yes Virtual Reality Yes Office Environment No No Mars No Semi Episodic Static Discrete
Environment types Environment Accessible Deterministic Episodic Operating System Yes No Virtual Reality Yes Yes/No Office Environment No No No Mars No Semi No Static Discrete
Environment types Environment Accessible Deterministic Episodic Static Operating System Yes No No Virtual Reality Yes Yes/No No Office Environment No No Mars No Semi Discrete
Environment types Environment Accessible Deterministic Episodic Static Discrete Operating System Yes No No Yes Virtual Reality Yes Yes/no No Yes/no Office Environment No No No Mars No Semi No The environment types largely determine the agent design.
- Slides: 47