A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games

Similar documents
Exponential Moving Average Based Multiagent Reinforcement Learning Algorithms

Self-learning Fuzzy logic controllers for pursuit-evasion differential games. Robotics and Autonomous Systems

Q(λ)-learning adaptive fuzzy logic controllers for pursuit evasion differential games

Exponential Moving Average Based Multiagent Reinforcement Learning Algorithms

15-780: Graduate Artificial Intelligence. Reinforcement learning (RL)

Introduction to Reinforcement Learning. CMPT 882 Mar. 18

Today s s Lecture. Applicability of Neural Networks. Back-propagation. Review of Neural Networks. Lecture 20: Learning -4. Markov-Decision Processes

Reinforcement Learning

Reinforcement Learning In Continuous Time and Space

Lecture 23: Reinforcement Learning

Lecture 8: Policy Gradient

CS599 Lecture 1 Introduction To RL

Prof. Dr. Ann Nowé. Artificial Intelligence Lab ai.vub.ac.be

Machine Learning I Continuous Reinforcement Learning

MARKOV DECISION PROCESSES (MDP) AND REINFORCEMENT LEARNING (RL) Versione originale delle slide fornita dal Prof. Francesco Lo Presti

Reinforcement Learning. Donglin Zeng, Department of Biostatistics, University of North Carolina

Intelligent Systems and Control Prof. Laxmidhar Behera Indian Institute of Technology, Kanpur

Systems control with generalized probabilistic fuzzyreinforcement

Marks. bonus points. } Assignment 1: Should be out this weekend. } Mid-term: Before the last lecture. } Mid-term deferred exam:

Reinforcement learning an introduction

6 Reinforcement Learning

Grundlagen der Künstlichen Intelligenz

15-889e Policy Search: Gradient Methods Emma Brunskill. All slides from David Silver (with EB adding minor modificafons), unless otherwise noted

Lecture 1: March 7, 2018

Reinforcement Learning

Reinforcement Learning with Function Approximation. Joseph Christian G. Noel

Reinforcement Learning: An Introduction

Administration. CSCI567 Machine Learning (Fall 2018) Outline. Outline. HW5 is available, due on 11/18. Practice final will also be available soon.

Balancing and Control of a Freely-Swinging Pendulum Using a Model-Free Reinforcement Learning Algorithm

Lecture 7: Value Function Approximation

Computational Intelligence Lecture 20:Neuro-Fuzzy Systems

Q-Learning in Continuous State Action Spaces

Reinforcement Learning and NLP

INF 5860 Machine learning for image classification. Lecture 14: Reinforcement learning May 9, 2018

Reinforcement Learning

REINFORCEMENT LEARNING

Reinforcement Learning and Deep Reinforcement Learning

Machine Learning and Bayesian Inference. Unsupervised learning. Can we find regularity in data without the aid of labels?

Reinforcement Learning II

Learning Tetris. 1 Tetris. February 3, 2009

Reinforcement Learning for Continuous. Action using Stochastic Gradient Ascent. Hajime KIMURA, Shigenobu KOBAYASHI JAPAN

1 Introduction 2. 4 Q-Learning The Q-value The Temporal Difference The whole Q-Learning process... 5

CMU Lecture 12: Reinforcement Learning. Teacher: Gianni A. Di Caro

Reinforcement Learning

Reinforcement Learning. Spring 2018 Defining MDPs, Planning

Introduction to Reinforcement Learning

This question has three parts, each of which can be answered concisely, but be prepared to explain and justify your concise answer.

REINFORCE Framework for Stochastic Policy Optimization and its use in Deep Learning

Reinforcement Learning Part 2

Deep Reinforcement Learning SISL. Jeremy Morton (jmorton2) November 7, Stanford Intelligent Systems Laboratory

Decision Theory: Markov Decision Processes

CHAPTER 7 MODELING AND CONTROL OF SPHERICAL TANK LEVEL PROCESS 7.1 INTRODUCTION

Reinforcement Learning

Continuous State Space Q-Learning for Control of Nonlinear Systems

15-780: ReinforcementLearning

Elements of Reinforcement Learning

Reinforcement Learning in Non-Stationary Continuous Time and Space Scenarios

16.410/413 Principles of Autonomy and Decision Making

(Deep) Reinforcement Learning

Reinforcement Learning: the basics

Reinforcement Learning. Machine Learning, Fall 2010

Using Gaussian Processes for Variance Reduction in Policy Gradient Algorithms *

Trust Region Policy Optimization

ELEC-E8119 Robotics: Manipulation, Decision Making and Learning Policy gradient approaches. Ville Kyrki

Q-learning. Tambet Matiisen

Generalization and Function Approximation

Decision Theory: Q-Learning

MS&E338 Reinforcement Learning Lecture 1 - April 2, Introduction

Linear Least-squares Dyna-style Planning

Basics of reinforcement learning

Christopher Watkins and Peter Dayan. Noga Zaslavsky. The Hebrew University of Jerusalem Advanced Seminar in Deep Learning (67679) November 1, 2015

Approximate Q-Learning. Dan Weld / University of Washington

Reinforcement Learning. Yishay Mansour Tel-Aviv University

COMP3702/7702 Artificial Intelligence Lecture 11: Introduction to Machine Learning and Reinforcement Learning. Hanna Kurniawati

Institute for Advanced Management Systems Research Department of Information Technologies Åbo Akademi University. Fuzzy Logic Controllers - Tutorial

An Adaptive Clustering Method for Model-free Reinforcement Learning

Chapter 8: Generalization and Function Approximation

Lecture 25: Learning 4. Victor R. Lesser. CMPSCI 683 Fall 2010

Complexity of stochastic branch and bound methods for belief tree search in Bayesian reinforcement learning

Temperature control using neuro-fuzzy controllers with compensatory operations and wavelet neural networks

Reinforcement Learning as Classification Leveraging Modern Classifiers

State Space Abstractions for Reinforcement Learning

CHAPTER 4 FUZZY AND NEURAL NETWORK FOR SR MOTOR

Value Function Methods. CS : Deep Reinforcement Learning Sergey Levine

Lecture 10 - Planning under Uncertainty (III)

Active Policy Iteration: Efficient Exploration through Active Learning for Value Function Approximation in Reinforcement Learning

Lecture 3: Markov Decision Processes

FUZZY CONTROL CONVENTIONAL CONTROL CONVENTIONAL CONTROL CONVENTIONAL CONTROL CONVENTIONAL CONTROL CONVENTIONAL CONTROL

CS 287: Advanced Robotics Fall Lecture 14: Reinforcement Learning with Function Approximation and TD Gammon case study

CS 570: Machine Learning Seminar. Fall 2016

Machine Learning. Reinforcement learning. Hamid Beigy. Sharif University of Technology. Fall 1396

ECE276B: Planning & Learning in Robotics Lecture 16: Model-free Control

RL 3: Reinforcement Learning

Temporal Difference Learning & Policy Iteration

Development of a Deep Recurrent Neural Network Controller for Flight Applications

Enhancing Fuzzy Controllers Using Generalized Orthogonality Principle

Lecture 18: Reinforcement Learning Sanjeev Arora Elad Hazan

A Gentle Introduction to Reinforcement Learning

Deep reinforcement learning. Dialogue Systems Group, Cambridge University Engineering Department

Q-Learning for Markov Decision Processes*

Transcription:

International Journal of Fuzzy Systems manuscript (will be inserted by the editor) A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games Mostafa D Awheda Howard M Schwartz Received: date / Accepted: date Abstract In this work, we propose a new fuzzy reinforcement learning algorithm for differential games that have continuous state and action spaces The proposed algorithm uses function approximation systems whose parameters are updated differently from the updating mechanisms used in the algorithms proposed in the literature Unlike the algorithms presented in the literature which use the direct algorithms to update the parameters of their function approximation systems, the proposed algorithm uses the residual gradient value iteration algorithm to tune the input and output parameters of its function approximation systems It has been shown in the literature that the direct algorithms may not converge to an answer in some cases, while the residual gradient algorithms are always guaranteed to converge to a local minimum The proposed algorithm is called the residual gradient fuzzy actor critic learning (RGFACL) algorithm The proposed algorithm is used to learn three different pursuit-evasion differential games Simulation results show that the performance of the proposed RGFACL algorithm outperforms the performance of the fuzzy actor critic learning (FACL) and the Q-learning fuzzy inference system (QLFIS) algorithms in terms of convergence and speed of learning Keywords Fuzzy control Reinforcement learning Pursuit-evasion differential games Residual gradient algorithms 1 Introduction Fuzzy logic controllers (FLCs) have recently attracted considerable attention as intelligent controllers, and are used in engineering applications [1,2 FLCs have been widely used to deal with plants that are nonlinear and ill-defined [3 5 They can also deal with plants with high uncertainty in the knowledge about their environments [6, 7 However, one of the problems in adaptive fuzzy control is which mechanism should be used to tune the fuzzy controller Several learning approaches have been developed to tune the FLCs so that the desired performance is achieved Some of these approaches design the fuzzy systems from input-output data by using different mechanisms such as a table look-up approach, a genetic algorithm approach, a gradient-descent training approach, a recursive least squares approach, and clustering [8, 33 This type of learning is called supervised learning where a training data set is used to learn from However, in this type of learning, the performance of the learned FLC will depend on the performance of the expert In addition, the training data set used in supervised learning may be hard or expensive to obtain In such cases, we think of alternative techniques where neither a priori knowledge nor a training data set is required In this case, reward-based learning techniques, such as reinforcement learning algorithms, can be used The main advantage of such reinforcement learning Mostafa D Awheda Department of Systems and Computer Engineering Carleton University 1125 Colonel By Drive, Ottawa, ON, K1S 5B6, Canada E-mail: mawheda@scecarletonca Howard M Schwartz Department of Systems and Computer Engineering Carleton University 1125 Colonel By Drive, Ottawa, ON, K1S 5B6, Canada E-mail: schwartz@scecarletonca

2 Mostafa D Awheda, Howard M Schwartz algorithms is that they do not need either a known model for the process nor an expert to learn from[44 Reinforcement learning (RL) is a learning technique that maps situations to actions so that an agent learns from the experience of interacting with its environment [22, 24 Reinforcement learning has attracted attention and has been used in intelligent robot control systems [11 13, 23, 25, 27 29, 39 Reinforcement learning has also been used for solving nonlinear optimal control problems [14 20 Without knowing which actions to take, the reinforcement learning agent exploits and explores actions to discover which action gives the maximum reward in the long run Different from supervised learning, which is learning from input-output data provided by an expert, reinforcement learning is adequate for learning from interaction by using very simple evaluative or critic information instead of instructive information [22 Most of the traditional reinforcement learning algorithms represent the state/state-action value function as a look-up table for each state/state-action-pair [22 Despite the theoretical foundations of these algorithms and their effectiveness in many applications, these reinforcement learning approaches cannot be applied to real applications with large state and action spaces [22, 23, 30, 36 38 This is because of the phenomenon known as the curse of dimensionality caused by the exponentially grown number of states when the number of state variables increases [22 Moreover, traditional reinforcement learning approaches cannot be applied to differential games, where the states and actions are continuous One of the possible solutions to the problem of continuous domains is to discretize the state and action spaces However, this discretization may also lead to the problem of the curse of dimensionality that appears when discretizing large continuous states and/or actions [22, 23, 39 To overcome these issues that lead to the problem of the curse of dimensionality, one may use a function approximation system to represent the large discrete and/or continuous spaces [8, 9, 22, 35 Different types of function approximation systems are used in the literature, and the gradient-descent-based function approximation systems are among the most widely used ones [22 In addition, the gradient-descent-based function approximation systems are well suited to online reinforcement learning [22 11 Related work Several fuzzy reinforcement learning approaches have been proposed in the literature to deal with differential games (that have continuous state and action spaces) by using gradient-descent-based function approximation systems [9, 10, 12, 32, 39, 40 Some of these approaches only tune the output parameters of their function approximation systems [9, 12, 32, where the input parameters of their function approximations are kept fixed On the other hand, the other approaches tune both the input and output parameters of their function approximation systems [10, 39, 40 In [9, the author proposed a fuzzy actor critic learning (FACL) algorithm that uses gradient-descentbased fuzzy inference systems (FISs) as function approximation systems The FACL algorithm only tunes the output parameters (the consequent parameters) of its FISs (the actor and the critic) by using the temporal difference error (TD) calculated based on the state value function However, the input parameters (the premise parameters) of its FISs are kept fixed during the learning process In [32, the authors proposed a fuzzy reinforcement learning approach that uses gradient-descent-based FISs as function approximation systems Their approach only tunes the output parameters of the function approximation systems based on the TD error calculated based on the state value functions of the two successive states in the state transition In [12, the authors proposed the generalized probabilistic fuzzy reinforcement learning (GPFRL) algorithm, which is a modified version of the actor-critic learning architecture The GPFRL algorithm uses gradient-descent-based FISs as function approximation systems The GPFRL only tunes the output parameters of its function approximation systems based on the TD error of the critic and the performance function of the actor In [39, the authors proposed a fuzzy learning approach that uses a time delay neural network (TDNN) and a FIS as gradient-descent-based function approximation systems Their approach tunes the input and output parameters of the function approximation systems based on the TD error calculated based on the state-action value function In [40, the authors proposed a fuzzy actor-critic reinforcement learning network (FACRLN) algorithm based on a fuzzy radial basis function (FRBF) neural network The FACRLN uses the FRBF neural networks as function approximation systems The FACRLN algorithm tunes the input and output parameters of the function approximation systems based on the TD error calculated by the temporal difference of the value function between the two successive states in the state transition In [10, the authors proposed the QLFIS algorithm that uses gradient-descent-based FISs as function approximation systems The QLFIS algorithm tunes the input and output parameters of the function approximation

A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games 3 systems based on the TD error of the state-action value functions of the two successive states in the state transition However, all these fuzzy reinforcement learning algorithms [9, 10, 12, 32, 39, 40 use what so called direct algorithms described in [21 to tune the parameters of their function approximation systems Although direct algorithms have been widely used in the tunning mechanism of the parameters for the function approximation systems, the direct algorithms may lead the function approximation systems to unpredictable results and, in some cases, to divergence [21, 45 48 12 Main contribution In this work, we propose a new fuzzy reinforcement learning algorithm for differential games, where the states and actions are continuous The proposed algorithm uses function approximation systems whose parameters are updated differently from the updating mechanisms used in the algorithms proposed in [9, 10,12,32,39,40 Unlike the algorithms presented in the literature which use the direct algorithms to tune their function approximation systems, the proposed algorithm uses the residual gradient value iteration algorithm to tune the input and output parameters of its function approximation systems The direct algorithms tune the parameters of the function approximation system based on the partial derivatives of the value function at the current state s t ; whereas the residual gradient algorithms tune the parameters of the function approximation system based on the partial derivatives of the value function at both the current state s t and the next state s t+1 The direct and residual gradient algorithms are presented in Section (21) The direct algorithms may not converge to an answer in some cases, while the residual gradient algorithms are always guaranteed to converge to a local minimum [21, 45 48 Furthermore, we take this opportunity to also present the complete derivation of the partial derivatives that are needed to compute both the direct and residual gradient algorithms To the best of our knowledge, the derivation of the partial derivatives have never been explicitly shown Table (1) shows a brief comparison among some fuzzy reinforcement learning algorithms and the proposed algorithm Table 1 Comparison among some fuzzy reinforcement learning algorithms and the proposed algorithm Algorithm Type of gradient-descent method Input parameters of function approximation systems FACL [9 Direct Fixed Tuned Algorithm proposed in [32 Direct Fixed Tuned GPFRL [12 Direct Tuned Tuned Algorithm proposed in [39 Direct Tuned Tuned FACRLN [40 Direct Tuned Tuned QLFIS [10 Direct Tuned Tuned The proposed algorithm Residual Tuned Tuned Output parameters of function approximation systems We investigate the proposed algorithm on different pursuit-evasion differential games because this kind of games is considered as a general problem for several other problems such as the problems of wall following, obstacle avoidance, and path planning Moreover, pursuit-evasion games are useful for many real-world applications such as search and rescue, locating and capturing hostile intruders, localizing and neutralizing environmental threads, and surveillance and tracking [10, 23 The proposed algorithm is used to learn three different pursuit-evasion differential games In the first game, the evader is following a simple control strategy, whereas the pursuer is learning its control strategy to capture the evader in minimum time In the second game, it is also only the pursuer that is learning However, the evader is following an intelligent control strategy that exploits the advantage of the maneuverability of the evader In the third game, we make both the pursuer and the evader learn their control strategies Therefore, the complexity of the system will increase as the learning in a multi-robot system is considered as a problem of a moving target [26 In the multi-robot system learning, each robot will try to learn its control strategy by interacting with the other robot which is also learning its control strategy at the same time Thus, the best-response policy of each learning robot may keep changing during learning in multi-robot system The proposed algorithm outperforms the FACL and QLFIS algorithms proposed in [9 and [10 in terms of convergence and speed of learning when they all are used to learn the pursuitevasion differential games considered in this work

4 Mostafa D Awheda, Howard M Schwartz This paper is organized as follows: Preliminary concepts and notations are reviewed in Section 2 The QLFIS algorithm proposed in [10 is presented in Section 3 Section 4 presents the pursuit-evasion game The proposed RGFACL algorithm is introduced in Section 5 The simulation and results are presented in Section 6 2 Preliminary Concepts and tations The direct and the residual gradient algorithms and the fuzzy inference systems are presented in this section 21 Direct and Residual Gradient Algorithms Traditional reinforcement learning algorithms such as the Q-learning algorithm and the value iteration algorithm represent the value functions as lookup tables and are guaranteed to converge to optimal values[22 These algorithms have to be combined with function-approximation systems when they are applied to real applications with large state and action spaces or with continuous state and action spaces The direct and the residual gradient algorithms described in [21 can be used when the traditional Q-learning and the value iteration algorithms are combined with function-approximation systems In [21, the author illustrated with some examples that the direct algorithms may converge fast but may become unstable in some cases In addition, the author showed that the residual gradient algorithms converge in those examples and are always guaranteed to converge to a local minimum Another study presented in [47 shows that the direct algorithms are faster than the residual gradient algorithms only when the value function is represented in a tabular form However, when function approximation systems are involved, the direct algorithms are not always faster than the residual gradient algorithms In other words, when function approximation systems are involved, the residual gradient algorithms are considered as the superior algorithms as they are always guaranteed to converge, whereas the direct algorithms may not converge to an answer in some cases Other different studies [45,46,48 confirm the results presented in [21 in terms of the superiority of the residual gradient algorithms as they are always shown to converge To illustrate the difference between the direct algorithms and the residual gradient algorithms, we will give two different examples of these algorithms; the direct value iteration algorithm (an example of the direct algorithms) and the residual gradient value iteration algorithm (an example of the residual gradient algorithms) 211 The direct value iteration algorithm For Markov decision processes (MDPs), the value function V t (s t ) at the state s t for approximation of the reinforcement rewards can be defined as follows [32, 34, V t (s t ) = E{ γ i t r i } (1) where γ [0, 1) is a discount factor and r i is the immediate external reward that the learning agent gets from the learning environment The recursive form of Eq (1) can be defined as follows [32,34, i=t V t (s t ) = r t + γv t (s t+1 ) (2) The temporal difference residual error, t, and the mean square error, E t, between the two sides of Eq (2) are given as follows, t = [ r t + γv t (s t+1 ) V t (s t ) (3) E t = 1 2 2 t (4) For a deterministic MDP, after transition from a state to another, the direct value iteration algorithm updates the weights of the function-approximation system as follows [21,

A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games 5 ψ t+1 = ψ t α E t ψ t (5) where ψ t represents the input and output parameters of the function-approximation system that needs to be tuned, α is a learning rate, and the term E t ψ t is defined as follows, Thus, E t t = t = [ r t + γv t (s t+1 ) V t (s t ) V t (s t ) (6) ψ t ψ t ψ t ψ t+1 = ψ t + α [ r t + γv t (s t+1 ) V t (s t ) V t (s t ) (7) ψ t The direct value iteration algorithm updates the derivative E t ψ t as in Eq (6) This equation shows that the direct value iteration algorithm treats the value function V t (s t+1 ) in the temporal error t as a constant Therefore, the derivative V t(s t+1 ) ψ t will be zero However, the value function V t (s t+1 ) is not a constant, and it is a function of the input and output parameters of the function-approximation system, ψ t Therefore, the derivative V t(s t+1 ) ψ t should not be assigned to zero during the tuning of the input and output parameters of the function-approximation system 212 The residual gradient value iteration algorithm The residual gradient value iteration algorithm updates the weights of the function-approximation system as follows [21, where, Thus, ψ t+1 = ψ t α E t ψ t (8) E t t = t = [ r t + γv t (s t+1 ) V t (s t ) [ γv t (s t+1 ) V t (s t ) (9) ψ t ψ t ψ t ψ t ψ t+1 = ψ t α [ r t + γv t (s t+1 ) V t (s t ) [ γv t (s t+1 ) V t (s t ) (10) ψ t ψ t The residual gradient value iteration algorithm updates the derivative E t ψ t as in Eq (9) In this equation, the residual gradient value iteration algorithm treats the value function V t (s t+1 ) in the temporal error t as a function of the input and output parameters of the function approximation system, ψ t Therefore, the derivative V t(s t+1 ) ψ t will not be assigned to zero during the tuning of the input and output parameters of the function approximation system This will make the residual gradient value iteration algorithm performs better than the direct value iteration algorithm in terms of convergence [21 22 Fuzzy Inference Systems Fuzzy inference systems may be used as function approximation systems so that reinforcement learning approaches can be applied to real systems with continuous domains [8, 9, 22 Among the most widely used FISs are the Mamdani FIS proposed in [41 and the Takagi-Sugeno-Kang (TSK) FIS proposed in [42,43 The FISs used in this work are zero-order TSK FISs with constant consequents Each FIS consists of L rules The inputs of each rule are n fuzzy variables; whereas the consequent of each rule is a constant number Each rule l (l = 1,, L) has the following form, R l : IF s 1 is F l 1,, and s n is F l n THEN z l = k l (11) where s i, (i = 1,, n), is the ith input state variable of the fuzzy system, n is the number of input state variables, and Fi l is the linguistic value of the input s i at the rule l Each input s i has h membership functions The variable z l represents the output variable of the rule l, and k l is a constant that describes the consequent parameter of the rule l In this work, Gaussian membership functions are used for the inputs and each membership function (MF) is defined as follows,

6 Mostafa D Awheda, Howard M Schwartz ( µ F l i (si ) = exp ( s i m ) ) 2 σ (12) where σ and m are the standard deviation and the mean, respectively In each FIS used in this work, the total number of the standard deviations of the membership functions of its inputs is defined as H, where H = n h In addition, the total number of the means of the membership functions of its inputs is H Thus, for each FIS used in this work, the standard deviations and the means of the membership functions of the inputs are defined, respectively, as σ j and m j, where j = 1,, H We define the set of the parameters of the membership functions of each input, Ω(s i ), as follows, Ω(s 1 ) = {(σ 1, m 1 ), (σ 2, m 2 ),, (σ h, m h )} Ω(s 2 ) = {(σ h+1, m h+1 ), (σ h+2, m h+2 ),, (σ 2h, m 2h )} Ω(s n ) = {(σ (n 1)h+1, m (n 1)h+1 ), (σ (n 1)h+2, m (n 1)h+2 ),, (σ H, m H )} (13) The output of the fuzzy system is given by the following equation when we use the product inference engine with singleton fuzzifier and center-average defuzzifier [8 Z(s t ) = L L [( n i=1 µf l i (si ))k l ( n i=1 µf l i (s i )) = L Φ l (s t )k l (14) where s t = (s 1,, s n ) is the state vector, µ F l i describes the membership value of the input state variable s i in the rule l, and Φ l (s t ) is the normalized activation degree (normalized firing strength) of the rule l at the state s t and is defined as follows: Φ l (s t ) = L n l i=1 µf i (si ) ω l (s t ) ( n = i=1 µf i l L (s i )) ω l(s t ) (15) where ω l (s t ) is the firing strength of the rule l at the state s t, and it is defined as follows, n ω l (s t ) = µ F l i (si ) (16) i=1 We define the set of the parameters of each firing strength of each rule in each FIS, Ω(ω l ), as follows, Ω(ω 1 ) = {(σ 1, m 1 ), (σ h+1, m h+1 ),, (σ (n 1)h+1, m (n 1)h+1 )} Ω(ω 2 ) = {(σ 1, m 1 ), (σ h+1, m h+1 ),, (σ (n 1)h+2, m (n 1)h+2 )} Ω(ω h ) = {(σ 1, m 1 ), (σ h+1, m h+1 ),, (σ H, m H )} Ω(ω h+1 ) = {(σ 1, m 1 ), (σ h+2, m h+2 ),, (σ (n 1)h+1, m (n 1)h+1 )} Ω(ω L ) = {(σ h, m h ), (σ 2h, m 2h ),, (σ H, m H )} (17)

A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games 7 Fig 1 The QLFIS technique [10 3 The Q-learning Fuzzy Inference System Algorithm The QLFIS algorithm is a modified version of the algorithms presented in [32 and [39 The QLFIS algorithm combines the Q-learning algorithm with a function approximation system, and is applied directly to games with continuous state and action spaces The structure of the QLFIS algorithm is shown in Fig 1 The QLFIS algorithm uses a function approximation system (FIS) to estimate the state-action value functions Q(s t, u) The QLFIS algorithm also uses a function approximation system (FLC) to generate the continuous action The QLFIS algorithm tunes the input and output parameters of its function approximation systems [10 The QLFIS algorithm uses the so-called direct algorithms described in [21 as a mechanism to tune the input and output parameters of its function approximation systems 31 Update rules for the function approximation system (FIS) The input parameters of the FIS are the parameters of the Gaussian membership functions of its input; the standard deviations σ j and the means m j On the other hand, the output parameters of the FIS are the consequent (or conclusion) parts of the fuzzy rules, k l To simplify notations, we refer to the input and output parameters of the FIS as ψ Q Thus, the update rules of the input and output parameters for the FIS of the QLFIS algorithm are given as follows [10, ψ Q t+1 = ψq t + ρ t Q t (s t, u c ) ψ Q t where ρ is a learning rate for the FIS parameters, and t is the temporal difference error that is defined as follows, (18) t = r t + γq t (s t+1, u c ) Q t (s t, u c ) (19) where r t is the reward received at time t, γ is a discount factor, and Q t (s t, u c ) is the estimated stateaction value function at the state s t The term Q t(s t,u c ) ψ Q t in Eq (18) is computed as in [10 as follows, Q t (s t, u c ) k l = Φ l (s t ) (20) Q t (s t, u c ) = k l Q t (s t, u c ) l ω l(s t ) Q t (s t, u c ) = k l Q t (s t, u c ) l ω l(s t ) ω l (s t ) 2(s i m j ) 2 (σ j ) 3 (21) ω l (s t ) 2(s i m j ) (σ j ) 2 (22)

8 Mostafa D Awheda, Howard M Schwartz Fig 2 Pursuit-evasion model 32 Update rules for the function approximation system (FLC) Likewise the FIS, the input parameters of the FLC are the parameters of the Gaussian membership functions of its input; the standard deviations σ j and the means m j On the other hand, the output parameters of the FLC are the consequent (or conclusion) parts of the fuzzy rules, k l We refer to the input and output parameters of the FLC as ψ u Thus, the update rules of the input and output parameters for the FLC of the QLFIS algorithm are given as follows [10, ψt+1 u = ψt u u [ t uc u t + τ t ψ ut σ n where τ is a learning rate for the FLC parameters, u c is the output of the FLC with a random Gaussian noise The term u t ψ in Eq (23) can be calculated by replacing Q t u t (s t, u c ) with u t in Eq (20), Eq (21) and Eq (22) as follows, (23) u t k l = Φ l (s t ) (24) u t = k l u t l ω l(s t ) ω l(s t ) 2(s i m j ) (σ j ) 3 (25) u t = k l u t l ω l(s t ) ω l(s t ) 2(s i m j ) (σ j ) 2 (26) 2 4 The Pursuit-Evasion Game The pursuit-evasion game is defined as a differential game [49 In this game, the pursuer s objective is to capture the evader, whereas the evader s objective is to escape from the pursuer or at least prolong the capture time Fig (2) shows the model of the pursuit-evasion differential game The equations of motion of the pursuer and the evader robots can be described by the following equations [50, 51, ẋ κ = V κ cos(θ κ ) ẏ κ = V κ sin(θ κ ) θ κ = V κ L κ tan(u κ ) (27) where κ represents both the pursuer p and the evader e, V κ represents robot κ s speed, θ κ is the orientation of robot κ, (x κ, y κ ) is the position of robot κ, L κ represents the wheelbase of robot κ, and u κ represents robot κ s steering angle, where u κ [ u κmax, u κmax In this work, we assume that the pursuer is faster than the evader by making V p > V e It is also assumed that the evader is more maneuverable than the pursuer by making u emax > u pmax A simple classical

A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games 9 control strategy that can be used to define the control strategies of the pursuer and the evader, in a pursuit-evasion game, can be given as follows, and, u κmax : δ κ < u κmax u κ = δ κ : u κmax δ κ u κmax (28) u κmax : δ κ > u κmax ( δ κ = tan 1 y e y ) p θ κ (29) x e x p where δ κ represents the angle difference between the direction of robot κ and the line-of-sight (LoS) to the other robot To capture the evader in a pursuit-evasion game when the pursuer uses the simple control strategy described by Eq (28) and Eq (29), the angle difference δ p has to be driven to zero by the pursuer Thus, the control strategy of the pursuer in this case is to drive this angle difference to zero On the other hand, the control strategy of the evader is to escape from the pursuer and keep the distance between the evader and the pursuer as large as possible The evader can do so by following the intelligent control strategy described by the following two rules [10, 33, 51, 52: 1 If the distance between the evader and the pursuer is greater than a specific distance d, the control strategy of the evader is defined as follows, ( u e = tan 1 y e y ) p θ e (30) x e x p 2 If the distance between the evader and the pursuer is less than or equal to the distance d, the evader exploits its higher maneuverability, and the control strategy for the evader in this case is given as follows, The distance d is defined as follows, u e = (θ p + π) θ e (31) d = L p tan(u pmax ) The pursuer succeeds to capture the evader if the distance between them is less than the capture radius d c The distance between the pursuer and the evader is defined by d and is given as follows, d = (32) (x e x p ) 2 + (y e y p ) 2 (33) 5 The Proposed Algorithm In this work, we propose a new fuzzy reinforcement learning algorithm for differential games that have continuous state and action spaces The proposed algorithm FISs as function approximation systems; an actor (fuzzy logic controller, FLC) and a critic The critic is used to estimate the value functions V t (s t ) and V t (s t+1 ) of the learning agent at two different states s t and s t+1, respectively The values of V t (s t ) and V t (s t+1 ) will depend on the input and output parameters of the critic Unlike the algorithms proposed in [9,10,12,32,39,40 which use the direct algorithms to tune the parameters of their function approximation systems, the proposed algorithm uses the residual gradient value iteration algorithm described in [21 to tune the input and output parameters of its function approximation systems It has been shown in [21,45 48 that the direct algorithms may not converge to an answer in some cases, while the residual gradient algorithms are always guaranteed to converge The proposed algorithm is called the RGFACL algorithm The structure of the proposed RGFACL algorithm is shown in Fig (3) The input parameters of the critic are the parameters of the MFs of its inputs, σ j and m j (where j = 1,, H) The output parameters of the critic are the consequent parameters of its rules, k l (where l = 1,, L) To simplify notations, we refer to the input and output parameters of the critic as ψ C Similarly, the input parameters of the actor are the parameters of the MFs of its input σ j and m j, and the output parameters of the actor are the consequent parameters of its rules k l To simplify notations, we refer to the input and output parameters of the actor as ψ A The temporal difference residual error, t, is

10 Mostafa D Awheda, Howard M Schwartz defined as follows, t = r t + γv t (s t+1 ) V t (s t ) (34) 51 Adaptation rules for the critic In this subsection, we derive the adaptation rules that the proposed algorithm uses to tune the input and output parameters of the critic For the sake of completeness, we are going to present the complete derivation of the partial derivatives that are needed by the proposed algorithm The mean squared error, E, of the temporal difference residual error, t, is defined as follows, E = 1 2 2 t (35) The input and output parameters of the critic are updated based on the residual gradient method described in [21 as follows, ψ C t+1 = ψ C t α E ψ C t (36) where ψt C represents the input and output parameters of the critic at time t, and α is a learning rate for the parameters of the critic The QLFIS algorithm proposed in [10 uses the so-called direct algorithms described in [21 to define the term E On the other hand, the proposed algorithm defines the term E based on the residual ψt C ψt C gradient value iteration algorithm which is also described in [21 as follows, E ψ C t = t [ γ V t(s t+1 ) ψ C t V t(s t ) ψt C The proposed algorithm treats the value function V t (s t+1 ) in the temporal difference residual error t as a function of the input and output parameters of its function approximation system (the critic), ψt C Unlike the QLFIS algorithm, the proposed algorithm will not assign a value of zero to the derivative V t (s t+1 ) ψ C t during the tuning of the input and output parameters of the critic This is because the value function V t (s t+1 ) is a function of the input and output parameters of the critic ψt C, and its derivative should not be assigned to zero all the time V t (s t+1 ) ψ C t From Eq (37), Eq (36) can be rewritten as follows, ψ C t+1 = ψ C t α [ r t + γv t (s t+1 ) V t (s t ) [ γ ψ C t V t (s t+1 ) ψ C t (37) V t (s t ) (38) The derivatives of the state value functions, V t (s t ) and V t (s t+1 ), with respect to the output parameters of the critic, k l, is calculated from Eq (14) as follows, where l = 1,, L V t (s t ) k l = Φ l (s t ) (39) Similarly, V t (s t+1 ) k l = Φ l (s t+1 ) (40) where Φ l (s t ) and Φ l (s t+1 ) are calculated by using Eq (15) at the states s t and s t+1, respectively We use the chain rule to calculate the derivatives V t(s t ) and V t(s t+1 ) We start with the derivative which is calculated as follows, V t (s t )

A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games 11 where j = 1,, H V t (s t ) = V t(s t ) ω l (s t ) ω l(s t ) (41) The term V t(s t ) ω l (s t ) is calculated as follows, V t (s t ) [ ω l (s t ) = Vt (s t ) We first calculate the term V t(s t ) as follows, V t (s t ) = V t (s t ) [ l ω l(s t )k l l ω l(s t ) V t (s t ) ω L (s t ) = k 1 V t (s t ) l ω l(s t ) Similarly, we can calculate the terms V t(s t ),, and V t(s t ) ω L (s t ) Thus, Eq (42) can be rewritten as follows, V t (s t ) [ ω l (s t ) = k1 V t (s t ) l ω l(s t ) k 2 V t (s t ) l ω l(s t ) k L V t (s t ) l ω l(s t ) On the other hand, the term ω l(s t ) in Eq (41) is calculated as follows, ω l (s t ) [ ω1 (s t ) ω L (s t ) T = (45) The derivative ω 1(s t ) = can be calculated based on the definition of ω 1 (s t ) given in Eq (16) as follows, [ n i=1 We then substitute Eq (12) into Eq (46) as follows, µ F 1 i (si ) = [ µ F 1 1 (s1 ) µ F 1 2 (s2 ) µ F 1 n (sn ) = [ ( exp ( s 1 m 1 ) ) ( 2 exp ( s 2 m h+1 ) ) ( 2 exp ( s n m (n 1)h+1 ) ) 2 σ 1 σ h+1 σ (n 1)h+1 Thus, the derivatives ω 1(s t ) σ 1, ω 1(s t ) σ 2,, and ω 1(s t ) σ H are calculated as follows, = 2(s 1 m 1 ) 2 σ 1 σ1 3 ω 1 (s t ) σ 2 = 2(s 2 m h+1 ) 2 σ h+1 σh+1 3 ω 1 (s t ) σ h+2 = 2(s n m (n 1)h+1 ) 2 σ (n 1)h+1 σ(n 1)h+1 3 ω 1 (s t ) σ (n 1)h+2 σ H Thus, from Eq (48), the derivative ω 1(s t ), (j = 1,, H), can be rewritten as follows, (42) (43) (44) (46) (47) (48)

12 Mostafa D Awheda, Howard M Schwartz = { 2(si m j ) 2 σ 3 j ω 1 (s t ) if (σ j, m j ) Ω(ω 1 ) 0 if (σ j, m j ) / Ω(ω 1 ) where the term s i is the ith input state variable of the state vector s t and is defined as follows, We can rewrite Eq (49) as follows, s 1 if (σ j, m j ) Ω(s 1 ) s 2 if (σ j, m j ) Ω(s 2 ) s i = s n if (σ j, m j ) Ω(s n ) (49) (50) where, 2(s i m j ) 2 = ξ j,1 ω 1 (s t ) (51) σ 3 j ξ j,1 = Similarly, we can calculate the derivatives ω 2(s t ) = [ n i=1 { 1 if (σj, m j ) Ω(ω 1 ) 0 if (σ j, m j ) / Ω(ω 1 ) as follows, µ F 2 i (si ) = [ µ F 2 1 (s1 ) µ F 2 2 (s2 ) µ F 2 n (sn ) (52) (53) = [ ( exp ( s 1 m 1 ) ) ( 2 exp ( s 2 m h+1 ) ) ( 2 exp ( s n m (n 1)h+2 ) ) 2 σ 1 σ h+1 σ (n 1)h+2 Thus, the derivatives ω 2(s t ) σ 1,, and ω 2(s t ) σ H are calculated as follows, (54) = 2(s 1 m 1 ) 2 σ 1 σ1 3 ω 2 (s t ) σ 2 = 2(s 2 m h+1 ) 2 σ h+1 σh+1 3 ω 2 (s t ) σ h+2 σ (n 1)h+1 = 2(s n m (n 1)h+2 ) 2 σ (n 1)h+2 σ(n 1)h+2 3 ω 2 (s t ) σ (n 1)h+3 σ H Thus, from Eq (55), the derivatives ω 2(s t ), (j = 1,, H), can be rewritten as follows, (55)

A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games 13 = We can rewrite Eq (56) as follows, { 2(si m j ) 2 σ 3 j ω 2 (s t ) if (σ j, m j ) Ω(ω 2 ) 0 if (σ j, m j ) / Ω(ω 2 ) (56) where, 2(s i m j ) 2 = ξ j,2 ω 2 (s t ) (57) σ 3 j ξ j,2 = { 1 if (σj, m j ) Ω(ω 2 ) 0 if (σ j, m j ) / Ω(ω 2 ) (58) Similarly, we can calculate the derivatives ω 3(s t ) rewritten as follows,, ω 4 (s t ),, and ω L(s t ) Thus, Eq (45) can be ω l (s t ) = where, 2(s i m j ) [ξ 2 2(s i m j ) 2 2(s i m j ) 2 T j,1 ω 1 (s t ) ξ j,2 ω 2 (s t ) ξ j,l ω L (s t ) (59) σ 3 j σ 3 j σ 3 j ξ j,l = { 1 if (σj, m j ) Ω(ω l ) 0 if (σ j, m j ) / Ω(ω l ) (60) Hence, from Eq (44) and Eq (59), the derivative V t(s t ), (j = 1,, H), in Eq (41) is then calculated as follows, V t (s t ) = 2(s i m j ) 2 σj 3 Similarly, we calculate the derivative V t(s t+1 ) where, V t (s t+1 ) = 2(s i m j ) 2 σj 3 L as follows, L s 1 if (σ j, m j ) Ω(s 1 ) s 2 if (σ j, m j ) Ω(s 2 ) s i = s n if (σ j, m j ) Ω(s n ) where s i is the ith input state variable of the state vector s t+1 ξ j,l k l V t (s t ) l ω l(s t ) ω l(s t ) (61) ξ j,l k l V t (s t+1 ) l ω l(s t+1 ) ω l(s t+1 ) (62) We also use the chain rule to calculate the derivatives V t(s t ) and V t(s t+1 ) We start with the derivative which is calculated as follows, V t (s t ) (63) V t (s t ) = V t(s t ) ω l (s t ) ω l(s t ) (64) The term V t(s t ) ω l (s t ) is calculated as in Eq (44) and the term ω l(s t ) is calculated as follows, We first calculate the term ω 1(s t ) = ω l (s t ) [ ω1 (s t ) = [ n i=1 by using Eq (16) as follows, ω L (s t ) T (65) µ F 1 i (si ) = [ µ F 1 1 (s1 ) µ F 1 2 (s2 ) µ F 1 n (sn ) (66)

14 Mostafa D Awheda, Howard M Schwartz We then substitute Eq (12) into Eq (66) as follows, = [ ( exp ( s 1 m 1 ) ) ( 2 exp ( s 2 m h+1 ) ) ( 2 exp ( s n m (n 1)h+1 ) ) 2 σ 1 σ h+1 σ (n 1)h+1 Thus, the derivatives ω 1(s t ) m 1, ω 1(s t ) m 2,, and ω 1(s t ) m H are calculated as follows, (67) = 2(s 1 m 1 ) m 1 σ1 2 ω 1 (s t ) m 2 = 2(s 2 m h+1 ) m h+1 σh+1 2 ω 1 (s t ) m h+2 = 2(s n m (n 1)h+1 ) m (n 1)h+1 σ(n 1)h+1 2 ω 1 (s t ) m (n 1)h+2 m H (68) Thus, from Eq (68), the derivative ω 1(s t ), (j = 1,, H), can be rewritten as follows, = { 2(si m j ) σ 2 j ω 1 (s t ) if (σ j, m j ) Ω(ω 1 ) 0 if (σ j, m j ) / Ω(ω 1 ) (69) We can rewrite Eq (69) as follows, where s i is defined as in Eq (50), and ξ j,1 is defined as in Eq (52) 2(s i m j ) = ξ j,1 ω 1 (s t ) (70) σ 2 j Similarly, we can calculate the term ω 2(s t ) as follows, = [ n i=1 µ F 2 i (si ) = [ µ F 2 1 (s1 ) µ F 2 2 (s2 ) µ F 2 n (sn ) (71) = [ ( exp ( s 1 m 1 ) ) ( 2 exp ( s 2 m h+1 ) ) ( 2 exp ( s n m (n 1)h+2 ) ) 2 σ 1 σ h+1 σ (n 1)h+2 Thus, the derivatives ω 2(s t ) m 1, ω 2(s t ) m 2,, and ω 2(s t ) m H are calculated as follows, (72)

A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games 15 = 2(s 1 m 1 ) m 1 σ1 2 ω 2 (s t ) m 2 = 2(s 2 m h+1 ) m h+1 σh+1 2 ω 2 (s t ) m h+2 m (n 1)h+1 = 2(s n m (n 1)h+2 ) m (n 1)h+2 σ(n 1)h+2 2 ω 2 (s t ) m (n 1)h+3 m H Thus, from Eq (73), the derivative ω 2(s t ), (j = 1,, H), can be rewritten as follows, = We can rewrite Eq (74) as follows, { 2(si m j ) σ 2 j ω 2 (s t ) if (σ j, m j ) Ω(ω 2 ) 0 if (σ j, m j ) / Ω(ω 2 ) (73) (74) where s i is defined as in Eq (50), and ξ j,2 is defined as in Eq (58) 2(s i m j ) = ξ j,2 ω 2 (s t ) (75) Similarly, we can calculate the terms ω 3(s t ), ω 4(s t ),, and ω L(s t ) Thus, Eq (65) can be rewritten as follows, ω l (s t ) [ = ξ j,1 2(s i m j ) σ 2 j where ξ j,l is defined as in Eq (60) ω 1 (s t ) ξ j,2 2(s i m j ) σ 2 j σ 2 j 2(s i m j ) T ω 2 (s t ) ξ j,l σj 2 ω L (s t ) (76) From Eq (44) and Eq (76), the derivative V t(s t ) in Eq (64) is calculated as follows, V t (s t ) = 2(s i m j ) σ 2 j Similarly, we can calculate the derivative V t(s t+1 ) V t (s t+1 ) = 2(s i m j ) σj 2 L ξ j,l k l V t (s t ) l ω l(s t ) ω l(s t ) (77) as follows, L ξ j,l k l V t (s t+1 ) l ω l(s t+1 ) ω l(s t+1 ) (78) Hence, From Eq (38), Eq (61), Eq (62), Eq (77) and Eq (78), the input parameters m j and σ j of the critic are updated at each time step as follows, σ j,t+1 = σ j,t α [ r t + γv t (s t+1 ) V t (s t ) [ γ V t(s t+1 ),t V t(s t ),t (79)

16 Mostafa D Awheda, Howard M Schwartz m j,t+1 = m j,t α [ r t + γv t (s t+1 ) V t (s t ) [ γ V t(s t+1 ),t V t(s t ),t Similarly, From Eq (38), Eq (39), Eq (40), the output parameters k l of the critic are updated at each time step as follows, (80) k l,t+1 = k l,t α [ r t + γv t (s t+1 ) V t (s t ) [ γ V t(s t+1 ) k l,t V t(s t ) k l,t (81) 52 Adaptation rules for the actor The input and output parameters of the actor, ψ A, are updated as follows, [10, ψ A t+1 = ψ A t + β t u t ψ A t [ uc u t σ n Where β is a learning rate for the actor parameters, u c is the output of the actor with a random Gaussian noise The derivatives of the output of the FLC (the actor), u t, with respect to the input and output parameters of the FLC can be calculated by replacing V t (s t ) with u t in Eq (39), Eq (61) and Eq (77) as follows, u t = 2(s i m j ) 2 σj 3 u t = 2(s i m j ) σ 2 j (82) u t k l = Φ l (s t ) (83) L L ξ j,l ξ j,l k l u t l ω l(s t ) ω l(s t ) (84) k l u t l ω l(s t ) ω l(s t ) (85) Hence, From Eq (82), Eq (84) and Eq (85), the input parameters σ j and m j of the actor (FLC) are updated at each time step as follows, u [ t uc u t σ j,t+1 = σ j,t + β t,t σ n u [ t uc u t m j,t+1 = m j,t + β t,t σ n Similarly, From Eq (82) and Eq (83), the output parameters k l of the actor (FLC) are updated at each time step as follows, u [ t uc u t k l,t+1 = k l,t + β t k l,t σ n The proposed RGFACL algorithm is given in Algorithm 1 (86) (87) (88) Example: This example illustrates how to use the equations associated with the proposed algorithm to tune the input and output parameters of the FISs (actor and critic) of a learning agent We assume that the actor of the learning agent has two inputs, s t = (s 1, s 2 ) That is, n = 2 We assume that the output of the actor is a crisp output The critic of the learning agent has the same inputs as the actor, s t = (s 1, s 2 ), and with a crisp output Thus, the fuzzy rules of the actor and the critic can be described as in Eq (11), as follows, R l (actor) : IF s 1 is A l 1 and s 2 is A l 2 THEN z l = a l (89) R l (critic) : IF s 1 is C l 1 and s 2 is C l 2 THEN z l = c l (90)

A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games 17 Fig 3 The proposed RGFACL algorithm Algorithm 1 The Proposed Residual Gradient Fuzzy Actor Critic Learning Algorithm: (1) Initialize: (a) the input and output parameters of the critic, ψ C (b) the input and output parameters of the actor, ψ A (2) For each EPISODE do: (3) Update the learning rates α and β of the critic and actor, respectively (4) Initialize the position of the pursuer at (x p, y p) and the position of the evader randomly at (x e, y e), and then calculate the initial state s t (5) For each ITERATION do: (6) Calculate the output of the actor, u t, at the state s t by using Eq (14) and then calculate the output u c = u t + n(0, σ n) (7) Calculate the output of the critic, V t(s t), at the state s t by using Eq (14) (8) Perform the action u c and observe the next state s t+1 and the reward r t (9) Calculate the output of the critic, V t(s t+1 ), at the next state s t+1 by using Eq (14) (10) Calculate the temporal difference error, t, by using Eq (34) (11) Update the input and output parameters of the critic, ψ C, by using Eq (79), Eq (80) and Eq (81) (12) Update the input and output parameters of the actor, ψ A, based on Eq (86), Eq (87) and Eq (88) (13) Set s t s t+1 (14) Check Termination Condition (15) end for loop (ITERATION) (16) end for loop (EPISODE) The linguistic values of the actor s inputs, A l 1 and A l 2, are functions of the means and the standard deviations of the MFs of the actor s inputs, and a l is a constant that represents the consequent part of the actor s fuzzy rule R l On the other hand, the linguistic values of the critic s inputs, C l 1 and C l 2, are functions of the means and the standard deviations of the MFs of the critic s inputs, and c l represents the consequent part of the critic s fuzzy rule R l We assume that each input of the two inputs to the FISs (actor and critic) has three Gaussian MFs, h = 3 That is, the input parameters of each FIS are σ j and m j, where j = 1,, H and H = n h = 6 In addition, each FIS has nine rules, L = h n = 9 That is, the output parameters of each FIS are nine parameters (a l for the actor and c l for the critic), where l = 1,, 9 The parameters of the MFs of each input Ω(s i ), (i = 1, 2), defined by Eq (13) can be given as follows, Ω(s 1 ) = {(σ 1, m 1 ), (σ 2, m 2 ), (σ 3, m 3 )} Ω(s 2 ) = {(σ 4, m 4 ), (σ 5, m 5 ), (σ 6, m 6 )} (91) On the other hand, the set of the parameters of each firing strength of each rule in each FIS, Ω(ω l ), defined by Eq (17) is given as follows,

18 Mostafa D Awheda, Howard M Schwartz Ω(ω 1 ) = {(σ 1, m 1 ), (σ 4, m 4 )} Ω(ω 2 ) = {(σ 1, m 1 ), (σ 5, m 5 )} Ω(ω 3 ) = {(σ 1, m 1 ), (σ 6, m 6 )} Ω(ω 4 ) = {(σ 2, m 2 ), (σ 4, m 4 )} Ω(ω 5 ) = {(σ 2, m 2 ), (σ 5, m 5 )} Ω(ω 6 ) = {(σ 2, m 2 ), (σ 6, m 6 )} Ω(ω 7 ) = {(σ 3, m 3 ), (σ 4, m 4 )} Ω(ω 8 ) = {(σ 3, m 3 ), (σ 5, m 5 )} Ω(ω 9 ) = {(σ 3, m 3 ), (σ 6, m 6 )} (92) The term ξ j,l defined by Eq (60) can be calculated based on the following matrix, 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 ξ = 0 0 0 0 0 0 1 1 1 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 To tune the input and output parameters of the actor and critic, we follow the procedure described in Algorithm (1) After initializing the values of the input and output parameters of the actor and critic, learning rates, and the inputs, the output u t of the actor at the current state s t is calculated by using Eq (14) as follows, u t = 9 9 6 9 [( 2 i=1 µf l i (si ))a l (93) ( 2 i=1 µf l i (s i )) (94) To solve the exploration/exploitation dilemma, a random noise n(0, σ n ) with a zero mean and a standard deviation σ n should be added to the actor s output Thus, the new output (action) u c will be defined as u c = u t + n(0, σ n ) The output of the critic at the current state s t is calculated by using Eq (14) as follows, V t (s t ) = 9 9 [( 2 i=1 µf l i (si ))c l ( 2 i=1 µf l i (s i )) (95) The learning agent performs the action u c and observes the next state s t+1 and the immediate reward r t The output of the critic at the next state s t+1 is then calculated by using Eq (14), which is in turn used to calculate the temporal error t by using Eq (34) Then, the input and output parameters of the actor can be updated by using Eq (86), Eq (87) and Eq (88) On the other hand, the input and output parameters of the critic can be updated by using Eq (79), Eq (80) and Eq (81) 6 Simulation and Results We evaluate the proposed RGFACL algorithm, the FACL algorithm and the QLFIS algorithm on three different pursuit-evasion games In the first game, the evader is following a simple control strategy, whereas the pursuer is learning its control strategy to capture the evader in minimum time In the second game, it is also only the pursuer that is learning However, the evader in this game is following an intelligent control strategy that exploits the advantage of the maneuverability of the evader In the third game, we make both the pursuer and the evader learn their control strategies In multi-robot learning systems, each robot will try to learn its control strategy by interacting with the other robot which is also learning at the same time Therefore, the complexity of the system will increase as the learning in a multi-robot system is considered as a problem of a moving target [26 In the problem of a moving target, the best-response policy of each learning robot may keep changing during learning until each learning robot adopts an equilibrium policy It is important to mention here that the pursuer, in all games, is assumed to not know the dynamics of the evader nor its control strategy

A Residual Gradient Fuzzy Reinforcement Learning Algorithm for Differential Games 19 Table 2 The time that the pursuer trained by each algorithm takes to capture an evader that follows a simple control strategy The number of episodes here is 200 Evader Algorithm (-5,9) (-10,-6) (7,4) (5,-10) Classical strategy 1070 1240 805 1120 The proposed RGFACL 1080 1245 805 1125 QLFIS 1095 1250 805 1135 FACL 1150 1350 865 1225 We use the same learning and exploration rates for all algorithms when they are applied to the same game Those rates are chosen to be similar to those used in [10 We define the angle difference between the direction of the pursuer and the line-of-sight (LoS) vector of the pursuer to the evader by δ p In all games, we define the state s t for the pursuer by the two input variables which are the pursuer angle difference δ p and its derivative δ p In the third game, we define the state s t for the evader by the two input variables which are the evader angle difference δ e and its derivative δ e Three Gaussian membership functions (MFs) are used to define the fuzzy sets of each input In all games, we assume that the pursuer is faster than the evader, and the evader is more maneuverable than the pursuer In addition, the pursuer is assumed to not know the dynamics of the evader nor its control strategy The only information the pursuer knows about the evader is the position (location) of the evader The parameters of the pursuer are set as follows, V p = 20m/s, L p 3m and u p [ 05, 05 The pursuer starts its motion from the position (x p, y p ) = (0, 0) with an initial orientation θ p On the other hand, the parameters of the evader are set up as follows, V e = 1m/s, L e 3m and u e [ 10, 10 The evader starts its motion from a random position at each episode with an initial orientation θ e The sampling time is defined as T 05s, whereas the capture radius is defined as d c 1m 61 Pursuit-Evasion Game 1 In this game, the evader is following a simple control strategy defined by Eq (30) On the other hand, the pursuer is learning its control strategy with the proposed RGFACL algorithm We compare our results with the results obtained when the pursuer is following the classical control strategy defined by Eq (28) and Eq (29) We also compare our results with the results obtained when the pursuer is learning its control strategy by the FACL and the QLFIS algorithms We define the number of episodes in this game as 200 and the number of steps (in each episode) as 600 For each algorithm (the FACL, the QLFIS and the proposed RGFACL algorithms), we ran this game 20 times and we averaged the capture time of the evader over this number of trials Table 2 shows the time that the pursuer takes to capture the evader when the evader is following a simple control strategy and starts its motion from different initial positions The table shows the capture time of the evader when the pursuer is following the classical control strategy and when the pursuer is learning its control strategy by the FACL algorithm, the QLFIS algorithm and the proposed RGFACL algorithm From Table 2, we can see that the capture time of the evader when the pursuer learns its control strategy by the proposed RGFACL algorithm is very close to the capture time of the evader when the pursuer follows the classical control strategy This shows that the proposed RGFACL algorithm achieves the performance of the classical control 62 Pursuit-Evasion Game 2 In this game, the evader is following the control strategy defined by Eq (30) and Eq (31) with the advantage of using its higher maneuverability On the other hand, the pursuer in this game is learning its control strategy with the proposed RGFACL algorithm Similar to game 1, we compare our results obtained when the pursuer is learning by the proposed RGFACL algorithm with the results obtained when the pursuer is following the classical control strategy defined by Eq (28) and Eq (29) We also compare our results with the results obtained when the pursuer is learning its control strategy by the