INF5390 Kunstig intelligens. Agents That Learn. Roar Fjellheim. INF5390-AI-10 Agents That Learn 1

Similar documents
Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

Lecture 1: Basic Concepts of Machine Learning

CS Machine Learning

Version Space. Term 2012/2013 LSI - FIB. Javier Béjar cbea (LSI - FIB) Version Space Term 2012/ / 18

Lecture 1: Machine Learning Basics

Proof Theory for Syntacticians

Introduction to Ensemble Learning Featuring Successes in the Netflix Prize Competition

(Sub)Gradient Descent

Chapter 2 Rule Learning in a Nutshell

Artificial Neural Networks written examination

MYCIN. The MYCIN Task

LEGO MINDSTORMS Education EV3 Coding Activities

Laboratorio di Intelligenza Artificiale e Robotica

Lecture 10: Reinforcement Learning

A Version Space Approach to Learning Context-free Grammars

Create Quiz Questions

STA 225: Introductory Statistics (CT)

Introduction to Simulation

POLA: a student modeling framework for Probabilistic On-Line Assessment of problem solving performance

Chapter 2. Intelligent Agents. Outline. Agents and environments. Rationality. PEAS (Performance measure, Environment, Actuators, Sensors)

Objectives. Chapter 2: The Representation of Knowledge. Expert Systems: Principles and Programming, Fourth Edition

Rule-based Expert Systems

have to be modeled) or isolated words. Output of the system is a grapheme-tophoneme conversion system which takes as its input the spelling of words,

AQUA: An Ontology-Driven Question Answering System

Rule Learning with Negation: Issues Regarding Effectiveness

OCR for Arabic using SIFT Descriptors With Online Failure Prediction

Learning Structural Correspondences Across Different Linguistic Domains with Synchronous Neural Language Models

Purdue Data Summit Communication of Big Data Analytics. New SAT Predictive Validity Case Study

Machine Learning from Garden Path Sentences: The Application of Computational Linguistics

Rule Learning With Negation: Issues Regarding Effectiveness

FCE Speaking Part 4 Discussion teacher s notes

Exploration. CS : Deep Reinforcement Learning Sergey Levine

AGS THE GREAT REVIEW GAME FOR PRE-ALGEBRA (CD) CORRELATED TO CALIFORNIA CONTENT STANDARDS

A. What is research? B. Types of research

Using dialogue context to improve parsing performance in dialogue systems

Using the Attribute Hierarchy Method to Make Diagnostic Inferences about Examinees Cognitive Skills in Algebra on the SAT

ReinForest: Multi-Domain Dialogue Management Using Hierarchical Policies and Knowledge Ontology

The Strong Minimalist Thesis and Bounded Optimality

Course Outline. Course Grading. Where to go for help. Academic Integrity. EE-589 Introduction to Neural Networks NN 1 EE

Algebra 1, Quarter 3, Unit 3.1. Line of Best Fit. Overview

The 9 th International Scientific Conference elearning and software for Education Bucharest, April 25-26, / X

COMPUTER-ASSISTED INDEPENDENT STUDY IN MULTIVARIATE CALCULUS

Machine Learning and Data Mining. Ensembles of Learners. Prof. Alexander Ihler

Python Machine Learning

Grade 6: Correlated to AGS Basic Math Skills

GACE Computer Science Assessment Test at a Glance

CSL465/603 - Machine Learning

Syntax Parsing 1. Grammars and parsing 2. Top-down and bottom-up parsing 3. Chart parsers 4. Bottom-up chart parsing 5. The Earley Algorithm

Decision Analysis. Decision-Making Problem. Decision Analysis. Part 1 Decision Analysis and Decision Tables. Decision Analysis, Part 1

Laboratorio di Intelligenza Artificiale e Robotica

Abstractions and the Brain

Visual CP Representation of Knowledge

Learning Methods for Fuzzy Systems

Transfer Learning Action Models by Measuring the Similarity of Different Domains

ENME 605 Advanced Control Systems, Fall 2015 Department of Mechanical Engineering

Individual Component Checklist L I S T E N I N G. for use with ONE task ENGLISH VERSION

CS 446: Machine Learning

Semi-supervised methods of text processing, and an application to medical concept extraction. Yacine Jernite Text-as-Data series September 17.

University of Groningen. Systemen, planning, netwerken Bosman, Aart

On-Line Data Analytics

Intelligent Agents. Chapter 2. Chapter 2 1

Software Development: Programming Paradigms (SCQF level 8)

MATH 205: Mathematics for K 8 Teachers: Number and Operations Western Kentucky University Spring 2017

Software Maintenance

Iterative Cross-Training: An Algorithm for Learning from Unlabeled Web Pages

A Genetic Irrational Belief System

Cognitive Modeling. Tower of Hanoi: Description. Tower of Hanoi: The Task. Lecture 5: Models of Problem Solving. Frank Keller.

Knowledge-Based - Systems

On the Polynomial Degree of Minterm-Cyclic Functions

Edexcel GCSE. Statistics 1389 Paper 1H. June Mark Scheme. Statistics Edexcel GCSE

CAAP. Content Analysis Report. Sample College. Institution Code: 9011 Institution Type: 4-Year Subgroup: none Test Date: Spring 2011

Self Study Report Computer Science

Level 6. Higher Education Funding Council for England (HEFCE) Fee for 2017/18 is 9,250*

IMGD Technical Game Development I: Iterative Development Techniques. by Robert W. Lindeman

Learning Cases to Resolve Conflicts and Improve Group Behavior

Learning Methods in Multilingual Speech Recognition

Statistical Analysis of Climate Change, Renewable Energies, and Sustainability An Independent Investigation for Introduction to Statistics

ECE-492 SENIOR ADVANCED DESIGN PROJECT

Innovative Methods for Teaching Engineering Courses

Cognitive Thinking Style Sample Report

November 2012 MUET (800)

Automatic Discretization of Actions and States in Monte-Carlo Tree Search

Discriminative Learning of Beam-Search Heuristics for Planning

Clouds = Heavy Sidewalk = Wet. davinci V2.1 alpha3

Continual Curiosity-Driven Skill Acquisition from High-Dimensional Video Inputs for Humanoid Robots

School of Innovative Technologies and Engineering

A Case Study: News Classification Based on Term Frequency

Shared Mental Models

Assignment 1: Predicting Amazon Review Ratings

A Reinforcement Learning Variant for Control Scheduling

Word Segmentation of Off-line Handwritten Documents

Seminar - Organic Computing

Learning and Transferring Relational Instance-Based Policies

On the Combined Behavior of Autonomous Resource Management Agents

Radius STEM Readiness TM

Axiom 2013 Team Description Paper

Corrective Feedback and Persistent Learning for Information Extraction

Agents and environments. Intelligent Agents. Reminders. Vacuum-cleaner world. Outline. A vacuum-cleaner agent. Chapter 2 Actuators

Ph.D. in Behavior Analysis Ph.d. i atferdsanalyse

EDCI 699 Statistics: Content, Process, Application COURSE SYLLABUS: SPRING 2016

Transcription:

INF5390 Kunstig intelligens Agents That Learn Roar Fjellheim INF5390-AI-10 Agents That Learn 1

Outline General model Types of learning Learning decision trees Learning logical descriptions Other knowledge-based methods Summary Extracts from AIMA Chapter 18: Learning From Examples AIMA Chapter 19: Knowledge in Learning INF5390-AI-10 Agents That Learn 2

Why should agents learn? Agents in previous lectures have assumed builtin knowledge, provided by designers In order to handle incomplete knowledge and changing knowledge requirements, agents must learn Learning is a way of achieving agent autonomy and the ability to improve performance over time The field in AI that deals with learning is called machine learning, and is very active INF5390-AI-10 Agents That Learn 3

General model of learning agents Performance standard Critic Sensors Feedback Learning goals Learning element Changes Knowledge Performance element Environment Agent Problem generator Actuators INF5390-AI-10 Agents That Learn 4

Elements of the general model Performance element Carries out the task of the agent, i.e. processes percepts and decides on actions Learning element Critic Proposes improvements of the performance element, based on previous knowledge and feedback Evaluates performance element by comparing results of its actions with imposed performance standards Problem generator Proposes exploratory actions to increase knowledge INF5390-AI-10 Agents That Learn 5

Aspects of the learning element Which components of the performance element are to be improved Which parts of the agent s knowledge base is targeted What feedback is available Supervised, unsupervised or reinforcement learning differ in type of feedback agent receives What representation is used for the components E.g. logic sentences, belief networks, utility functions, etc. What prior information (knowledge) is available INF5390-AI-10 Agents That Learn 6

Performance element components Possible components that can be improved Direct mapping from states to actions Means to infer world properties from percept sequences Information about how the world evolves Information about the results of possible actions Utility information about the desirability of world states Desirability of specific actions in specific states Goals describing states that maximize utility In each case, learning can be sees as learning an unknown function y = f(x) INF5390-AI-10 Agents That Learn 7

Hypothesis space H H: the set of hypothesis functions h to be considered in searching for f(x) Consistent hypothesis: Fits with all data If several consistent hypotheses choose simplest one! (Occam s razor) Realizability of learning problem: Realizable if H contains the true function Unrealizable if not We do normally know what the true function is Why not choose H as large as possible? May be very inefficient in learning and in applying INF5390-AI-10 Agents That Learn 8

Types of learning - Knowledge Inductive learning Given a collection of examples (x, f(x)) Return a function h that approximates f Does not rely on prior knowledge ( just data ) Deductive (or analytical) learning Going from known general f to a new f that is logically entailed Based on prior knowledge ( data+knowledge ) Resemble more human learning INF5390-AI-10 Agents That Learn 9

Types of learning - Feedback Unsupervised learning Agent learns patterns in data even though no feedback is given, e.g. via clustering Reinforcement learning Agent gets reward or punishment at the end, but is not told which particular action led to the result Supervised learning Agent receives learning examples and is explicitly told what the correct answer is for each case Mixed modes, e.g. semi-supervised learning Correct answers for some but not all examples INF5390-AI-10 Agents That Learn 10

Learning decision trees A decision situation can be described by A number of attributes, each with a set of possible values A decision which may be Boolean (yes/no) or multivalued A decision tree is a tree structure where Each internal node represents a test of the value of an attribute, with one branch for each possible attribute value Each leaf node represents the value of the decision if that node is reached Decision tree learning is one of simplest and most successful forms of machine learning An example of inductive and supervised learning INF5390-AI-10 Agents That Learn 11

Example: Wait for restaurant table Goal predicate: WillWait (for restaurant table) Domain attributes Alternate (other restaurants nearby) Bar (to wait in) Fri/Sat (day of week) Hungry (yes/no) Patrons (none, some, full) Price (range) Raining (outside) Reservation (made before) Type (French, Italian,..) WaitEstimate (minutes) INF5390-AI-10 Agents That Learn 12

One decision tree for the example Patrons? None Some Full No WaitEstimate? >60 30-60 10-30 0-10 No Alternate? Hungry? No Reservation? Fri/Sat? No Alternate? No Bar? No No No Raining? No No No No INF5390-AI-10 Agents That Learn 13

Expressiveness of decision trees The tree is equivalent to a conjunction of implications rpatrons( r, Full) WaitEstimate( r,10 30) Hungry( r, No) WillWait( r) Cannot represent tests on two or more objects, restricted to testing attributes of one object Fully expressive as propositional language, e.g. any Boolean function can be written as a decision tree For some functions, exponentially large decision trees are required E.g. decision trees are good for some functions and bad for others INF5390-AI-10 Agents That Learn 14

Inducing decision trees from examples Terminology Example - Specific values for all attributes, plus goal predicate Classification - Value of goal predicate of the example Positive/negative example - Goal predicate is true/false Training set - Complete set of examples The task of inducing a decision tree from a training set is to find the simplest tree that agrees with the examples The resulting tree should be more compact and general than the training set itself INF5390-AI-10 Agents That Learn 15

A training set for the restaurant example Example Attributes Will Alt Bar Fri Hun Pat Price Rain Res Type Est wait X1 No No Some $$$ No French 0-10 X2 No No Full $ No No Thai 30-60 No X3 No No No Some $ No No Burger 0-10 X4 No Full $ No No Thai 10-30 X5 X6 X7 X8 ETC. X9 X10 X11 X12 INF5390-AI-10 Agents That Learn 16

General idea of induction algorithm Test the most important attribute first, i.e. the one that makes the most difference to the classification Patrons? is a good choice for the first attribute, because it allows early decisions Apply same principle recursively Patrons? None Some Full +: - : X7,X11 No +: X1,X3,X4,X6,X8,X12 - : X2,X5,X7,X9,X10,X11 +: X1,X3,X6,X8 - : +: X4,X12 - : X2,X5,X9,X10 INF5390-AI-10 Agents That Learn 17

Recursive step of induction algorithm The attribute test splits the tree into smaller decision trees, with fewer examples and one attribute less Four cases to consider for the smaller trees If some positive and some negative examples, choose best attribute to split them If examples are all positive (negative), answer (No) If no examples left, return a default value (no example observed for this case) If no attributes left, but both positive and negative examples: Problem! (same description, different classifications - noise) INF5390-AI-10 Agents That Learn 18

Induced tree for the example set The induced tree is simpler than the original manual tree It captures some regularities that the original creator was unaware of Patrons? None Some Full No Hungry? No Type? No French Italian Thai Burger No Fri/Sat? No No INF5390-AI-10 Agents That Learn 19

% correct on test set Assessing learning performance Collect large set of examples Divide into two disjoint sets, training set and test set Use learning algorithm on training set to generate hypothesis h Measure percentage of examples in test set that are correctly classified by h Repeat steps above for differently sized training sets Training set size INF5390-AI-10 Agents That Learn 20

Broaden applicability of decision trees Missing data How to handle training samples with partially missing attribute values Multi/many-valued attributes How to treat attributes with many possible values Continuous or integer-valued input attributes How to branch the decision tree when attribute has a continuous value range Continuous-valued output attributes Requires regression tree rather than a decision tree, i.e. output value is a linear function of input variables rather than a point value INF5390-AI-10 Agents That Learn 21

PAC The theory of learning How can we be sure that the learning algorithm gives a function h that predicts correctly? How many learning examples are needed? What hypothesis space H should be used? Etc. Computational learning theory tries to answer such questions Underlying principle: Any h that is consistent with a sufficient large number of examples is probably approximately correct (PAC) PAC theory can be used to bound hypothesis space and size of example set INF5390-AI-10 Agents That Learn 22

A logical formulation of learning Inductive learning can be seen as searching for a good hypothesis in a large search space The hypothesis space is defined by a particular representation language, e.g. logic Define learning in terms of logical connections between hypotheses, examples, and goals This approach enables extensions of simple inductive decision tree learning to applying full logical inference INF5390-AI-10 Agents That Learn 23

Hypothesis space Let Q be a unary goal predicate, and C i a candidate definition, i.e. a hypothesis H i for classifying examples x correctly is that x Q( x) Ci( x) Example: Induced decision tree is equivalent to r WillWait( r) Patrons( r, Some) Patrons( r, Full) Hungry( r) Type( r, French) Patrons( r, Full) Hungry( r) Type( r, Thai) Fri / Sat( r) Patrons( r, Full) Hungry( r) Type( r, Burger) Hypothesis space is the set {H 1,.., H n }, of which one is believed to be correct: H 1 V H 2 V... H n INF5390-AI-10 Agents That Learn 24

Examples for learning An example is an object X i to which the goal concept Q may or may not apply (Q(X i ) or Q(X i )), and which has a logical description D i (X i ) E.g. first induction example X 1 Alternate( X 1) Bar( X 1) Fri / Sat( X 1) Hungry( X 1)... with classification WillWait(X 1 ) Complete training set is the conjunction of all X i A hypothesis agrees with all examples if and only if it is logically consistent with the training set INF5390-AI-10 Agents That Learn 25

False examples and inductive learning If a hypothesis H i is consistent with the entire training set, it must be consistent with each example An example can be a false negative for the hypothesis, i.e. H i says it should be negative but it is positive An example can be a false positive for the hypothesis, i.e. H i says it should be positive but it is negative If the example is false negative or false positive, the example and hypothesis are inconsistent, and the hypothesis can be ruled out Inductive learning in a logical setting is the process of gradually eliminating hypotheses that are inconsistent with the examples INF5390-AI-10 Agents That Learn 26

Current-best-hypothesis search Current-best-hypothesis search maintains a single hypothesis which is adjusted as new examples arrive to maintain consistency _ + + + + + + + _ + + + + _ + + - + + - + _ Consistent hypothesis False negative Generalized hypothesis False positive Specialized hypothesis INF5390-AI-10 Agents That Learn 27

Generalizing and specializing hypotheses If hypothesis H1 with definition C1 is a generalization of H2 with definition C2, then x C2( x) C1( x) Generalization of a hypothesis can be achieved by dropping conditions C2 x) Alternate( x) Patrons( x, Some) C ( x) Patrons( x, Some) ( 1 Specialization of a hypothesis can similarly be achieved by adding conditions Current-best-hypothesis search with generalization and specialization and backtracking has been used in many learning programs, but does not scale well INF5390-AI-10 Agents That Learn 28

Least commitment search The current-best-hypothesis approach has to backtrack because it is forced to choose one hypothesis even if it does not have enough data A better approach is to keep all hypotheses consistent with data so far, and gradually remove hypotheses inconsistent with new examples Assuming that the right hypothesis is contained in the original set, it will still be in the reduced set (the version space) The algorithm is incremental, need not backtrack INF5390-AI-10 Agents That Learn 29

Other knowledge-based learning methods EBL Explanation-based learning Extracts general rules from single examples accompanied by an explanation RBL Relevance-based learning Uses prior knowledge to identify relevant attributes thereby reducing hypothesis space KBIL Knowledge-based inductive learning Uses prior knowledge to find inductive hypotheses that explain sets of observations ILP Inductive logic programming Performs KBIL on knowledge expressed in first-order logic, and can learn relational knowledge INF5390-AI-10 Agents That Learn 30

Summary Learning is an essential capability for agents in unknown or resource-constrained environments Learning agents have a performance element and a learning element The learning element tries to improve various parts of the performance element, generally seen as functions y = f(x) Learning can be inductive (from examples) or deductive (based on knowledge Differ in types of feedback to the agent: unsupervised, reinforcement or supervised learning INF5390-AI-10 Agents That Learn 31

Summary (cont.) Learning a function from examples of inputs and outputs is an example of inductive/supervised learning, of which learning decision trees is a simple case A logical formulation of learning uses currentbest-hypothesis approach to maintain a single hypothesis which is updated with new examples Other logical or knowledge-based learning methods include EBK, RBIL, KBIL and IPL INF5390-AI-10 Agents That Learn 32