Games with Delay

Games with Delay#

This example continues the Douglas-Rachford Game simulation demonstration.

In this two-operator example, the pseudogradient \(F_1\) is \(1.4785\)-monotone and \(0.1605\)-cocoercive, and the normal cone \(F_2 = \partial \mathbb{I}_{\norm{\cdot}_{\infty} \leq 10}\) is the subdifferential of a p.c.c. function. The operators are therefore described by op_gen and op_pcc respectively.

Four algorithms to solve this inclusion problem are synthesized.

  1. Backward evaluation of both \(F_1\) and \(F_2\),

  2. Forward evaluation of \(F_1\), backward evaluation of \(F_2\),

  3. A delay of one time step before and after evaluation of \(F_1\).

Synthesis is performed for each case without a warm start (iqc=[]). The certified convergence rates are \(\rho < 0.7163\) for Algorithm 1, \(\rho < 0.8734\) for Algorithm 2, and \(\rho < 0.9430\) for Algorithm 3.

All three are certifiably convergent, but Algorithm 1 has the least worst-case convergence rate. Each Synthesis is accompanied by an algorithm Simulation starting from an initial condition \(x_0=0\), empirically demonstrating this speed of convergence

Figure 1 plots a trajectory of the backward evaluation algorithm.

../../_images/game_sim_bw_dark.png

Figure 1: Algorithm with both backward evaluations#

../../_images/game_sim_bw_light.png

Figure 1: Algorithm with both backward evaluations#

Figure 2 plots a trajectory of the forward and backward evaluation algorithm.

../../_images/game_sim_fw_dark.png

Figure 2: Algorithm with one forward and one backward evaluation#

../../_images/game_sim_fw_light.png

Figure 2: Algorithm with one forward and one backward evaluation#

Figure 3 plots a trajectory of the algorithm with time delay.

../../_images/game_sim_delay_dark.png

Figure 3: Algorithm with delay on \(F_1\)#

../../_images/game_sim_delay_light.png

Figure 3: Algorithm with delay on \(F_1\)#

Code for Nash Equilibrium Seeking#
 1rng(33, 'twister');
 2
 3%define the Linear Quadratic Game
 4N_agent = 4; %number of agents
 5n = 5*ones(N_agent, 1); %strategy space of each agent
 6mu_boost = 5; %add strong monotonicity
 7[Q_list, b_list, c_list] = rand_LQ_game(n, mu_boost);
 8op1_sim = op_sim_LQ_game(Q_list, b_list, c_list, n);
 9
10
11%% synthesize an algorithm
12mu = op1_sim.monotone; %1.4785
13beta = op1_sim.coco; %0.1605
14
15op1 = op_gen();
16op1.monotone = mu;
17op1.cocoercive = beta;
18
19op2 = op_pcc();
20ops = {op1, op2};
21
22%form the network delay
23d1 = [1, 0];
24d2 = [1, 0];
25network = bridge_channel_delay(d1, d2);
26
27%form the system
28sys = opt_system(ops, [], []);
29sys_delay = opt_system(ops, network, []);
30
31%set the information structure
32config = opt_config();
33% config.syn.elimination = false;
34
35%backward evaluation of pseudogradient
36config.syn.D_mask = [1, 0; 1, 1]; 
37man_bw = opt_synthesis(sys, config);
38
39%forward evaluation of pseudogradient
40config.syn.D_mask = [0, 0; 1, 1]; 
41man_fw = opt_synthesis(sys, config);
42
43%delay on pseudogradient, no controller restriction
44config.syn.D_mask = [1, 1; 1, 1]; 
45man_delay = opt_synthesis(sys_delay, config);
46
47sol_bw = man_bw.bisect();       %rho = 0.7163
48sol_fw = man_fw.bisect();       %rho = 0.8734
49sol_delay = man_delay.bisect(); %rho = 0.9430
50
51%% simulate and plot
52
53%define the L infinity ball
54%individual constraints for agents
55BOX = 10;
56% op2_sim = op_sim_box(BOX);
57op2_sim = op_sim_l1_hard(100);
58ops_sim = {op1_sim, op2_sim};
59
60sys_sim_fw = sol_fw.sys.export_sim(ops_sim);
61sys_sim_bw = sol_bw.sys.export_sim(ops_sim);
62sys_sim_delay = sol_delay.sys.export_sim(ops_sim);
63
64
65sys_sim_list = {sys_sim_fw, sys_sim_bw, sys_sim_delay};
66
67for i =1:3
68    d = sum(n);
69    sim = alg_sim(sys_sim_list{i}, d);
70    T = 100;
71    
72    sim_out= sim.sim(T);
73    plt = alg_plotter(sim_out);
74    plt.plot({'x', 'w', 'res_w', 'payoff', 'z', 'res_z'}, i);
75end