scieee AI-readable full text Open interactive document viewer

Numerical resolution of dynamic games

Gómez Martín, Beatriz (Facultad de Ciencias)

Abstract

Departamento de Matemática Aplicada

Full text

Facultad de Ciencias Trabajo Fin de Máster Máster en Matemáticas Numerical resolution of Dynamic Games. Autor: Beatriz Gómez Martín. Tutor: Víctor Gatón Bustillo. 2 Contents 1 Introduction 5 2 From Optimal Control to Game Theory 9 2.1 Optimal Control Theory . . . . . . . . . . . . . . . . . . . . . 9 2.1.1 Pontryagin maximum principle . . . . . . . . . . . . . 12 2.1.2 Hamilton-Jacobi-Bellman . . . . . . . . . . . . . . . . 15 2.1.3 Infinite-Horizon problems . . . . . . . . . . . . . . . . 18 2.2 GameTheory ........................... 20 2.2.1 Game classification . . . . . . . . . . . . . . . . . . . . 20 2.2.2 Ingredients of a game . . . . . . . . . . . . . . . . . . . 21 2.2.3 Differential games . . . . . . . . . . . . . . . . . . . . . 22 2.2.4 Equilibrium points . . . . . . . . . . . . . . . . . . . . 23 3 Spectral methods 27 3.1 Chebyshev polynomials . . . . . . . . . . . . . . . . . . . . . . 30 3.2 Chebyshev collocation approach . . . . . . . . . . . . . . . . . 32 3.3 Chebyshev multidimensional interpolation . . . . . . . . . . . 35 3.4 Chebyshev tensorial evaluation . . . . . . . . . . . . . . . . . 37 3.5 Differentiation........................... 40 4 Numerical methods in Game Theory 41 4.1 Valueiteration .......................... 45 4.2 Policyiteration .......................... 50 5 A numerical example 55 5.1 Two regions scenario . . . . . . . . . . . . . . . . . . . . . . . 58 5.1.1 Analytical solution . . . . . . . . . . . . . . . . . . . . 58 5.2 Three regions scenario . . . . . . . . . . . . . . . . . . . . . . 67 3 5.3 Erroranalysis........................... 70 5.3.1 Temporal error in [0,0.5] ×[0,0.5]............ 71 5.3.2 Spatial error in [0,0.5] ×[0,0.5] ............. 72 5.3.3 Spatial error in [0,2] ×[0,2] ............... 73 5.4 Performance analysis . . . . . . . . . . . . . . . . . . . . . . . 75 6 Conclusions 77 4 Chapter 1 Introduction Nowadays, the necessity of understanding the world around us leads to the study of complex mathematical models. Modelling physical, social or biological phenomena helps researchers to understand system evolution and to study the effects of the different factors influencing the behaviour of a system. Furthermore, models can be employed to make predictions on the performance of an event. The focus of the present work is on dynamical systems. Dynamical systems are defined as systems that evolve over time. These systems can be studied through differential equation models. In some cases, there exist one or more variables which can be controlled by an agent, and that determine the dynamic evolution of the system. The objective is then to study the strategy that an agent has to follow in order to achieve a certain objective. This is called an Optimal Control problem. Another aspect to take into account is that a model does not always present only a single agent. Then, it is essential to study the relations among several agents. The branch of mathematics that investigates this relations is called Game Theory. Applying the results in this area, the aim is to achieve an equilibrium point where all agents maximize their benefits. In order to obtain the previous equilibrium point, it would be necessary to solve the dynamics of the problem. However, analytical solution of differential models is hardly ever conceivable. This is the reason why the design of numerical methods to approximate system solutions has taken great impor- 5 tance. Additionally, in the recent years this field of study has been boosted by the computational improvements. However, even though the computational capacity has improved, the cost required for solving most practical problems becomes too large. It is important to note that most numerical methods require a discretization of the problem dynamics. Let us illustrate the size of a regular problem with an example. Suppose a system evolving over a d-dimensional spatial region within a given period of time. When the space is discretized, the solution must be computed separately for each node. Taking Nnodes in each dimension, Ndnodes must be computed. If a refined result is required, for example doubling each dimension nodes, the magnitude is multiplied by 2d. Furthermore, a time discretization is also required, so that the numerical method must be computed for each node at each time step. Finally, the same problem has to be solved for each of the agents in the system. All these conditions result in a computationally expensive numerical methods. For this reason, it is crucial to develop efficient algorithms for computing numerical approximations to the solutions. The idea is to search the optimal strategy for each agent iteratively until an equilibrium point is achieved. There exist two popular algorithms from Control Theory that can be employed to find an equilibrium point in a multi-agent dynamical system: Value iteration and Policy iteration. Both algorithms require the interpolation of certain value functions that represent the agents objective function. In this work, a Chebyshev interpolation scheme is proposed. The Chebyshev interpolation is a very useful technique that can be applied to obtain numerical approximations in different problems such as global optimization, ODE solving or integration. Chebyshev polynomials are especially helpful because they provide very precise and numerically efficient approximations. In essence, the objective of the work is to study methods for finding a numerical approximation to the solution for multi-agent dynamical systems. Two different numerical methods are employed to compute the Markovian Nash equilibrium for a multi-player differential game: Value iteration and 6 Policy iteration. The present document is organized as follows. In Section 2.1, the most important results in Optimal Control Theory are detailed. Pontryagin Maximum Principle (2.3) and the Hamilton-Jacobi-Bellman theorem (2.7) are the key results in this section. In Section 2.2 Game Theory is presented and different equilibrium concepts are explained in this section. Theoretical aspects and numerical methods to compute the Chebyshev polynomial interpolation are explained in Chapter 3. Afterwards, two numerical methods to solve multi-agent games are detailed in Chapter 4. These methods are Value iteration, in Section 4.1, and Policy iteration, in Section 4.2. The previous algorithms are implemented with a Chebyshev interpolation approach. Finally, a numerical example is detailed in Chapter 5. A transboundary pollution model developed in [9], which was numerically solved with a splinebased numerical method, is presented. The model proposes a N-players game and, for particular cases, analytical solutions are quite straightforward to obtain. Therefore, it is a very useful model to make an error analysis of the numerical methods. Moreover, the performance of the numerical methods can be compared with the spline-based solution. The results of the numerical solution of more than two player situations are also shown. Finally, the conclusions of the work are presented, together with future work possibilities. 7 8 Chapter 2 From Optimal Control to Game Theory 2.1 Optimal Control Theory The Optimal Control Theory is a branch of mathematics that studies the way to determinate the behaviour of a system in order to maximize a certain benefit. The systems to control are dynamical systems, that is, systems that evolve over time. For a given dynamical system, a control is a variable which can be adjusted by an agent and that determines the evolution of the system. Then, the objective in an Optimal Control problem is to determine a control such that the benefits are maximized (or in some problems, such that a cost is minimized). Formally, the Optimal Control Theory is a branch of mathematics that deals with finding a control for a given dynamical system over a period of time, such that an optimality criterion is achieved. Let us illustrate the previous Optimal Control problem definition with a simple example, similar to the presented in [19, Ch 1]. Example 2.1. Consider a promoter who owns an initial capital K0. This capital at time t, denoted K=K(t), can be inverted or consumed. I=I(t) denotes the capital inverted, and C=C(t)denotes the consumption. It is 9 Set also xv(s) = (x∗(s) if s∈[t, t + ∆t], ˆx(s) if s∈[t+ ∆t, T], . xv(s) = g(s, x(s), v(s)), xv(t) = x0. Therefore, J(t, x0, v) = ZT t f(s, xv, v)ds + Ψ(xv(T)) =Zt+∆t t f(s, xv, v)ds +ZT t+∆t f(s, xv, v)ds + Ψ(xv(T)) >Zt+∆t t f(s, x, u∗)ds +ZT t+∆t f(s, x, u∗)ds + Ψ(x∗(T)) =J(t, x0, u∗). This leads to a contradiction since J(t, x0, u∗) was the optimal solution with initial conditions (t, x0). Consequently ˆu=u∗in an optimality sense ∀s∈[t, T]. Lemma 2.6 (Bellman’s principle of optimality). An optimal policy has the property that, whatever the initial state and initial decision are, the remaining decisions must constitute an optimal policy. Following this principle, the problem (2.2) can be rewritten as V(t, x0) = max u(s)Zt+∆t t f(s, x(s), u(s))ds +V(t+ ∆t, x(t+ ∆t)), s.t. . x(s) = g(s, x(s), u(s)), x(t) = x0. (2.7) On the basis of the previous result, the next theorem provides some sufficient conditions for optimality. Theorem 2.7 (Hamilton-Jacobi-Bellman). If the value function Vis continuously differentiable, then it satisfies −Vt(t, x) = max u{f(t, x, u) + Vx(t, x)g(t, x, u)}, 16 and the condition V(T, x(T)) = Ψ(x(T)). Proof. Let us consider the problem V(t, x) = max u(s)Zt+η t f(s, x(s), u(s))ds +V(t+η, x(t+η)) . By the Bellman’s principle of optimality 2.6, any subtrajectory of the optimal control must be optimal. This means that the previous value function does not depend on the value of η, ∂V (t, x) ∂η = 0. Therefore, for all ηwe have ∂V (t, x) ∂η = max u(t)f(t+η, x(t+η), u(t+η)) + ∂V ∂t (t+η, x(t+η)) +∂V ∂x (t+η, x(t+η))dx dt (t+η)= 0. Note that dx dt (t+η) = g(t+η, x(t+η), u(t+η)). Taking the limit when η→0,the following equation is obtained 0 = max u{f(t, x, u) + Vx(t, x)g(t, x, u) + Vt(t, x)}. As the value function does not depend on u, it is concluded that −Vt(t, x) = max u{f(t, x, u) + Vx(t, x)g(t, x, u)}. The control U∗that maximizes the Hamiltonian U∗(s, x(s), Vx) = arg max u H(t, x, u, Vx(t, x)) = arg max u{f(t, x, u) + Vx(t, x)g(t, x, u)}. 17 is called the feedback solution. With the obtained feedback control, the optimal trajectory can be derived by solving (. x∗(s) = g(s, x∗(s),U∗(s, x∗(s)), x∗(t) = x. Finally, we get that the optimal control u∗(s) satisfies u∗(s) = u∗(s, x∗(s)) = U∗(s, x∗(s), Vx). 2.1.3 Infinite-Horizon problems In the previous sections finite-time horizon problems were considered. A residual value Ψ(T) was included to represent the reward at the end of the time interval. In some applications, such as economic ones, problems with an infinitehorizon time arise. In infinite-horizon problems, the payoff does not include a terminal reward. Instead, a running cost is included in the optimization problem. The payoff to maximize is then J(u, x0) = Z∞ 0 f(s, x(s), u(s))e−ρt dt, where ρ≥0 is a discount rate. The term e−ρt is called the discount factor, and it depends on the running time t. It should be remarked that in infinite-horizon problems, specifications where function fdoes not depend explicitly on time t, i.e. autonomous problems, are very much employed, since they have a very natural interpretation, specially in the field of Economy. Theorems 2.3 and 2.7 where stated under a finite time assumption. For an infinite time horizon, some changes have to be made. For the Pontryagin maximum principle, the transversality condition λ(T) = Ψ′(x∗(T)) turns to the following condition lim t→+∞e−ρtλ(t)=0. 18 For the Hamilton-Jacobi-Bellman, the transversality condition lim t→∞ e−ρtV(x∗(t)) = 0, is added to ensure convergence. The problems considered in this work will be infinite time horizon problems. 19 2.2 Game Theory In Optimal Control Theory, there is only one agent determining the control or controls with the objective of maximizing a payoff. However, if the aim to study is the relations among several agents, the Optimal Control Theory must be extended to the field referred as Game Theory. Game theory can be seen as a generalization of an optimal control problem involving multiple players and multiple payoffs. There are other extension possibilities, such as Multi-Objective optimization problems (1 player, multiple payoffs) and Team Theory (multiple players, 1 payoff). Formally, Game Theory is the study of strategic interactions, which might evolve over time, among rational agents. In this section, basic concepts in Game Theory are presented. 2.2.1 Game classification Games can be classified following several criteria, such as players interaction, available information, evolution over time... The most important features employed to classify games are:  Discrete / Continuous games: In continuous games, each player has an infinite number of available actions, whereas the set of possible actions in a discrete game is finite.  Cooperative / Non cooperative: In a non cooperative game, every player chooses an action without any previous agreement with the other players. In a cooperative game, players are able to form alliances to improve their benefits.  Zero-sum / Non-zero-sum: In zero sum games, the total benefit remains constant. This means that one player’s gain implies another player’s loss. In non-zero sum games, the previous condition is not forced, so all players can have benefits or losses at the same time.  Simultaneous / Sequential (or dynamic): In simultaneous or static games, all players act at the same time. The game is played 20 in one step and there is no need of a state variable. Simultaneous games are usually represented in normal form, that is, by a matrix containing the players, strategies, and payoffs. Sequential or dynamic games are played in multiple steps, and there is an established order of action. Later players have information (perfect or imperfect, see below) about the actions of previous players. A state variable summarizes the information in each step. The sequential character of these games allows a representation in extensive or tree form.  Perfect, imperfect and complete information: In a game of perfect information, all players know the previous movements of the other players. A game that is not perfect is called imperfect. On the other side, complete information requires that every player knows the strategies and the payoffs available to other players, but not necessarily the actions taken. A game that is not complete is called incomplete. 2.2.2 Ingredients of a game A game in normal form can be represented as a tuple {J;U1,U2, ..., Un;V} where  The set J={1,2, ..., n}is the set of players.  The set Uiis the set of actions or strategies of the player i,i∈J.  A n-uple u= (u1, u2, ..., un) where each ui∈Uiis an action profile. The expression u−i= (uj)j∈J,j=idenotes the action profile of all players except i, and (u1, ..., un) = (ui, u−i).  The function V:U1×U2×... ×Un7−→ V⊆Rnis the payoff function. We can write V= (V1, V2, ..., Vn), Vibeing the payoff of player i. The payoff is assumed to be a profit. Therefore, players aim to maximize its value. A game in extensive form includes the previous elements, plus a state variable Xand a family of information sets H(see [17, Ch 1]). A collection of information sets Hiis available for each player. The game can be represented as a tuple {J;U1,U2, ..., Un;V,X,H}where 21  Xis the set of game nodes. Each node represents a possible situation of the game. For discrete space games, a sequential game begins at a starting node O(origin) and finishes at the terminal nodes. A node is called terminal if it does not have any subsequent nodes.  Xi⊆Xis the set of nodes where player imakes a decision, and Ui(x) the set of possible actions at node x∈Xi. The function ui(x)∈Ui(x) ui(x) : Xi−→ X x7−→ ui(x) = x′, denotes the action for player ithat takes the game from node xto a following node x′. Actions that start in the same node and lead to different nodes must be different.  The function V(x) is the payoff function at node x.  His the family of information sets. U(Hx) is the set of actions available at node x for an information set H∈H. 2.2.3 Differential games Differential games (see [2, Ch 9]) are characterized by a state variable (of one or more dimensions) whose evolution is determined by a differential equation . x=g(x, u1, ..., uN), x(t0) = x0, where x0is the initial state value. Differential games can also be seen as a generalization of Optimal Control problems. In an optimal control problem there is a single control u(t) and a single criterion to be optimized, while differential game theory generalizes this to multiple players, their controls u1, u2, ..., un, and multiple optimization problems. Consequently, each player aims to control the state of the system in order to maximize his payoff. 22 2.2.4 Equilibrium points When considering a game, the aim is to find an equilibrium solution where all players maximize their payoffs. The common way to define the solution for non-cooperative games is the Nash equilibrium. Definition 2.1. An action profile (u∗ 1, u∗ 2, ..., u∗ n)is a Nash equilibrium if Vi(u∗ i, u∗ −i)≥Vi(ui, u∗ −i)∀ui∈Ui,∀i∈J. where recall that u−idenotes the strategies of all players but player i. In other words, a Nash equilibrium is an action profile such that no player can get a better payoff by deviating from it, assuming that the other players do not change their actions. Definition 2.2. The best-response set for player iis the set Bi(u−i) = {u∗ i∈Ui|Vi(u∗ i, u−i) = max ui∈Ui Vi(ui, u−i)}. In a Nash equilibrium, all players actions are the best responses to the other players actions, that is u∗ i∈Bi(u−i) for all i∈J. Existence of a Nash equilibrium Using the Kakutani’s (fixed point) theorem, Nash proved the existence of a Nash equilibrium for non-zero sum games with a finite number of players. The existence is proved under the following conditions:  Each player set of actions is a compact and convex subset of Rn.  The payoff functions are continuous and concave. The ε−Nash equilibrium is another commonly used solution for noncooperative games, weaker than the Nash equilibrium. Definition 2.3. An action profile (u∗ 1, u∗ 2, ..., u∗ n)is an ε- Nash equilibrium if, for a given ε > 0, Vi(u∗ i, u∗ −i)≥Vi(ui, u∗ −i)−ε∀ui∈Ui,∀i∈J. 23 The ε-Nash equilibrium equals the Nash equilibrium for ε= 0. In Chapter 4, a time discretization of a non-cooperative infinite time horizon differential game is proposed. In [7], it is proved that, under certain regularity hypothesis, the discrete-time Nash game equilibrium is an ϵ−Nash equilibrium of the continuous game. This result is crucial to ensure that a time-discretization can be applied to find an approximation to the continuous time solution, with an error which depends on the magnitude of the time discretization step (see [7]). When considering sequential games, in which there is an explicit order of events, subgame perfect Nash equilibrium solutions arise. A subgame is defined as a subset of game nodes that still forms a game. Definition 2.4. Let u∗= (u∗ 1, u∗ 2, ..., u∗ n)a Nash equilibrium action profile. We say that u∗is a subgame perfect Nash equilibrium of a game if the restriction of u∗to any subgame constitutes a Nash equilibrium of the subgame. Subgame perfectness is a property of prime importance in applications. This is due to the fact that, in dynamic games with perfect and complete information, backward induction can be employed to compute subgame perfect Nash equilibrium solutions. Backward induction, also called dynamic programming, is an algorithm that consists in studying subgames from the terminal state to the initial state of the game. In the process of backward induction, an optimal strategy is identified for each decision node. Consequently, the obtained action profile is a subgame perfect Nash equilibrium. Strategies in game theory can be classified in open-loop and closed-loop strategies (see [1]). Definition 2.5. Assuming that the admissible control sets Ujare not state dependent, an open-loop strategy selects a control action depending only on time sfor a fixed initial state x0, u∗ j=γj(s, x0),where γj:R×Rn→Uj. 24 Definition 2.6. A closed-loop strategy or state-feedback strategy selects a control depending on time sand on the state at time s u∗ j=U∗ j(s, x∗(s)),where U∗ j:R×Rn→Uj(x, t). The function U∗ j(s, x∗(s)) is called the feedback function. A state-feedback strategy is also called Markovian, in contrast to openloop. One can look for an equilibrium point in open-loop strategies, or in closed-loop strategies. The main drawback of an open-loop Nash equilibria is that it is not subgame perfect, in opposition to feedback strategies. In the present work, the aim is to obtain Markovian Nash equilibria through the dynamic programming approach. Nash equilibria are studied in non-cooperative scenarios. However, other equilibrium concepts for the cooperative case can also be analysed. Cooperation among players offers the possibility to improve the value of the non-cooperative payoff. We introduce the concept of Pareto optimality. Definition 2.7. An action profile uP= (uP 1, uP 2, ..., uP n)is said to be Pareto optimal if there exists no other profile u= (u1, u2, ..., un)such that for i= 1, ..., n Vi(u)> Vi(uP)and V−i(u)≥V−i(uP). In other words, given a Pareto optimal solution, it is not possible to strictly increase the payoff of one player without strictly decreasing the payoff of other player. Noncooperative strategies are not, in general, Pareto optimal. For this reason, players might get organized under a unique decision maker, whose objective is to maximize the weighted sum of players payoffs (see [20]). For the payoff weights vector α= (α1, ..., αn), Pn j=1 αj= 1 and αj>0, the value function of the cooperative game is Wα(t, x0) = max u1(s),u2(s)...un(s) n X j=1 αjZT t fj(s, x(s), uj(s), u−j(s))ds+Ψ(x(T)), 25 3.2 Chebyshev collocation approach To solve the dynamics of a differential game, a good choice might be a collocation scheme based in Chebyshev polynomials. This choice is due to the fact that Chebyshev polynomials are a versatile set of trial functions, that supply very precise and numerically cheap approximations. Let ˜ube a continuous function defined in [a, b], and {˜αj}N j=0, the corresponding N+ 1 Chebyshev nodes in [a, b]. Since it is easier to work in [−1,1], the corresponding function uin [−1,1] is defined as u(x) = ˜u(˜x),where ˜x=b−a 2x+b+a 2, x ∈[−1,1]. The interpolating polynomial, denoted by INu, is given by INu= N X n=0 ˆcnTn, where Tnis the Chebyshev polynomial of degree n. At the collocation points, the Chebyshev nodes αj, the polynomial satisfies u(αj) = INu(αj) = N X n=0 ˆcnTn(αj), j = 0, ..., N. The ˆcnterms are called the expansion coefficients and they are given by the inverse relationship ˆcn=1 γk N X j=0 u(xj)Tn(xj)wj, n = 0, ..., N, (3.8) where γn= N X j=0 T2 n(xj)wj.(3.9) The test or weight functions are obtained by the Gauss-Lobato integration formula in [−1,1]. 32 Gauss-Lobatto integration Consider the polynomial q(x) = pN+1(x) + apN(x) + bpN−1(x), where aand bare chosen so that q(−1) = q(1) = 0. Let −1 = x0< x1< ... < xN= 1 be the N+ 1 roots of the polynomial q(x), and let ω0, ..., ωNbe the solution of the linear system N X j=0 (xj)kωj=Z1 −1 xkω(x)dx, 0≤k≤N. Then the following equality holds N X j=0 p(xj)ωj=Z1 −1 p(x)ω(x)dx for all p∈P2N−1. With the Gauss-Lobato integration formula, the following collocation points and weights are obtained xj= cos πj N, wj=     π 2Nj= 0, N π Nj= 1, ..., N −1. Note that the defined Chebyshev quadrature points are ordered from right to left. This breaks the general convention in which collocation points are ordered from left to right. For the previous nodes xj, the following must be satisfied u(xj) = N X n=0 ˆcnTn(xj) = N X n=0 ˆcncos(n arcos(xj)) = N X n=0 ˆcncos nπj N. 33 Also, from (3.8) we get that ˆcn= N X j=0 2 Nωjωn cos πjn Nu(xj), n = 0, ..., N, where ωl=(2l= 0, N, 1l= 1, ..., N −1. We used the fact that combining (3.9) with the Chebyshev polynomials property (3.7) and the Gauss-Lobato integration formula, the normalization factors are given by γj=   π j = 0, N, π 2j= 1, ..., N −1. This particular choice for the collocation points enables to use the fast fourier transform (FFT) algorithm in the evaluation of the function u. The employed algorithm to determinate the expansion coefficients is the suggested in [3], as proposed in [5]. Algorithm 1: ' & $ % 1. Construct z= [u(α0), u(α1), ..., u(αN−1), u(αN), ..., u(α1)]T. 2. Compute y=real(FFT(z)) 2N. 3.          ˆc0=y(1) ˆcn=y(n+ 1) + y(2N−(n−1)) 0 < n < N ˆcN=y(N) 34 3.3 Chebyshev multidimensional interpolation Let {αj k}Nj k=0 the Nj+ 1 Chebyshev nodes for dimension j,j= 1, ..., d. The notation αn= (α1 n1, α2 n2, ..., αd nd), 0 ≤nj≤Nj, refers to the d-dimensional Chebyshev nodes in [−1,1]d. In the same way, ˜αn= (˜α1 n1,˜α2 n2, ..., ˜αd nd) are the Chebyshev nodes in an interval Π = [a1, b1]×[a2, b2]×... ×[ad, bd]. Let ˜x = (˜x1, ..., ˜xd), and ˜ u(˜x) be a continuous function defined in Π. The corresponding function u(x), x= (x1, ..., xd) in [−1,1]dis defined as u(x) = ˜ u(˜x),where ˜xj=bj−aj 2xj+bj+aj 2, j = 1, ..., d. (3.10) Let N= (N1, ..., Nd). The N-degree interpolation polynomial INuis a d-dimensional polynomial that satisfies, at the Chebyshev nodes, INu(αn) = u(αn) = ˜ u(˜αn). INuis given by INu(x) = N1,N2,...,Nd X n1,n2,...,nd=0 ˆc(n1,n2,...,nd)T(n1,n2,...,nd)(x) = N1,N2,...,Nd X n1,n2,...,nd=0 ˆc(n1,n2,...,nd)Tn1(x1)Tn2(x2)...Tnd(xd), (3.11) where the term ˆc(n1,n2,...,nd)is an expansion coefficient in R, and xj∈[−1,1] for j= 1, ..., d. We use the following algorithm to determinate the coefficients ˆc(n1,n2,...,nd), proposed in [5]. First we define  An array Γof dimension (N1+1)×(N2+1)×...×(Nd+1), containing the evaluation of uat the Chebyshev nodes Γ(n1+ 1, n2+ 1, ..., nd+ 1) = u(α1 n1, α2 n2, ..., αd nd). 35  A dimension permutation operator P. Let Ban array of dimension b×a1×... ×am. The array Dsuch that D=P(B) has a size a1×... × am×band for any 0 ≤ji≤ai,i= 1, ..., m, D(j1, ..., jm,:) = B(:, j1, ..., jm).(3.12) where we denote the vector B(:, j1, ..., jm) = {B(j, j1, ..., jm)}b j=1, and similar D(j1, ..., jm,:) = {D(j1, ..., jm, j)}b j=1. The algorithm to obtain the coefficients ˆcnof the interpolant is: Algorithm 2: ' & $ % 1. B1=Γ. 2. For i= 1 : d  {m1, m2, ..., md}=dim(Bi).  For j2= 1 : m2, for j3= 1 : m3, ..., for jd= 1 : md Ci(:, j2, j3, ..., jd) = Algorithm1(Bi(:, j2, j3, ..., jd)).  Bi+1 =P(Ci). 3. ˆc(n1,n2,...,nd)=Bd+1(n1+ 1, n2+ 1, ..., nd+ 1). 36 3.4 Chebyshev tensorial evaluation In the previous section, an algorithm to obtain the coefficients of the interpolating polynomial was described. Suppose now that we need to evaluate this polynomial at certain values for each dimension. The number of query points in dimension jis denoted qj. Let Θ be the set containing this points Θ = {˜ x= (˜x1,˜x2, ..., ˜xd)/˜xj∈ {˜x1 j, ..., ˜xqj j},˜xk j∈[aj, bj],1≤k≤qj}, (3.13) where |Θ|=q1q2...qd. The approximation of the values at the previous set of points is carried out with the interpolant INu(x) in [−1,1], where the relation between xand ˜x is given in (3.10). The interpolation can be efficiently computed in a set of points like Θ by tensorial evaluation. First the tensorial array operation has to be defined, making use of the permutation operator defined in (3.12). Definition 3.1. Let Aand Bbe two arrays of dimensions (A)a×a1×a2×...×am and (B)a×b. We define the tensorial array operator C=A⊗Bas the array (C)a1×a2×...×ak×bgiven by C(j1, ..., jm,:) = P(BtA(:, j1, ..., jm)), where BtA(:, j1, ..., jm)is the usual product of matrix times a vector. To implement the tensorial evaluation in Matlab, it is useful to employ function multiprod, that makes the tensorial operation in all variables at the same time in a very efficient way. It was implemented by Paolo de Leva (see [11]). It should be mentioned that if multiprod is employed, it has to be imposed that qj>1, j = 1, ..., m. Multiprod does not recognise arrays of size q1×... ×qi−1×1×qi+1 ×... ×qm, and collapses to an array q1×... ×qi−1× qi+1 ×... ×qm, something which may cause technical difficulties in the implementation due to the permute operator. It should also be mentioned that the latest versions of Matlab have the pagemtimes function, which performs a similar operation as multiprod. 37 Let C=permute(multiprod(B′A),[2 : m1]), where permute is a command that rearranges array dimensions. Let us see the algorithm presented in [5] to evaluate Chebyshev interpolation in set Θ ((3.13)). The algorithm has two steps. Algorithm 3: Step 1: One dimensional Chebyshev evaluation First, evaluate the Chebyshev polynomials in each dimension nodes. For a fixed dimension j= 1, we need to evaluate the qjnodes {˜xk j}qj k=1. We denote by µj={xk j}qj k=1 the previous nodes after the change of variables (3.10). Making use of the recurrence relation (see (3.3)) T0(x) = 1, T1(x) = x, Tn(x) = 2xTn−1(x)−Tn−2, n = 2,3, ..., we compute T(µ1) = T(µ1)(N1+1)×q1=Tn(xk 1)0≤n≤N1,1≤k≤q1, T(µ2) = T(µ2)(N2+1)×q2=Tn(xk 2)0≤n≤N2,1≤k≤q2, . . . T(µd) = T(µd)(Nd+1)×qd=Tn(xk d)0≤n≤Nd,1≤k≤qd, where Nj+ 1 is the number of Chebyshev nodes in dimension j. Each evaluation is stored in a two dimensional array. Step 2: Multidimensional tensorial evaluation The second step is to compute the tensorial product of the evaluation arrays obtained in Step 1. This tensorial product provides the evaluation of INu(x) at the whole set of points Θ. 38 Suppose that (C)(N1+1)×(N2+1)×...×(Nd+1) is the array that contains the interpolation polynomial coefficients,i.e., C(n1+ 1, n2+ 1, ..., nd+ 1) = ˆc(n1,n2,...,nd). After the following tensorial evaluation INu(Θ) = (...[(A⊗T(µ1)) ⊗T(µ2)]...)⊗T(µd), we obtain an array of dimension q1×q2×... ×qdcontaining the evaluation at the entire set Θ. 39 3.5 Differentiation The derivative of a regular function ucan be approximated from the Chebyshev expansion. This derivative is given by (see [3]), u′= ∞ X n=0 ˆ dnTn, where ˆ dn=2 ωn +X p=n+1, p+kodd pˆcp, k ≥0, ωk=(2k= 0 1k≥1 The previous expression is a consequence of the relation 2Tn(x) = 1 n+ 1T′ n+1(x)−1 n−1T′ n−1(x). However, the previous relation provides a more efficient way of computing the derivative. Algorithm 4: We know that for n≥N, the coefficient ˆ dn= 0. The coefficients of the derivative can be computed in decreasing order by the recursion relation ωnˆ dn=ˆ dn+2 + 2(n+ 1)ˆcn+1,0≤n≤N−1. 40 Chapter 4 Numerical methods in Game Theory In this Section, the objective is to compute the Nash equilibrium of an infinite time horizon and non cooperative differential game with N players, where each of the players aims to maximize a benefit functional. There are two very well known techniques in the numerical solution of Optimal Control Theory problems, which are commonly referred as Value iteration and Policy iteration. These techniques, which are also employed in Game Theory problems, are described in sections 4.1 and 4.2. It is also described how a Chebyshev polynomial interpolation method can be combined with Value and Policy iteration techniques in order to obtain competitive algorithms which can provide numerical solutions of Game Theory problems. Let us suppose that there are Nplayers and that X⊂RNis the set of all possible states of the system. A particular state xis represented by a vector x= (x1, x2, ..., xN)∈X. Let Ui⊂R, i = 1, ...N be the set of admissible actions of player iand let U=U1×... ×UN. The control variables of the players are represented by a vector u= (u1, u2, ..., uN)∈U. The objective of player i= 1, ..., N is to maximize his payoff, that is, 41 To find the maximum, the Newton Raphson algorithm has been employed. If F(u) denotes the function that we want to maximize, given an initial iterant u0 i, the recursive iteration ul+1 i=ul i−F′(ul i) F′′(ul i), l = 0,1,2, ... is followed until a certain tolerance is achieved. To employ the Newton-Raphson method, we need to evaluate and compute the Chebyshev derivatives. Both the iteration of the Newton-Raphson method and the algorithms described in Chapter 3 can be adapted to compute the derivatives and maximums for all VNx,[r] h,i,ˆ xj(u), j = 1, ..., (Nx+ 1)Nat the same time. Step 5: For each player i= 1, ..., N, define VNx,[r+1] h,i (ˆ xj) = VNx,[r] h,i,ˆ xju[r+1] h,i (ˆ xj), j = 1, ..., (Nx+ 1)N. If we are not below the prescribed tolerance VNx,[r+1] h,i (ˆ xj)−VNx,[r] h,i (ˆ xj)< TOL, j = 1, ..., (Nx+ 1)N, set r=r+ 1 and return to Step 1. Otherwise stop. The last iterate u[r] h,i (ˆ xj), j = 1, ..., (Nx+ 1)Nis taken as the numerical solution of the game. It should be mentioned that function gand functions fi, i = 1, ..., N could be interpolated in X×Ujust once in Step 0 and evaluated when necessary. This could probably improve the efficiency of the algorithm. Parallelization of the Value Iteration Algorithm Value iteration algorithm requires a significant number of iterations to converge, and this quantity raises as the number of players is increased or 48 the spatial grid is refined. For this reason, a parallelization of the process might be considered. Steps 2-4 require the computation of polynomials for each state node ˆ xj, j = 1, ..., (Nx+ 1)N. As mentioned before, these computations can all be performed at the same time, but note that they are independent for each ˆ xj, j = 1, ..., (Nx+ 1)N. Therefore set ˆ X=(ˆx1 j1,ˆx2 j2, ..., ˆxN jN), ji= 0, ..., Nx, i = 1, ..., Ncan be divided in different subsets ˆ Xm, m = 1, ..., Nbof Nfelements each one, such that Nb·Nf= (Nx+ 1)N. The calculus involved in Steps 2-4 can be performed in several different processors simultaneously and the information can be reassembled before Step 5. For a large number of players or a large value of Nx, these technique is more computational efficient. 49 4.2 Policy iteration In the Policy iteration algorithm, the main idea is to employ, in each iteration and for each player, the previous controls to compute a polynomial such that it satisfies the time-discrete Bellman equation at all the collocation nodes of the state space. Afterwards, with that polynomial, a better control is obtained through the time-discrete Bellman equation. Again, let Ikdenote a k-degree multidimensional interpolation over domain Xand let xj=xj 1, ..., xj Nj=1,...,(k+1)N⊂Xbe the corresponding collocation nodes. Let h > 0 and βh= 1 −ρh be the discrete discount factor. Let u[0] i, i = 1, ..., N, be some initial candidate for the controls. At each iteration [r] and for each player i= 1, ..., N, it is computed a polynomial IkV[r] i(x) such that, for all j= 1, ..., (k+ 1)N, it holds IkV[r] i(xj) = hfi(xj, u[r] i, u[r] −i) + βhIkV[r] ixj+hg(xj, u[r] i, u[r] −i), It is important to remark that the previous condition defines a linear system, where the unknowns are the polynomial coefficients. The update policy is given for j= 1, ..., (k+ 1)Nby u[r+1] i(xj) = argmax ui∈Uinhfi(xj, ui, u[r] −i) + βhIkV[r] ixj+hg(xj, ui, u[r] −i)o. The iterations continue until V[r+1] −V[r]<TOL, where TOL is a prescribed tolerance. The main drawbacks of this method is that a good initial guess for u[0] i might be necessary and that the computational cost of solving the linear system grows with a large amount of players or collocation nodes. The main benefits are that it is well known that this algorithm has a quadratic rate of convergence towards the solution for N= 1 (control problems). This behaviour seems to remain in Game Theory problems (N > 1). 50 The numerical experiments show that a much smaller number of iterations is needed to reach the prescribed tolerance with Policy iteration than with Value iteration. The algorithm presented below corresponds to the adaptation of the Policy iteration with a multidimensional Chebyshev interpolation. Policy iteration algorithm: Step 0: Let Nbe the number of players. Define an appropriate domain for the state and control spaces, where the problem will be numerically solved [a1, b1]×... ×[aN, bN]⊂X, [c1, d1]×... ×[cN, dN]⊂U. Fix Nx, Nu∈N, a tolerance TOL >0 and a small time step h > 0. For each player i= 1, ..., N, compute ˆxi jNx j=0 ,ˆui jNu j=0, the Chebyshev nodes in each interval ˆxi j=1 2cos πj Nx(bi−ai)+(bi−ai), j = 0, ..., Nx, ˆui j=1 2cos πj Nu(di−ci)+(di−ci), j = 0, ..., Nu. Define the sets of collocation points ˆ X=(ˆx1 j1,ˆx2 j2, ..., ˆxN jN), ji= 0, ..., Nx, i = 1, ..., N, ˆ U=(ˆu1 j1,ˆu2 j2, ..., ˆuN jN), ji= 0, ..., Nu, i = 1, ..., N, For simplicity in the notation, we employ ˆ X=ˆ xj, j = 1, ..., (Nx+ 1)N. For each player i= 1, ..., N, initialize the iteration with some given u[0] h,i (ˆ xj), j = 1, ..., (Nx+ 1)N. For each player i= 1, ..., N, compute the Chebyshev polinomials Gi ˆ xj(u) = gi(ˆ xj, u, u[0] h,−i), j = 1, ..., (Nx+ 1)N, 51 employing the algorithms described in Chapter 3. As in the Value iteration algorithm, they can all be stored in a 2 dimensional array G. Compute the Chebyshev multidimensional polynomial INxV[0] h,i (x) such that, ∀j= 1, ..., (Nx+ 1)N, it holds INxV[0] h,i (ˆ xj) = hfi(ˆ xj, u[0] h,i, u[0] h,−i) + βhINxV[0] h,i ˆ xj+hGi ˆ xj(u[0] h,i). If set {pi1,...,iN, ij= 0, ..., Nx, j = 1, ..., N}corresponds to the coefficients of polynomial INxV[0] h,i (x), the previous condition defines a linear system where:  The pi1,...,iNare the unknowns.  The elements of the matrix of the system can be computed in terms of products and sums of Chebyshev polynomials  The independent term is given by hfi(ˆ xj, u[0] h,i, u[0] h,−i), j = 1, ..., (k+1)N. Set r= 0. Step 1: For each player i= 1, ..., N compute the Chebyshev polynomials VNx,[r] h,i,ˆ xj(u) = hfi(ˆ xj, u, u[r] h,−i) + βhINxV[r] h,i ˆ xj+hGi ˆ xj(u), j = 1, ..., (Nx+ 1)N. As in the Value iteration, all this polynomials can be computed at the same time. Step 2: For each player i= 1, ..., N find the strategy which maximizes u[r+1] h,i (ˆ xj) = argmax u∈[ci,di]nVNx,[r] h,i,ˆ xj(u)o, j = 1, ..., (Nx+ 1)N. Again, the Newton Raphson algorithm has been employed. 52 Step 3: For each player i= 1, ..., N, compute the Chebyshev polinomials Gi ˆ xj(u) = gi(ˆ xj, u, u[r+1] h,−i), j = 1, ..., (Nx+ 1)N, employing the algorithms described in Chapter 3. Compute the Chebyshev multidimensional polynomial INxV[r+1] h,i (x) such that, ∀j= 1, ..., (Nx+ 1)N, it holds INxV[r+1] h,i (ˆ xj) = hfi(ˆ xj, u[r+1] h,i , u[r+1] h,−i) + βhINxV[r+1] h,i ˆ xj+hGi ˆ xj(u[r+1] h,i ). If we are not below the prescribed tolerance INxV[r+1] h,i (ˆ xj)−INxV[r] h,i (ˆ xj)< TOL, j = 1, ..., (Nx+ 1)N, set r=r+ 1 and return to Step 1. Otherwise stop. The last iterate u[r] h,i (ˆ xj), j = 1, ..., (Nx+ 1)Nis taken as the numerical solution of the game. 53 54 Chapter 5 A numerical example In this chapter, the proposed numerical methods are applied to the multiregional transboundary pollution game presented in [9]. Consider a planar region which is divided in several subregions. Different regions may share or not a common boundary. Each subregion determines the value of a control variable, emissions, and a state variable, which is the average of the pollution in the corresponding subregion. The model studies the pollution flows through the different subregions. As some subregions present common boundaries, the pollution does not remain only in the emitting region. Instead, pollution of one region may flow to adjacent regions, raising their pollution levels. Some physical conditions are included in the model. For example, when a region is placed next to the coast, a part of the pollution diffuses through the coast boundary. Each subregion increases its income increasing the emission rate. However, the environmental damage has also a cost for each subregion. Therefore, the objective function for each subregion is to maximize a benefit which depends both on the emissions and the environmental damage measured through the pollution level. Each subregion aims to maximize his own objective function. Hence the model is a N-player non-cooperative differential game. The objective is to find an stationary Markov-perfect Nash equilibria. 55 The model formulation is as follows. Let Ω be a planar region, divided in Nsubregions Ωi,i= 1, ..., N, satisfying ¯ Ω = [ i ¯ Ωi,Ωi∩Ωj=∅, i =j. Let us denote by uithe control variable of player i, which represents the emission rate. Let also p= (p1, p2, ..., pN) be the state variable, representing the pollution stock in each region. The control will depend on the pollution stock, i.e., ui=ui(p). A linear quadratic model is proposed. The state dynamics are linear, whether the payoff functions are quadratic in the state and the controls. For each player, i= 1, ..., N the benefit and damage functions are given by Bi(ui) = uiAi−ui 2, Di(pi) = φi 2p2 i, where Ai, φi, i = 1, ..., N are positive constants. The problem for each player is to maximize, for an infinite time horizon, the following functional Ji(ui, u−i,p0) = Z∞ 0 e−ρt (Bi(ui)−Di(pi)) dt =Z∞ 0 e−ρt ui(Ai−ui 2)−φi 2p2 idt. (5.1) The dynamics of the stock of pollution are given by a parabolic partial differential equation depending on the spatial continuous variables. After some simplifying assumptions (see [9] for the details), the dynamics of the state variables is given by dpi dt = N X j=1 kijpj−cipi+βiui, i = 1, ..., N, with an initial condition pi(0) = p0 i, i = 1, ..., N. The coefficients of the previous dynamics have the following physical interpretation: 56  cipimeasures the natural decay of pollutant, where ci≥0.  βiuiis the source term, where βi>0.  kij is a diffusion term. It represents how the pollution flows between regions. Coefficients kij can be stored as a matrix K= (kij) where kij = 0 if there is no common border between subregions Ωiand Ωj. Term kii =−Pj=ikij . Matrix Kdefines a graph with one node for each subregion. The rest of the Chapter is organized as follows. First, an example will be analytically and numerically solved in a tworegion scenario. Other examples, with different spatial distributions and number of players, will be also computed in order to show how different geographical characteristics lead to different solutions. Afterwards, employing the analytical solution of the first example, an empirical error analysis of the methods proposed in Chapter 4 will be carried out. In [9], a linear-spline based Value iteration algorithm is proposed to find the Markovian Nash equilibrium of the game. A performance comparison of the methods proposed in this work between then and with respect to the spline-based method employed in [9] will also be made. Finally, we mention that other approaches could be considered. In [8], the solution of the Bellman equations is approximated by a fixed point iteration using a collocation method based on piecewise cubic Hermite interpolation. 57 and Ω2are represented. The optimal emissions are obtained as a function of the pollution stocks p1and p2. It can be appreciated that the emissions negatively depend on the pollution stock level of both regions. The feedback strategies are presented for two different computational domains. In Figure 5.3, the pollution stock lies in domain [0,0.5] ×[0,0.5], and feedback strategies are C∞. However, in Figure 5.4 domain [0,2] ×[0,2] has been employed and the solution is piecewise continuous. Emissions take value zero for high pollution stock values. It is worth to mention now that this different regularity in the computational domain leads to different spatial error convergence as it will be seen in Section 5.3. Example 2: Two regions with different geographical neighbourhoods In this example, one of the regions presents a border acting like a sink of pollution. Then, the problem is not symmetric for both players. The pollution diffusion is K=−1 1 1−2. There exists a flux of pollution from region Ω2to the sink but not from Ω1to the sink. In this case k10 = 0 and k20 = 1. The analytical solution for this example can also be computed (see [9]). The obtained optimal emission strategies are u1(p1, p2) u2(p1, p2)=Lp1 p2+0.352463 0.437588where L=−0.344173 −0.081391 −0.051392 −0.209672. 64 The eigenvalues are λ1=−1.24801 , λ2=−3.30584 and the steady-state pollution stock values are pSS 1= 0.328921, pSS 2= 0.276641. The different solutions between the two regions lies in their geographical aspects. As in the previous example, we assume p0 1=p0 2= 0.1. Figure 5.6 represents the evolution of the pollution stock and the emissions along the optimal time-path. Region Ω2presents a border acting like a sink of pollution. Consequently, the steady-state stock of pollution for region Ω2is lower than the steady-state value for region Ω1. Moreover, as the figure presents, the optimal emissions in region Ω2are always higher than in Ω1, even Ω1generates a lower pollution stock. This means that an important flow of pollution is moving from region Ω2through the boundary to sink Ω0. Figure 5.6: Emissions and pollution stock along the equilibrium. Figure 5.7 shows the computed feedback strategies in function of the 65 pollution stock levels. It can be appreciated that emissions in region Ω2are higher than in Ω1. Figure 5.7: Regions’ feedback strategies. The different results obtained in Example 1 and Example 2 highlights the importance of including the spatial aspect in the transboundary pollution model. This idea will be reinforced with the following three-region scenario examples. 66 5.2 Three regions scenario Example 3: Three regions isolated from outside Let us consider k10 =k20 =k30 = 0, that is, three regions isolated from outside. In this example, a flux of pollution appears from each region towards his neighbours. Pollution is passing from the central region Ω2to the sided regions Ω1and Ω3, and also from the sides to the center region. Region Ω1 and Ω3present symmetrical conditions. The diffusion matrix Kis K=  −1 1 0 1−2 1 0 1 −1 . Figure 5.9 shows the trajectories for the emissions and the stock of pollution along the equilibrium strategy. The initial pollution stocks are set to 0.1. As expected, regions Ω1and Ω3present the same trajectories for the emissions and pollution stock. Region Ω2benefits from its center position, profiting of the lower emissions of Ω1and Ω3. With higher emissions, region Ω2presents almost the same pollution stock as the other regions. 67 Figure 5.9: Emissions and pollution stock along the equilibrium. Example 4: Three regions with different geographical neighbourhoods In this example, a coast region is considered. The region is divided in three subregions that present different geographical conditions. Regions Ω1and Ω2 present only one coast side, while Ω3present two coasts. The flux of pollution through the coast is set as k10 =k20 = 1 and k30 = 2. 68 The matrix Kcontaining the flux of pollution is K=  −2 1 0 1−3 1 0 1 −3 . Figure 5.11 represents the emissions and pollution stock along the equilibrium strategy. As expected, the three regions present different trajectories. It should be noted that the coast side produces an important decreasing of the pollution rate. Therefore, the optimal emission strategies are much higher than in the Example 3. Region Ω3presents two coasts, something that allows this region to have higher emission levels. Figure 5.11: Emissions and pollution stock along the equilibrium. In the exposed three-player examples, the importance of taking into account geographical characteristics in the transboundary pollution model is again enhanced. 69 5.3 Error analysis Since the numerically computed solutions are those of a time-discrete game with a space discretization, numerical errors might have appeared. In this Section, the spatial and temporal discretization errors are analysed empirically for Example 1, thanks to the fact that we have analytical solutions. For some theoretical results on the approximation error committed with fully discrete problems, see [10]. The error will be analysed in a fixed approximation domain for different computational domains, the domain where the solution is numerically computed. The approximation domain for the analysis will be [0,0.5] ×[0,0.5]. We fix a grid of equidistant nodes in the approximation domain D D={(xi, xj), xi= 0.05i, xj= 0.05j, i, j = 0, ..., 10}. Since in Example 1 the solutions were symmetric, the values that will be compared will be the ones obtained computing V1(p0) = Z∞ 0 e−ρt u1(A1−u1 2)−φ1 2p2 1dt, (5.10) subject to the dynamics of the system with the parameter values employed in Example 1. The controls employed in computing the previous functional will be the numerical/analytical controls obtained. The numerical controls unare obtained through the interpolation of the solution obtained in the computational domain. The error measured will be the root of the mean square error between the analytical and the numerical solution (ua). RMSE =s1 |D|X p∈D (V1(p;un)−V1(p;ua))2. Two different computational domains are considered, [0,0.5]×[0,0.5] and [0,2] ×[0,2]. 70 In [0,0.5] ×[0,0.5], the value function is C∞. However, in [0,2] ×[0,2] is only piecewise regular. In Spectral methods, the order of the method depends on the regularity of function to be interpolated (see [3, Ch 2]). Specifically, it depends on how fast the expansion coefficients decay to zero. 5.3.1 Temporal error in [0,0.5] ×[0,0.5] In this section, the temporal error is studied for the Value iteration (Chebyshev and splines-based) and Policy iteration. The idea to study the temporal error is to take a sufficiently refined spatial discretization (Nxlarge), so that the spatial error does not interfere in the temporal analysis. The error will be computed for different values of h > 0, which is the parameter employed to define de discrete-time game of the numerical approximation. Let h=1 Nt. The numerical solutions will be computed doubling the number Nt, i.e., his halved in each of the successive computations. (a) Value iteration (b) Policy iteration Figure 5.12: Temporal error in logarithmic scale, domain [0,0.5] ×[0,0.5]. Figure 5.12 shows the RMSE for each choice of Nt, where both axis are represented in logarithmic scale. A linear tendency of the behaviour of the 71 error as we increase the value of Ntcan be appreciated. The slope is close to one. The behaviour of the temporal error is almost identical for the Value iteration and the Policy iteration algorithms. For the splines-based Value iteration method the same result is also obtained. The behaviour of the temporal error is similar in both computational domains. For the previous analysis, the number of iterations were stored. The following tables show these values for each time discretization steps. Value iteration Nt8 16 32 64 128 Number of iterations 9613 18079 33911 63344 117765 Table 5.1: Iterations for each time step, Value iteration. Policy iteration Nt8 16 32 64 128 Number of iterations 140 140 140 140 140 Table 5.2: Iterations for each time step, Policy iteration. The previous results show that many less iterations are needed in the policy method. This is a well known fact in Control Problems and seems to hold in Game Theory problems. The results obtained for the splines-based Value method were very similar to the Chebyshev based Value method. 5.3.2 Spatial error in [0,0.5] ×[0,0.5] The spatial error is analysed in the same way as the temporal error. Taking a large value of Nt, and the number of spatial nodes Nxis successively mul- 72 tiplied by two. The analytical solution of the problem restricted to domain [0,0.5] × [0,0.5] is a polynomial. Therefore, there should not be any numerical error related with the spatial discretization in this domain. The error should depend just on the size of h. Figure 5.13 represents, for two different time steps, the error committed in function of the spatial nodes. As expected, the result is that the spatial error does not depend on the space discretization. Then, a constant error is obtained, where the magnitude depends on the time step. (a) Value iteration (b) Policy iteration Figure 5.13: Spatial error in logarithmic scale, domain [0,0.5] ×[0,0.5]. 5.3.3 Spatial error in [0,2] ×[0,2] The previous situation, in which there was no spatial error, changes when the solution is not a polynomial. In the computation domain [0,2] ×[0,2] the value function is piecewise regular. Therefore, an error related with the spatial discretization should be appre- 73 [9] de Frutos, J., and Mart´ ın-Herr´ an, G. Spatial effects and strategic behavior in a multiregional transboundary pollution dynamic game. Journal of Environmental Economics and Management 97, C (2019), 182–207. [10] de Frutos, J., and Novo, J. Optimal bounds for numerical approximations of infinite horizon problems based on dynamic programming approach, 2021. [11] de Leva, P. Multiprod algorithm., 07 2010. [12] Dockner, E. J., Jorgensen, S., Long, N. V., and Sorger, G. Differential Games in Economics and Management Science. Cambridge University Press, 2000. [13] Haurie A., Krawczyk J.B., Z. G. Games and dynamic games. World Scientific, Singapore, 2011. [14] Jørgensen, S. Marketing. Springer International Publishing, Cham, 2016, pp. 1–41. [15] Kirk, D. Optimal Control Theory: An Introduction. Dover Publications, 2004. [16] Krawczyk, J.B., P. V. Handbook of Dynamic Game Theory. Bacar T., Zaccour G., eds., Springer Nature, 2018. [17] Navarro, J. P., and Tena, E. C. Teor´ıa de juegos. Pearson Educaci´on, 2003. [18] Rivlin, T. Chebyshev Polynomials: From Approximation Theory to Algebra and Number Theory. Pure and Applied Mathematics: A Wiley Series of Texts, Monographs and Tracts. Wiley, 1990. [19] Seierstad, A. Optimal control theory with economic applications / atle seierstad, and knut sydsaeter, 1999. [20] Yeung, D. W., and Petrosyan, L. A. Nontransferable Utility Cooperative Dynamic Games. Springer International Publishing, Cham, 2017, pp. 1–38. 80 81