ΕΚΠ 413 / ΕΚΠ 606 Αυτόνοµοι (Ροµ οτικοί) Πράκτορες

Σχετικά έγγραφα
ΕΚΠ 413 / ΕΚΠ 606 Αυτόνοµοι (Ροµ οτικοί) Πράκτορες

ΕΚΠ 413 / ΕΚΠ 606 Αυτόνοµοι (Ροµ οτικοί) Πράκτορες

ΕΚΠ 413 / ΕΚΠ 606 Αυτόνοµοι (Ροµ οτικοί) Πράκτορες

ΣΤΟΧΑΣΤΙΚΕΣ ΔΙΕΡΓΑΣΙΕΣ & ΒΕΛΤΙΣΤΟΠΟΙΗΣΗ Αίθουσα Νέα Κτίρια ΣΗΜΜΥ Ε.Μ.Π.

καθ. Βασίλης Μάγκλαρης

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Other Test Constructions: Likelihood Ratio & Bayes Tests

ΠΛΗ513 - Αυτόνομοι Πράκτορες Αναφορά Εργασίας

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Μελέτη και Υλοποίηση Ελεγκτών Ρομποτικών Συστημάτων με χρήση Αλγορίθμων Ενισχυτικής Μάθησης

Systems with unlimited supply of work: MCQN with infinite virtual buffers A Push Pull multiclass system

6.3 Forecasting ARMA processes

Numerical Analysis FMN011

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

ΣΤΟΧΑΣΤΙΚΕΣ ΔΙΕΡΓΑΣΙΕΣ & ΒΕΛΤΙΣΤΟΠΟΙΗΣΗ Αίθουσα Νέα Κτίρια ΣΗΜΜΥ Ε.Μ.Π.

ΑΛΓΟΡΙΘΜΟΙ Άνοιξη I. ΜΗΛΗΣ

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

ΕΦΑΡΜΟΓΗ Q-LEARNING ΣΕ GRID WORLD ΚΑΙ ΕΞΥΠΝΟΣ ΧΕΙΡΙΣΜΟΣ ΤΟΥ LEARNING RATE ΛΑΘΙΩΤΑΚΗΣ ΑΡΗΣ ΑΥΤΟΝΟΜΟΙ ΠΡΑΚΤΟΡΕΣ

Reinforcement Learning Competition Invasive Species Domain - αυτόνομοι Πράκτορες Γιώργος Κεχαγιάς

The Simply Typed Lambda Calculus

Section 8.3 Trigonometric Equations

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Estimation for ARMA Processes with Stable Noise. Matt Calder & Richard A. Davis Colorado State University

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

5.4 The Poisson Distribution.

Models for Probabilistic Programs with an Adversary

Ηλεκτρονικοί Υπολογιστές IV

Lecture 2. Soundness and completeness of propositional logic

ΠΛΗ 513-Αυτόνομοι Πράκτορες Χειμερινό εξάμηνο 2012 Εφαρμογή αλγορίθμων ενισχυτικής μάθησης στο παιχνίδι Βlackjack. Χλης Νικόλαος-Κοσμάς

Homework 3 Solutions

TMA4115 Matematikk 3

Ε ανάληψη. Ορισµοί της Τεχνητής Νοηµοσύνης (ΤΝ) Καταβολές. Ιστορική αναδροµή. Πράκτορες. Περιβάλλοντα. κριτήρια νοηµοσύνης

Concrete Mathematics Exercises from 30 September 2016

Figure A.2: MPC and MPCP Age Profiles (estimating ρ, ρ = 2, φ = 0.03)..

Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science.

CE 530 Molecular Simulation

ΤΜΗΜΑ ΔΙΟΙΚΗΣΗΣ ΕΠΙΧΕΙΡΗΣΕΩΝ

Solution Concepts. Παύλος Στ. Εφραιµίδης. Τοµέας Λογισµικού και Ανάπτυξης Εφαρµογών Τµήµα Ηλεκτρολόγων Μηχανικών και Μηχανικών Υπολογιστών

Business English. Ενότητα # 9: Financial Planning. Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 8η: Producer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

derivation of the Laplacian from rectangular to spherical coordinates

ΗΜΥ 210 ΣΧΕΔΙΑΣΜΟΣ ΨΗΦΙΑΚΩΝ ΣΥΣΤΗΜΑΤΩΝ. Χειµερινό Εξάµηνο 2016 ΔΙΑΛΕΞΗ 13: Διαδικασία Σχεδιασµού Ακολουθιακών Κυκλωµάτων (Κεφάλαιο 6.

Applying Markov Decision Processes to Role-playing Game

2 Composition. Invertible Mappings

Reinforcement Learning

Inverse trigonometric functions & General Solution of Trigonometric Equations

ΕΚΠ 413 / ΕΚΠ 606 Αυτόνοµοι (Ροµ οτικοί) Πράκτορες

Queensland University of Technology Transport Data Analysis and Modeling Methodologies

The challenges of non-stable predicates

Depth versus Rigidity in the Design of International Trade Agreements. Leslie Johns

Elements of Information Theory

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

ΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ "ΠΟΛΥΚΡΙΤΗΡΙΑ ΣΥΣΤΗΜΑΤΑ ΛΗΨΗΣ ΑΠΟΦΑΣΕΩΝ. Η ΠΕΡΙΠΤΩΣΗ ΤΗΣ ΕΠΙΛΟΓΗΣ ΑΣΦΑΛΙΣΤΗΡΙΟΥ ΣΥΜΒΟΛΑΙΟΥ ΥΓΕΙΑΣ "

Approximation of distance between locations on earth given by latitude and longitude

General Models & Inapproximability Overview. Influence Maximization σε Social Networks

Finite difference method for 2-D heat equation

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

ΜΟΝΤΕΛΑ ΛΗΨΗΣ ΑΠΟΦΑΣΕΩΝ

Partial Differential Equations in Biology The boundary element method. March 26, 2013

Statistical Inference I Locally most powerful tests

If we restrict the domain of y = sin x to [ π, π ], the restrict function. y = sin x, π 2 x π 2

ES440/ES911: CFD. Chapter 5. Solution of Linear Equation Systems

Διακριτικές Συναρτήσεις

4.6 Autoregressive Moving Average Model ARMA(1,1)

Monetary Policy Design in the Basic New Keynesian Model

If we restrict the domain of y = sin x to [ π 2, π 2

PARTIAL NOTES for 6.1 Trigonometric Identities

ΦΥΛΛΟ ΕΡΓΑΣΙΑΣ Α. Διαβάστε τις ειδήσεις και εν συνεχεία σημειώστε. Οπτική γωνία είδησης 1:.

ΤΕΧΝΗΤΗ ΝΟΗΜΟΣΥΝΗ. Ενότητα 2: Δένδρο αναζήτησης. Ρεφανίδης Ιωάννης Τμήμα Εφαρμοσμένης Πληροφορικής

Exercises to Statistics of Material Fatigue No. 5

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

Assalamu `alaikum wr. wb.

Thesis presentation. Turo Brunou

ΠΛΗ 405 Τεχνητή Νοηµοσύνη

2). V (s) = R(s) + γ max T (s, a, s )V (s ) (3)

ΗΜΥ 220: ΣΗΜΑΤΑ ΚΑΙ ΣΥΣΤΗΜΑΤΑ Ι Ακαδημαϊκό έτος Εαρινό Εξάμηνο Κατ οίκον εργασία αρ. 2

Μηχανική Μάθηση Hypothesis Testing

Αυτόνομη Πλοήγηση Θαλάσσιας Ρομποτικής Πλατφόρμας με χρήση Μεθόδων Ενισχυτικής Μάθησης. Κωνσταντίνο Τζιορτζιώτη

Mean bond enthalpy Standard enthalpy of formation Bond N H N N N N H O O O

Matrices and Determinants

Introduction to the ML Estimation of ARMA processes

Solutions to Exercise Sheet 5

Παράλληλος προγραμματισμός περιστροφικών αλγορίθμων εξωτερικών σημείων τύπου simplex ΠΛΟΣΚΑΣ ΝΙΚΟΛΑΟΣ

6. MAXIMUM LIKELIHOOD ESTIMATION

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 10η: Basics of Game Theory part 2 Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Ψηφιακή Οικονομία. Διάλεξη 11η: Markets and Strategic Interaction in Networks Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Written Examination. Antennas and Propagation (AA ) April 26, 2017.

Example Sheet 3 Solutions

FSM Toolkit Exercises

Πανεπιστήμιο Δυτικής Μακεδονίας. Τμήμα Μηχανικών Πληροφορικής & Τηλεπικοινωνιών. Τεχνητή Νοημοσύνη. Ενότητα 2: Αναζήτηση (Search)

Fractional Colorings and Zykov Products of graphs

Second Order RLC Filters

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

ΠΛΗ 405 Τεχνητή Νοηµοσύνη

Supplementary Materials for Evolutionary Multiobjective Optimization Based Multimodal Optimization: Fitness Landscape Approximation and Peak Detection

Transcript:

ΕΚΠ 413 / ΕΚΠ 606 Αυτόνοµοι (Ροµ οτικοί) Πράκτορες Ενισχυτική Μάθηση Reinforcement Learning Τµήµα Ηλεκτρονικών Μηχανικών και Μηχανικών Υ ολογιστών Πολυτεχνείο Κρήτης

Ε ανάληψη Λήψη α οφάσεων ακολουθιακά προβλήµατα αποφάσεων Μαρκωβιανές διεργασίες απόφασης Βέλτιστες ολιτικές επανάληψη αξιών επανάληψη πολιτικών Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 2

Σήµερα Reinforcement Learning (RL) problems and approaches Prediction temporal difference learning least-squares temporal difference (LSTD) learning Control Q-learning least-squares policy iteration (LSPI) Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 3

Reinforcement Learning Learning from Mistakes!

Machine Learning Unsupervised learning learning without a teacher information: none identify structure in the data clustering, self-organization k-means, Kohonen maps Supervised learning learning with a teacher information: correct examples generalize from examples classification, approximation SVMs, neural networks Reinforcement learning learning with a critic information: trial and error reinforce good choices value function, control policy TD-learning, Q-learning Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 5

Reinforcement Learning Action Reward State Learn how to take actions in each state of the process so as to maximize the cumulative reward! The reward signal reinforces good decision making Learn from experience: (state, action, reward, next state)-samples Samples taken from the process or from a generative model Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 6

Reinforcement Learning Setup Known states rewards Unknown transition model reward model Significance learning without knowing what you are learning generic approach for agent design very hard problem Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 7

Learning Problems Prediction Control $? Action Action π π? : $$$?? Reward Reward State State Learn to predict the expected total reward for a fixed action policy [ Passive Reinforcement Learning ] Learn to control the process to maximize the expected total reward [ Active Reinforcement Learning ] Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 8

Learning Methodology Action Reward? State Action Action Reward? State State model-based learning model-free learning Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 9

Learning Environment cooperative competitive single-agent multi-agent Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 10

Process Modeling Markov Decision Processes

Markov Decision Process (MDP) MDP (S, A, P, R, γ, D) S: state space of the process A: action space of the process P: transition model, P(s a, s) R: reward function, R(s, a) γ: discount factor, 0 < γ 1 D: initial state distribution Markov property next state and reward are independent of history Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 12

Value Functions State Value Function V State-Action Value Function Q Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 13

Value Function Representation Exact use a table to represent the value function V : one entry for each s, O( S ) space Q : one entry for each (s,a), O( S A ) space infeasible for realistic problems Approximate approximate the value function with a function approximator e.g. neural networks, polynomials, radial basis functions,... need only enough space to store the approximator parameters equations and algorithms become harder to deal with convergence properties are compromised Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 14

Linear Value Function Approximation Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 15

Prediction Passive Reinforcement Learning

The Prediction Problem Given a fixed deterministic (or, stochastic) policy Goal to predict the performance of policy to evaluate policy to learn the value function V (s) of policy State value function π t ( ) γ ( t) π, 0 V s = E R s s = s t= 0 Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 17

Grid Domain Trials (1,1) -,04 (1,2) -,04 (1,3) -,04 (1,2) -,04 (1,3) -,04 (2,3) -,04 (3,3) -,04 (4,3) +1 (1,1) -,04 (1,2) -,04 (1,3) -,04 (2,3) -,04 (3,3) -,04 (3,2) -,04 (3,3) -,04 (4,3) +1 (1,1) -,04 (2,1) -,04 (3,1) -,04 (3,2) -,04 (4,2) -1 Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 18

Άµεση Eκτίµηση Xρησιµότητας direct utility estimation in adaptive control theory (1950-1960) Ιδέα χρησιµότητα = αναµενόµενη συνολική ανταµοιβή από κατάσταση s κάθε δοκιµή (trial) δίνει ένα δείγµα για κάθε κατάσταση που επισκέπτεται παράδειγµα (1,1) -,04 (1,2) -,04 (1,3) -,04 (1,2) -,04 (1,3) -,04 (2,3) -,04 (3,3) -,04 (4,3) +1 0.72 0.76 0.80 0.84 0.88 0.92 0.96 1 εκτίµηση: µέσος όρος όλων των δειγµάτων για κάθε κατάσταση Χαρακτηριστικά αγνοεί τις εξαρτήσεις µεταξύ χρησιµοτήτων (εξίσωση Bellman) ψάχνει µεγαλύτερο χώρο και συγκλίνει µε αργό ρυθµό Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 19

Προσαρµόσιµος υναµικός Προγραµµατισµός Adaptive Dynamic Programming (ADP) µαθαίνει το µοντέλο µεταβάσεων, T(s, (s), s') µαθαίνει το µοντέλο ανταµοιβών, R(s) τα αντικαθιστά στην εξίσωση Bellman V π ( ) ( ) γ π( ) ( ) π,, V ( ) s = R s + T s s s s λύνει το γραµµικό σύστηµα ως προς τις χρησιµότητες Χαρακτηριστικά εκτίµηση µοντέλων µε καταµέτρηση µεγάλη χωρική πολυπλοκότητα παραλλαγή: τροποποιηµένη επανάληψη πολιτικών Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 20 s

Adaptive Dynamic Programming function Passive-ADP-Agent (αίσθηση) returns µια ενέργεια inputs: αίσθηση, µια αίσθηση που δηλώνει την τρέχουσα κατάσταση s και το σήµα ανταµοιβής r static:, µια σταθερή πολιτική mdp, MDP µε µοντέλο Τ, ανταµοιβές R, προεξόφληση γ V, ένας πίνακας χρησιµοτήτων, αρχικά κενός N sa, πίνακας συχνοτήτων για ζεύγη (s, a), αρχικά µηδενικός N sas, πίνακας συχνοτήτων για τριάδες (s, a, s ), αρχικά µηδενικός s, a, η προηγούµενη κατάσταση και ενέργεια, αρχικά κενές if s είναι νέο, then do V[s ] r, R[s ] r if s όχι κενό then do αύξηση των N sa [s, a] και N sas [s, a, s ] for each t έτσι ώστε το N sas [s, a, t] είναι µη µηδενικό, do T[s, a, t] N sas [s, a, t]/ N sa [s, a] V Value-Determination(, V, mdp) if Terminal?[s ] then s, a κενό else s, a s, [s ] return a Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 21

Α όδοση ADP ο πιο "γρήγορος" αλγόριθµος ως προς το ρυθµό σύγκλισης κάθε δοκιµή χρειάζεται αρκετό χρόνο Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 22

Μάθηση Χρονικών ιαφορών Ιδέα τοπική ενηµέρωση χρησιµοτήτων σύµφωνα µε τις εξαρτήσεις Temporal Difference Learning (TD) ( s) V ( s) + α R( s) + γ V ( s ) V ( s) ( ) V π π π π α = ρυθµός µάθησης (θυµίζει τα νευρωνικά δίκτυα) φθίνει µε το χρόνο για αποφυγή "ταλαντώσεων" Παράδειγµα έστω ότι από την πρώτη δοκιµή έχουµε V (1,3)=0,84, V (2,3) = 0,92 έστω η µετάβαση από το (1,3) στο (2,3) στη δεύτερη δοκιµή η εξίσωση διαφορών ορίζει ότι η V (1,3) πρέπει να αυξηθεί Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 23

Temporal Difference Learning Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 24

Αλγόριθµος TD function Passive-ΤD-Agent (αίσθηση) returns µια ενέργεια inputs: αίσθηση, µια αίσθηση που δηλώνει την τρέχουσα κατάσταση s και το σήµα ανταµοιβής r static:, µια σταθερή πολιτική V, πίνακας χρησιµοτήτων, αρχικά κενός N s, πίνακας συχνοτήτων για τις καταστάσεις, αρχικά µηδενικός s, a, r η προηγούµενη κατάσταση, ενέργεια, ανταµοιβή, αρχικά κενά if s είναι νέο, then do V[s ] r' if s όχι κενό then do αύξηση του N s [s] V[s] V[s] + α(n s [s])(r + γv[s ] V[s]) if Terminal?[s ] then s, a, r κενό else s, a, r s, [s ], r return a Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 25

Α όδοση TD πιο "αργός" και πιο ασταθής από τον ADP κάθε δοκιµή χρειάζεται πολύ λίγο χρόνο Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 26

TD with Approximation Generic approximation can only update the parameters of the approximator update the parameters according to the temporal difference use the gradient to determine the appropriate change Linear approximation linear combination of basis functions update equation Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 27

TD with Linear Approximation Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 28

Least-Squares Temporal Difference TD is trying to solve a linear system incrementally Idea collect all data and solve the Bellman equation at once the solution (true value function) satisfies the fixed point property Linear architectures trying to find the best point in the space of approximator parameters enforce the fixed point property under orthogonal projection the solution is a fixed-point approximation to the true value function Properties efficient use of all samples at once elimination of learning rate, schedules, oscillations,... Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 29

LSTD Algorithm Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 30

LSTD Performance from [Boyan, 2000] Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 31

Control Active Reinforcement Learning

The Control Problem Given experience samples (s,a,r,s ) Goal to learn a good policy Idea a better policy can be retrieved from a state-action value function State action value function Policy Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 33

Greedy Policy Greedy (improved) policy over V Greedy (improved) policy over Q Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 34

Χρήση Ά ληστης Πολιτικής εκτελεί πάντα την καλύτερη ενέργεια ως προς την εκτιµώµενη συνάρτηση αξιολόγησης µη-βέλτιστες αρχικές δοκιµές αποπροσανατολίζουν την αναζήτηση αφήνει περιοχές του χώρου καταστάσεων ανεξερεύνητες! Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 35

Εκµετάλλευση και Εξερεύνηση Εκµετάλλευση (exploitation) χρήση της άπληστης πολιτικής για βραχυπρόθεσµη µεγιστοποίηση της ανταµοιβής Εξερεύνηση (exploration) επιλογή τυχαίων κινήσεων για βελτίωση/επέκταση της εκτίµησης της συνάρτησης αξιολόγησης, µε στόχο µακροπρόθεσµα οφέλη Exploration vs. Exploitation Dilemma εξερεύνηση ή εκµετάλλευση; Βέλτιστο σχήµα άπληστη πολιτική στο όριο της άπειρης εξερεύνησης Greedy in the Limit of Infinite Exploration (GLIE) Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 36

Ασιόδοξη Αρχικο οίηση Ε ανάληψη αξιών µε "αισιόδοξες" χρησιµότητες V + (s): αισιόδοξη εκτίµηση χρησιµότητας Ν(α,s): αριθµός φορών που έχει δοκιµαστεί η α στην s + + V s R s f T s a s s N a s α s ( ) ( ) + γ max (,, ) V ( ), (, ) f(u, n): συνάρτηση εξερεύνησης f ( u, n) + R αν n< Ne = u διαφορετικά R + : άνω όριο για τις χρησιµότητες εξασφαλίζει ότι κάθε ζεύγος (α,s) θα δοκιµαστεί N e φορές Η αρχικοποίηση των V + µπορεί να γίνει στο R + για όλες τις άγνωστες χρησιµότητες. Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 37

Παράδειγµα Παρατηρήσεις (α) µερικές χρησιµότητες αργούν να συγκλίνουν (β) γρήγορη σύγκλιση στη βέλτιστη πολιτική Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 38

Bellman Optimality Equation a non-linear system with unknowns Q can be solved iteratively Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 39

Q-learning Properties requires a huge amount of samples requires appropriate settings for the learning rate makes minimal use of each sample Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 40

Policy Iteration O( S 3 A 3 ) time Policy Evaluation (Critic) Value Function Q π Θ( S A ) space O( S A ) time Policy Improvement (Actor) Model Policy π Θ( S ) space Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 41

Approximate Policy Iteration ε Approximate Value Function ^^ Q π Value Function Projection Policy Improvement (Actor) Policy Evaluation (Critic) Policy Projection Model Approximate Policy ^π δ Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 42

The Main Idea ε Approximate Value Function ^^ Q π Value Function Projection Policy Improvement (Actor) Policy Evaluation (Critic) Policy Projection Approximate Policy δ Model ^π Samples Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 43

Fixed Point Approximation Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 44

Orthogonal Projection Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 45

The LSTDQ Algorithm Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 46

Least-Squares Policy Iteration Approximate Value Function Linear architecture Q^ π = φ T w Policy Evaluation and Projection LSTDQ Policy Improvement Maximization Samples Policy Greedy policy over Q^ π Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 47

The LSPI Algorithm Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 48

LSPI Properties Properties Quality : Learns policies of bounded quality Stability : Is stable; does not diverge Efficiency : Makes efficient use and reuse of training samples Scalability : Handles successfully large scale problems Advantages Allows great flexibility in choosing/using basis functions Poses no restrictions on sample collection It is simple and easy to implement Limitations Cannot guarantee convergence to the optimal solution With badly distributed samples, the iteration may oscillate With insufficient basis functions, LSPI may converge to a poor policy Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 49

Experimentation Put RL to work!

Inverted Pendulum Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 51

Pendulum: Learning Parameters Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 52

Pendulum: Results LSPI Q-learning Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 53

Bicycle Balancing and Riding Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 54

Bicycle Learning Parameters Features k=100 (20 basis functions for each action) Samples collected from random episodes starting at a random state around the initial position following a purely random policy for only 20 steps only 20 minutes worth of operating time! Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 55

Bicycle Learning Results Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 56

Bicycle Learning Performance Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 57

Tetris Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 58

Tetris: Παράµετροι Μάθησης Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 59

Tetris: Α οτελέσµατα Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 60

Robot Learning Video Clips tetris-before, tetris-after 07-initial.mpg, 08-finished.mpg 09-ers7-slow.avi, 10-ers7-fast.avi 11-SwingUp.avi, 12-PoleBalancing.mov, 13-pole-balance.mov 14-airhockey.avi, 15-maze.avi Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 61

Μελέτη Σύγγραµµα Κεφάλαιο 21 Άρθρα L. Kaelbling, M. Littman, A. Moore, Reinforcement Learning: A Survey, Journal of Artificial Intelligence Research 4, 237 285, 1996. S. Bradtke, A. Barto, Linear Least-Squares Algorithms for Temporal Difference Learning, Machine Learning, 22: 1-3, 33-57, 1996. M. Lagoudakis and Ronald Parr, Least-Squares Policy Iteration, Journal of Machine Learning Research 4, 1107-1149, 2003. Μ. Γ. Λαγουδάκης Τµήµα ΗΜΜΥ Πολυτεχνείο Κρήτης Σελίδα 62