games.ipynb 77 KB
Newer Older
1
2
3
4
5
6
7
8
9
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import spot\n",
10
    "from buddy import bddtrue\n",
11
12
13
14
15
16
17
    "spot.setup()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
18
    "# Support for games\n",
19
    "\n",
20
    "The support for games is currently quite rudimentary, as Spot currently only uses those games in `ltlsynt`.\n",
21
    "\n",
22
    "In essence, agame is just an ω-automaton with a property named `state-player` that stores the player owning each state.  The players are named 0 and 1.  The player owning a state can decide what the next transition from this state should be.  The goal for player 1 is to force the play to be infinite and to satisfy the acceptance condition of the automaton, while the goal for player 0 is to prevent it by either forcing a finite play, or forcing an infinite play that does not satisfy the acceptance condition.\n",
23
    "\n",
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
    "The support is currently restricted to games that use:\n",
    "- `t` acceptance: all infinite run are accepting, and player 0 can only win if it manages to force a finite play (this requires reaching states without successors).\n",
    "- max odd parity acceptance: player 0 can win if the maximal value seen infinitely often is even"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Creating games from scratch\n",
    "\n",
    "Games can be [created like any automaton](https://spot.lrde.epita.fr/tut22.html).  \n",
    "Using `set_state_players()` will fix the state owners."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.43.0 (0)\n",
       " -->\n",
       "<!-- Pages: 1 -->\n",
       "<svg width=\"495pt\" height=\"190pt\"\n",
       " viewBox=\"0.00 0.00 495.00 190.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 186)\">\n",
       "<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-186 491,-186 491,4 -4,4\"/>\n",
       "<text text-anchor=\"start\" x=\"240.5\" y=\"-166.8\" font-family=\"Lato\" font-size=\"14.00\">t</text>\n",
       "<text text-anchor=\"start\" x=\"232.5\" y=\"-151.8\" font-family=\"Lato\" font-size=\"14.00\">[all]</text>\n",
       "<!-- I -->\n",
       "<!-- 0 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>0</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"64,-144 37,-126 64,-108 91,-126 64,-144\"/>\n",
       "<text text-anchor=\"middle\" x=\"64\" y=\"-122.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
       "</g>\n",
       "<!-- I&#45;&gt;0 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>I&#45;&gt;0</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1.04,-126C1.93,-126 15.66,-126 29.98,-126\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"37,-126 30,-129.15 33.5,-126 30,-126 30,-126 30,-126 33.5,-126 30,-122.85 37,-126 37,-126\"/>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>1</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"145\" cy=\"-126\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-122.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;1 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>0&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M82.53,-120.28C93.75,-119.1 108.43,-118.93 120.64,-119.78\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"127.86,-120.43 120.61,-122.94 124.38,-120.12 120.89,-119.8 120.89,-119.8 120.89,-119.8 124.38,-120.12 121.17,-116.66 127.86,-120.43 127.86,-120.43\"/>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>3</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"145\" cy=\"-72\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-68.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;3 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>0&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M78.05,-117.08C90.47,-108.59 109.36,-95.68 123.74,-85.85\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"129.6,-81.85 125.59,-88.4 126.71,-83.82 123.82,-85.8 123.82,-85.8 123.82,-85.8 126.71,-83.82 122.04,-83.2 129.6,-81.85 129.6,-81.85\"/>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;0 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>1&#45;&gt;0</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M127.86,-131.57C116.84,-132.84 102.04,-133.09 89.56,-132.3\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"82.53,-131.72 89.77,-129.16 86.02,-132.01 89.51,-132.3 89.51,-132.3 89.51,-132.3 86.02,-132.01 89.25,-135.44 82.53,-131.72 82.53,-131.72\"/>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>2</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"226,-144 199,-126 226,-108 253,-126 226,-144\"/>\n",
       "<text text-anchor=\"middle\" x=\"226\" y=\"-122.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;2 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>1&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M162.37,-120.41C173.4,-119.15 188.15,-118.92 200.56,-119.71\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"207.56,-120.29 200.32,-122.85 204.07,-120 200.58,-119.71 200.58,-119.71 200.58,-119.71 204.07,-120 200.84,-116.57 207.56,-120.29 207.56,-120.29\"/>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;2 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>3&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M160.49,-81.9C173.24,-90.62 191.89,-103.37 205.86,-112.92\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"211.91,-117.05 204.36,-115.7 209.02,-115.08 206.13,-113.1 206.13,-113.1 206.13,-113.1 209.02,-115.08 207.91,-110.5 211.91,-117.05 211.91,-117.05\"/>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>4</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"226,-90 199,-72 226,-54 253,-72 226,-90\"/>\n",
       "<text text-anchor=\"middle\" x=\"226\" y=\"-68.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;4 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>3&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M163.14,-72C171.54,-72 181.95,-72 191.82,-72\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"198.87,-72 191.87,-75.15 195.37,-72 191.87,-72 191.87,-72 191.87,-72 195.37,-72 191.87,-68.85 198.87,-72 198.87,-72\"/>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>6</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"226,-36 199,-18 226,0 253,-18 226,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"226\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">6</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;6 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>3&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M160.49,-62.1C173.24,-53.38 191.89,-40.63 205.86,-31.08\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"211.91,-26.95 207.91,-33.5 209.02,-28.92 206.13,-30.9 206.13,-30.9 206.13,-30.9 209.02,-28.92 204.36,-28.3 211.91,-26.95 211.91,-26.95\"/>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;1 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>2&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M207.56,-131.71C196.4,-132.89 181.78,-133.07 169.59,-132.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"162.37,-131.59 169.62,-129.08 165.85,-131.9 169.34,-132.22 169.34,-132.22 169.34,-132.22 165.85,-131.9 169.06,-135.35 162.37,-131.59 162.37,-131.59\"/>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>5</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"460,-90 433,-72 460,-54 487,-72 460,-90\"/>\n",
       "<text text-anchor=\"middle\" x=\"460\" y=\"-68.3\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;5 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>2&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M246.38,-121.49C287.92,-111.82 385.57,-89.09 432.67,-78.13\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"439.51,-76.54 433.41,-81.19 436.1,-77.33 432.69,-78.12 432.69,-78.12 432.69,-78.12 436.1,-77.33 431.98,-75.06 439.51,-76.54 439.51,-76.54\"/>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>7</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"307\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"307\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">7</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;7 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>6&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M244.53,-12.28C255.75,-11.1 270.43,-10.93 282.64,-11.78\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"289.86,-12.43 282.61,-14.94 286.38,-12.12 282.89,-11.8 282.89,-11.8 282.89,-11.8 286.38,-12.12 283.17,-8.66 289.86,-12.43 289.86,-12.43\"/>\n",
       "</g>\n",
       "<!-- 7&#45;&gt;6 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>7&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M289.86,-23.57C278.84,-24.84 264.04,-25.09 251.56,-24.3\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"244.53,-23.72 251.77,-21.16 248.02,-24.01 251.51,-24.3 251.51,-24.3 251.51,-24.3 248.02,-24.01 251.25,-27.44 244.53,-23.72 244.53,-23.72\"/>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>8</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"379\" cy=\"-49\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"379\" y=\"-45.3\" font-family=\"Lato\" font-size=\"14.00\">8</text>\n",
       "</g>\n",
       "<!-- 7&#45;&gt;8 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>7&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M323.88,-25.03C333.28,-29.2 345.33,-34.53 355.67,-39.11\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"362.18,-41.99 354.5,-42.04 358.98,-40.58 355.78,-39.16 355.78,-39.16 355.78,-39.16 358.98,-40.58 357.05,-36.28 362.18,-41.99 362.18,-41.99\"/>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;5 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>8&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M396.37,-53.77C407.17,-56.91 421.54,-61.1 433.79,-64.66\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"440.72,-66.68 433.12,-67.75 437.36,-65.7 434,-64.72 434,-64.72 434,-64.72 437.36,-65.7 434.88,-61.7 440.72,-66.68 440.72,-66.68\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<spot.jupyter.SVG object>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bdict = spot.make_bdd_dict();\n",
    "game = spot.make_twa_graph(bdict)\n",
    "game.new_states(9)\n",
    "for (s, d) in ((0,1), (0, 3), \n",
    "               (1, 0), (1, 2),\n",
    "               (2, 1), (2, 5),\n",
    "               (3, 2), (3, 4), (3, 6),\n",
    "               (6, 7),\n",
    "               (7, 6), (7, 8),\n",
    "               (8, 5)):\n",
    "  game.new_edge(s, d, bddtrue)\n",
    "spot.set_state_players(game, [True, False, True, False, True, True, True, False, False])\n",
    "game.show('.g')  # Use \"g\" to hide the irrelevant edge labels."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The `set_state_players()` function takes a list of owner for each of the states in the automaton.  In the output,\n",
    "states from player 0 use circles, ellispes, or rectangle with rounded corners (mnemonic: 0 is round) while states from player 1 have a losanse shape (1 has only straight lines). \n",
    "\n",
    "\n",
    "State ownership can also be manipulated by the following functions:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(True, False, True, False, True, True, True, False, False)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "spot.get_state_players(game)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "spot.get_state_player(game, 4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.43.0 (0)\n",
       " -->\n",
       "<!-- Pages: 1 -->\n",
       "<svg width=\"495pt\" height=\"190pt\"\n",
       " viewBox=\"0.00 0.00 495.00 190.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 186)\">\n",
       "<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-186 491,-186 491,4 -4,4\"/>\n",
       "<text text-anchor=\"start\" x=\"240.5\" y=\"-166.8\" font-family=\"Lato\" font-size=\"14.00\">t</text>\n",
       "<text text-anchor=\"start\" x=\"232.5\" y=\"-151.8\" font-family=\"Lato\" font-size=\"14.00\">[all]</text>\n",
       "<!-- I -->\n",
       "<!-- 0 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>0</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"64,-144 37,-126 64,-108 91,-126 64,-144\"/>\n",
       "<text text-anchor=\"middle\" x=\"64\" y=\"-122.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
       "</g>\n",
       "<!-- I&#45;&gt;0 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>I&#45;&gt;0</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1.04,-126C1.93,-126 15.66,-126 29.98,-126\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"37,-126 30,-129.15 33.5,-126 30,-126 30,-126 30,-126 33.5,-126 30,-122.85 37,-126 37,-126\"/>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>1</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"145\" cy=\"-126\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-122.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;1 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>0&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M82.53,-120.28C93.75,-119.1 108.43,-118.93 120.64,-119.78\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"127.86,-120.43 120.61,-122.94 124.38,-120.12 120.89,-119.8 120.89,-119.8 120.89,-119.8 124.38,-120.12 121.17,-116.66 127.86,-120.43 127.86,-120.43\"/>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>3</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"145\" cy=\"-72\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-68.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;3 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>0&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M78.05,-117.08C90.47,-108.59 109.36,-95.68 123.74,-85.85\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"129.6,-81.85 125.59,-88.4 126.71,-83.82 123.82,-85.8 123.82,-85.8 123.82,-85.8 126.71,-83.82 122.04,-83.2 129.6,-81.85 129.6,-81.85\"/>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;0 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>1&#45;&gt;0</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M127.86,-131.57C116.84,-132.84 102.04,-133.09 89.56,-132.3\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"82.53,-131.72 89.77,-129.16 86.02,-132.01 89.51,-132.3 89.51,-132.3 89.51,-132.3 86.02,-132.01 89.25,-135.44 82.53,-131.72 82.53,-131.72\"/>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>2</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"226,-144 199,-126 226,-108 253,-126 226,-144\"/>\n",
       "<text text-anchor=\"middle\" x=\"226\" y=\"-122.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;2 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>1&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M162.37,-120.41C173.4,-119.15 188.15,-118.92 200.56,-119.71\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"207.56,-120.29 200.32,-122.85 204.07,-120 200.58,-119.71 200.58,-119.71 200.58,-119.71 204.07,-120 200.84,-116.57 207.56,-120.29 207.56,-120.29\"/>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;2 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>3&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M160.49,-81.9C173.24,-90.62 191.89,-103.37 205.86,-112.92\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"211.91,-117.05 204.36,-115.7 209.02,-115.08 206.13,-113.1 206.13,-113.1 206.13,-113.1 209.02,-115.08 207.91,-110.5 211.91,-117.05 211.91,-117.05\"/>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>4</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"226\" cy=\"-72\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"226\" y=\"-68.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;4 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>3&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M163.14,-72C174.12,-72 188.52,-72 200.67,-72\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"207.89,-72 200.89,-75.15 204.39,-72 200.89,-72 200.89,-72 200.89,-72 204.39,-72 200.89,-68.85 207.89,-72 207.89,-72\"/>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>6</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"226,-36 199,-18 226,0 253,-18 226,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"226\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">6</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;6 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>3&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M160.49,-62.1C173.24,-53.38 191.89,-40.63 205.86,-31.08\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"211.91,-26.95 207.91,-33.5 209.02,-28.92 206.13,-30.9 206.13,-30.9 206.13,-30.9 209.02,-28.92 204.36,-28.3 211.91,-26.95 211.91,-26.95\"/>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;1 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>2&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M207.56,-131.71C196.4,-132.89 181.78,-133.07 169.59,-132.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"162.37,-131.59 169.62,-129.08 165.85,-131.9 169.34,-132.22 169.34,-132.22 169.34,-132.22 165.85,-131.9 169.06,-135.35 162.37,-131.59 162.37,-131.59\"/>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>5</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"460,-90 433,-72 460,-54 487,-72 460,-90\"/>\n",
       "<text text-anchor=\"middle\" x=\"460\" y=\"-68.3\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;5 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>2&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M246.38,-121.49C287.92,-111.82 385.57,-89.09 432.67,-78.13\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"439.51,-76.54 433.41,-81.19 436.1,-77.33 432.69,-78.12 432.69,-78.12 432.69,-78.12 436.1,-77.33 431.98,-75.06 439.51,-76.54 439.51,-76.54\"/>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>7</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"307\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"307\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">7</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;7 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>6&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M244.53,-12.28C255.75,-11.1 270.43,-10.93 282.64,-11.78\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"289.86,-12.43 282.61,-14.94 286.38,-12.12 282.89,-11.8 282.89,-11.8 282.89,-11.8 286.38,-12.12 283.17,-8.66 289.86,-12.43 289.86,-12.43\"/>\n",
       "</g>\n",
       "<!-- 7&#45;&gt;6 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>7&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M289.86,-23.57C278.84,-24.84 264.04,-25.09 251.56,-24.3\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"244.53,-23.72 251.77,-21.16 248.02,-24.01 251.51,-24.3 251.51,-24.3 251.51,-24.3 248.02,-24.01 251.25,-27.44 244.53,-23.72 244.53,-23.72\"/>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>8</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"379\" cy=\"-49\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"379\" y=\"-45.3\" font-family=\"Lato\" font-size=\"14.00\">8</text>\n",
       "</g>\n",
       "<!-- 7&#45;&gt;8 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>7&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M323.88,-25.03C333.28,-29.2 345.33,-34.53 355.67,-39.11\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"362.18,-41.99 354.5,-42.04 358.98,-40.58 355.78,-39.16 355.78,-39.16 355.78,-39.16 358.98,-40.58 357.05,-36.28 362.18,-41.99 362.18,-41.99\"/>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;5 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>8&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M396.37,-53.77C407.17,-56.91 421.54,-61.1 433.79,-64.66\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"440.72,-66.68 433.12,-67.75 437.36,-65.7 434,-64.72 434,-64.72 434,-64.72 437.36,-65.7 434.88,-61.7 440.72,-66.68 440.72,-66.68\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<spot.jupyter.SVG object>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "spot.set_state_player(game, 4, False)\n",
    "game.show('.g')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Solving a game\n",
    "\n",
    "Solving a game is done my calling `solve_safety_game()` or `solve_parity_game()`.   This will attach two additional vectors into the game automaton: one vector stores the winner of each state, and one vector stores (memory-less) strategy for each state, i.e., the transition that should always be taken by the owner of this state in order to win.  \n",
    "\n",
    "The return value of those function is simply the winner for the initial state."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "spot.solve_safety_game(game)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Calling the `highlight_strategy()` function can be used to decorate the `game` automaton using the winning regions and strategies.  Below, green represent the winning region/strategy for player 1 and red those for player 0."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.43.0 (0)\n",
       " -->\n",
       "<!-- Pages: 1 -->\n",
       "<svg width=\"495pt\" height=\"190pt\"\n",
       " viewBox=\"0.00 0.00 495.00 190.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 186)\">\n",
       "<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-186 491,-186 491,4 -4,4\"/>\n",
       "<text text-anchor=\"start\" x=\"240.5\" y=\"-166.8\" font-family=\"Lato\" font-size=\"14.00\">t</text>\n",
       "<text text-anchor=\"start\" x=\"232.5\" y=\"-151.8\" font-family=\"Lato\" font-size=\"14.00\">[all]</text>\n",
       "<!-- I -->\n",
       "<!-- 0 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>0</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"64,-144 37,-126 64,-108 91,-126 64,-144\"/>\n",
       "<text text-anchor=\"middle\" x=\"64\" y=\"-122.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
       "</g>\n",
       "<!-- I&#45;&gt;0 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>I&#45;&gt;0</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1.04,-126C1.93,-126 15.66,-126 29.98,-126\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"37,-126 30,-129.15 33.5,-126 30,-126 30,-126 30,-126 33.5,-126 30,-122.85 37,-126 37,-126\"/>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>1</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" cx=\"145\" cy=\"-126\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-122.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;1 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>0&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M82.53,-120.28C93.75,-119.1 108.43,-118.93 120.64,-119.78\"/>\n",
       "<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"127.86,-120.43 120.61,-122.94 124.33,-120.62 120.84,-120.3 120.89,-119.8 120.94,-119.3 124.42,-119.62 121.17,-116.66 127.86,-120.43 127.86,-120.43\"/>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>3</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"145\" cy=\"-72\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"145\" y=\"-68.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;3 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>0&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M78.05,-117.08C90.47,-108.59 109.36,-95.68 123.74,-85.85\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"129.6,-81.85 125.59,-88.4 126.71,-83.82 123.82,-85.8 123.82,-85.8 123.82,-85.8 126.71,-83.82 122.04,-83.2 129.6,-81.85 129.6,-81.85\"/>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;0 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>1&#45;&gt;0</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M127.86,-131.57C116.84,-132.84 102.04,-133.09 89.56,-132.3\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"82.53,-131.72 89.77,-129.16 86.02,-132.01 89.51,-132.3 89.51,-132.3 89.51,-132.3 86.02,-132.01 89.25,-135.44 82.53,-131.72 82.53,-131.72\"/>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>2</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"226,-144 199,-126 226,-108 253,-126 226,-144\"/>\n",
       "<text text-anchor=\"middle\" x=\"226\" y=\"-122.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;2 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>1&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M162.37,-120.41C173.4,-119.15 188.15,-118.92 200.56,-119.71\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"207.56,-120.29 200.32,-122.85 204.07,-120 200.58,-119.71 200.58,-119.71 200.58,-119.71 204.07,-120 200.84,-116.57 207.56,-120.29 207.56,-120.29\"/>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;2 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>3&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M160.49,-81.9C173.24,-90.62 191.89,-103.37 205.86,-112.92\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"211.91,-117.05 204.36,-115.7 209.02,-115.08 206.13,-113.1 206.13,-113.1 206.13,-113.1 209.02,-115.08 207.91,-110.5 211.91,-117.05 211.91,-117.05\"/>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>4</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"226\" cy=\"-72\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"226\" y=\"-68.3\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;4 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>3&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M163.14,-72C174.12,-72 188.52,-72 200.67,-72\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"207.89,-72 200.89,-75.15 204.39,-72 200.89,-72 200.89,-72 200.89,-72 204.39,-72 200.89,-68.85 207.89,-72 207.89,-72\"/>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>6</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"226,-36 199,-18 226,0 253,-18 226,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"226\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">6</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;6 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>3&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M160.49,-62.1C173.24,-53.38 191.89,-40.63 205.86,-31.08\"/>\n",
       "<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"211.91,-26.95 207.91,-33.5 209.31,-29.33 206.42,-31.31 206.13,-30.9 205.85,-30.48 208.74,-28.51 204.36,-28.3 211.91,-26.95 211.91,-26.95\"/>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;1 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>2&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M207.56,-131.71C196.4,-132.89 181.78,-133.07 169.59,-132.24\"/>\n",
       "<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"162.37,-131.59 169.62,-129.08 165.9,-131.41 169.39,-131.72 169.34,-132.22 169.3,-132.71 165.81,-132.4 169.06,-135.35 162.37,-131.59 162.37,-131.59\"/>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>5</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"460,-90 433,-72 460,-54 487,-72 460,-90\"/>\n",
       "<text text-anchor=\"middle\" x=\"460\" y=\"-68.3\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;5 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>2&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M246.38,-121.49C287.92,-111.82 385.57,-89.09 432.67,-78.13\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"439.51,-76.54 433.41,-81.19 436.1,-77.33 432.69,-78.12 432.69,-78.12 432.69,-78.12 436.1,-77.33 431.98,-75.06 439.51,-76.54 439.51,-76.54\"/>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>7</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"307\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"307\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">7</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;7 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>6&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M244.53,-12.28C255.75,-11.1 270.43,-10.93 282.64,-11.78\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"289.86,-12.43 282.61,-14.94 286.38,-12.12 282.89,-11.8 282.89,-11.8 282.89,-11.8 286.38,-12.12 283.17,-8.66 289.86,-12.43 289.86,-12.43\"/>\n",
       "</g>\n",
       "<!-- 7&#45;&gt;6 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>7&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M289.86,-23.57C278.84,-24.84 264.04,-25.09 251.56,-24.3\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"244.53,-23.72 251.77,-21.16 248.02,-24.01 251.51,-24.3 251.51,-24.3 251.51,-24.3 248.02,-24.01 251.25,-27.44 244.53,-23.72 244.53,-23.72\"/>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>8</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"379\" cy=\"-49\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"379\" y=\"-45.3\" font-family=\"Lato\" font-size=\"14.00\">8</text>\n",
       "</g>\n",
       "<!-- 7&#45;&gt;8 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>7&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M323.88,-25.03C333.28,-29.2 345.33,-34.53 355.67,-39.11\"/>\n",
       "<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"362.18,-41.99 354.5,-42.04 358.78,-41.03 355.58,-39.62 355.78,-39.16 355.98,-38.7 359.18,-40.12 357.05,-36.28 362.18,-41.99 362.18,-41.99\"/>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;5 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>8&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M396.37,-53.77C407.17,-56.91 421.54,-61.1 433.79,-64.66\"/>\n",
       "<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"440.72,-66.68 433.12,-67.75 437.22,-66.18 433.86,-65.2 434,-64.72 434.14,-64.24 437.5,-65.22 434.88,-61.7 440.72,-66.68 440.72,-66.68\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<spot.jupyter.SVG object>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "spot.highlight_strategy(game)\n",
    "game.show('.g')"
665
666
667
668
669
670
671
672
673
674
675
676
677
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Input/Output\n",
    "\n",
    "An extension of the HOA format makes it possible to store the `state-player` property.  This allows us to read the parity game constructed by `ltlsynt` using `spot.automaton()` like any other automaton."
   ]
  },
  {
   "cell_type": "code",
678
   "execution_count": 8,
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.43.0 (0)\n",
       " -->\n",
       "<!-- Pages: 1 -->\n",
       "<svg width=\"567pt\" height=\"338pt\"\n",
       " viewBox=\"0.00 0.00 566.58 337.76\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 333.76)\">\n",
       "<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-333.76 562.58,-333.76 562.58,4 -4,4\"/>\n",
       "<text text-anchor=\"start\" x=\"197.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
       "<text text-anchor=\"start\" x=\"220.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "<text text-anchor=\"start\" x=\"236.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\">) &amp; (Inf(</text>\n",
       "<text text-anchor=\"start\" x=\"282.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "<text text-anchor=\"start\" x=\"298.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\">) | Fin(</text>\n",
       "<text text-anchor=\"start\" x=\"336.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
       "<text text-anchor=\"start\" x=\"352.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\">))</text>\n",
       "<text text-anchor=\"start\" x=\"223.79\" y=\"-301.56\" font-family=\"Lato\" font-size=\"14.00\">[parity max odd 3]</text>\n",
       "<!-- I -->\n",
       "<!-- 0 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>0</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-171.76\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"56\" y=\"-168.06\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
       "</g>\n",
       "<!-- I&#45;&gt;0 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>I&#45;&gt;0</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1.15,-171.76C2.79,-171.76 17.15,-171.76 30.63,-171.76\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-171.76 30.94,-174.91 34.44,-171.76 30.94,-171.76 30.94,-171.76 30.94,-171.76 34.44,-171.76 30.94,-168.61 37.94,-171.76 37.94,-171.76\"/>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>1</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"148.98,-163.76 126.02,-145.76 148.98,-127.76 171.94,-145.76 148.98,-163.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"148.98\" y=\"-142.06\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;1 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>0&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M69.9,-159.68C76.09,-154.68 83.92,-149.43 92,-146.76 101.41,-143.65 112.21,-142.86 121.8,-143.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"128.85,-143.33 121.72,-146.18 125.35,-143.18 121.86,-143.04 121.86,-143.04 121.86,-143.04 125.35,-143.18 121.99,-139.89 128.85,-143.33 128.85,-143.33\"/>\n",
       "<text text-anchor=\"start\" x=\"94.5\" y=\"-165.56\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
       "<text text-anchor=\"start\" x=\"92\" y=\"-150.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>2</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"148.98,-217.76 126.02,-199.76 148.98,-181.76 171.94,-199.76 148.98,-217.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"148.98\" y=\"-196.06\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;2 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>0&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M73.69,-176.89C88.1,-181.33 109.07,-187.78 125.05,-192.7\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"132.01,-194.84 124.39,-195.79 128.66,-193.81 125.32,-192.78 125.32,-192.78 125.32,-192.78 128.66,-193.81 126.24,-189.77 132.01,-194.84 132.01,-194.84\"/>\n",
       "<text text-anchor=\"start\" x=\"96.5\" y=\"-205.56\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
       "<text text-anchor=\"start\" x=\"92\" y=\"-190.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>3</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"241.96\" cy=\"-60.76\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"241.96\" y=\"-57.06\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;3 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>1&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M160.06,-136.34C175.16,-122.24 203.86,-95.42 222.7,-77.82\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"228.21,-72.67 225.24,-79.75 225.65,-75.06 223.09,-77.45 223.09,-77.45 223.09,-77.45 225.65,-75.06 220.94,-75.15 228.21,-72.67 228.21,-72.67\"/>\n",
       "<text text-anchor=\"start\" x=\"191.96\" y=\"-126.56\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
       "<text text-anchor=\"start\" x=\"189.96\" y=\"-111.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>4</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"241.96\" cy=\"-182.76\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"241.96\" y=\"-179.06\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;4 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>1&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M170.91,-146.58C181.75,-147.62 194.98,-149.89 205.96,-154.76 212.12,-157.49 218.12,-161.58 223.37,-165.8\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"228.73,-170.36 221.36,-168.22 226.07,-168.09 223.4,-165.83 223.4,-165.83 223.4,-165.83 226.07,-168.09 225.44,-163.43 228.73,-170.36 228.73,-170.36\"/>\n",
       "<text text-anchor=\"start\" x=\"193.96\" y=\"-173.56\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
       "<text text-anchor=\"start\" x=\"189.96\" y=\"-158.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;4 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>2&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M167.95,-196.4C181.93,-193.79 201.45,-190.14 216.79,-187.27\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"223.94,-185.94 217.64,-190.32 220.5,-186.58 217.06,-187.22 217.06,-187.22 217.06,-187.22 220.5,-186.58 216.48,-184.13 223.94,-185.94 223.94,-185.94\"/>\n",
       "<text text-anchor=\"start\" x=\"193.96\" y=\"-210.56\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
       "<text text-anchor=\"start\" x=\"189.96\" y=\"-195.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>5</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"427.92\" cy=\"-140.76\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"427.92\" y=\"-137.06\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;5 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>2&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M160.75,-208.85C168.39,-214.75 179.16,-222.01 189.96,-225.76 275.06,-255.28 319.26,-296.01 391.92,-242.76 413.34,-227.05 401.22,-210.86 409.92,-185.76 412.38,-178.66 415.21,-170.99 417.85,-164.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"420.4,-157.35 420.84,-165.01 419.15,-160.62 417.9,-163.89 417.9,-163.89 417.9,-163.89 419.15,-160.62 414.96,-162.76 420.4,-157.35 420.4,-157.35\"/>\n",
       "<text text-anchor=\"start\" x=\"279.96\" y=\"-282.56\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
       "<text text-anchor=\"start\" x=\"277.96\" y=\"-267.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>6</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"528.25,-71.76 505.29,-53.76 528.25,-35.76 551.21,-53.76 528.25,-71.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"528.25\" y=\"-50.06\" font-family=\"Lato\" font-size=\"14.00\">6</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;6 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>3&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M257.63,-51.19C263.78,-47.39 271.08,-43.12 277.96,-39.76 319.9,-19.23 330.01,-10.35 375.92,-1.76 425.97,7.61 481.93,-23.1 509.68,-41.29\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"515.79,-45.4 508.22,-44.11 512.88,-43.45 509.98,-41.5 509.98,-41.5 509.98,-41.5 512.88,-43.45 511.74,-38.88 515.79,-45.4 515.79,-45.4\"/>\n",
       "<text text-anchor=\"start\" x=\"378.42\" y=\"-20.56\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
       "<text text-anchor=\"start\" x=\"375.92\" y=\"-5.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>7</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"334.94,-124.76 311.98,-106.76 334.94,-88.76 357.89,-106.76 334.94,-124.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"334.94\" y=\"-103.06\" font-family=\"Lato\" font-size=\"14.00\">7</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;7 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>3&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M258.39,-68.56C273.79,-76.35 297.5,-88.33 314.24,-96.8\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"320.51,-99.97 312.84,-99.62 317.38,-98.39 314.26,-96.81 314.26,-96.81 314.26,-96.81 317.38,-98.39 315.68,-94 320.51,-99.97 320.51,-99.97\"/>\n",
       "<text text-anchor=\"start\" x=\"282.46\" y=\"-104.56\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
       "<text text-anchor=\"start\" x=\"277.96\" y=\"-89.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>8</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"334.94,-222.76 311.98,-204.76 334.94,-186.76 357.89,-204.76 334.94,-222.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"334.94\" y=\"-201.06\" font-family=\"Lato\" font-size=\"14.00\">8</text>\n",
       "</g>\n",
       "<!-- 4&#45;&gt;8 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>4&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M259.64,-186.79C273.79,-190.21 294.25,-195.16 310.12,-199\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"317.05,-200.67 309.5,-202.09 313.65,-199.85 310.24,-199.03 310.24,-199.03 310.24,-199.03 313.65,-199.85 310.98,-195.97 317.05,-200.67 317.05,-200.67\"/>\n",
       "<text text-anchor=\"start\" x=\"281.46\" y=\"-213.56\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "<text text-anchor=\"start\" x=\"277.96\" y=\"-198.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;6 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>5&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M442.18,-129.03C460.14,-113.14 492.15,-84.82 511.36,-67.81\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"516.89,-62.92 513.73,-69.92 514.27,-65.24 511.65,-67.56 511.65,-67.56 511.65,-67.56 514.27,-65.24 509.56,-65.2 516.89,-62.92 516.89,-62.92\"/>\n",
       "<text text-anchor=\"start\" x=\"466.42\" y=\"-125.56\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
       "<text text-anchor=\"start\" x=\"463.92\" y=\"-110.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;7 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>5&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M409.86,-142.24C399.69,-142.52 386.71,-141.81 375.92,-137.76 366.67,-134.29 357.82,-127.88 350.82,-121.79\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"345.4,-116.81 352.69,-119.22 347.98,-119.18 350.56,-121.55 350.56,-121.55 350.56,-121.55 347.98,-119.18 348.43,-123.87 345.4,-116.81 345.4,-116.81\"/>\n",
       "<text text-anchor=\"start\" x=\"380.42\" y=\"-159.56\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
       "<text text-anchor=\"start\" x=\"375.92\" y=\"-144.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;3 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>6&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M505.57,-54.29C453.62,-55.57 322.27,-58.81 267.52,-60.15\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"260.31,-60.33 267.23,-57.01 263.81,-60.25 267.31,-60.16 267.31,-60.16 267.31,-60.16 263.81,-60.25 267.39,-63.31 260.31,-60.33 260.31,-60.33\"/>\n",
       "<text text-anchor=\"start\" x=\"379.42\" y=\"-75.56\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "<text text-anchor=\"start\" x=\"375.92\" y=\"-60.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 7&#45;&gt;5 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>7&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M352.29,-102.15C363.83,-99.77 379.4,-98.37 391.92,-103.76 400.16,-107.31 407.38,-113.87 413.08,-120.49\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"417.5,-126 410.66,-122.51 415.31,-123.27 413.12,-120.54 413.12,-120.54 413.12,-120.54 415.31,-123.27 415.57,-118.57 417.5,-126 417.5,-126\"/>\n",
       "<text text-anchor=\"start\" x=\"379.42\" y=\"-122.56\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "<text text-anchor=\"start\" x=\"375.92\" y=\"-107.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;4 -->\n",
       "<g id=\"edge15\" class=\"edge\">\n",
       "<title>8&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M327.6,-192.49C320.95,-181.1 309.32,-164.86 293.96,-157.76 282.73,-152.57 270.27,-158.46 260.47,-165.83\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"255.04,-170.26 258.47,-163.39 257.75,-168.04 260.47,-165.83 260.47,-165.83 260.47,-165.83 257.75,-168.04 262.46,-168.27 255.04,-170.26 255.04,-170.26\"/>\n",
       "<text text-anchor=\"start\" x=\"281.96\" y=\"-176.56\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
       "<text text-anchor=\"start\" x=\"277.96\" y=\"-161.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "</g>\n",
       "<!-- 9 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>9</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"427.92\" cy=\"-212.76\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"427.92\" y=\"-209.06\" font-family=\"Lato\" font-size=\"14.00\">9</text>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;9 -->\n",
       "<g id=\"edge16\" class=\"edge\">\n",
       "<title>8&#45;&gt;9</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M356.13,-206.53C369.86,-207.74 388.1,-209.35 402.62,-210.62\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"409.84,-211.26 402.59,-213.78 406.35,-210.95 402.86,-210.64 402.86,-210.64 402.86,-210.64 406.35,-210.95 403.14,-207.51 409.84,-211.26 409.84,-211.26\"/>\n",
       "<text text-anchor=\"start\" x=\"377.92\" y=\"-227.56\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
       "<text text-anchor=\"start\" x=\"375.92\" y=\"-212.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 10 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>10</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"black\" points=\"528.25,-229.76 498.08,-211.76 528.25,-193.76 558.41,-211.76 528.25,-229.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"528.25\" y=\"-208.06\" font-family=\"Lato\" font-size=\"14.00\">10</text>\n",
       "</g>\n",
       "<!-- 9&#45;&gt;10 -->\n",
       "<g id=\"edge17\" class=\"edge\">\n",
       "<title>9&#45;&gt;10</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M441.39,-200.41C447.61,-195.11 455.58,-189.52 463.92,-186.76 479.35,-181.65 496.47,-189.25 509.02,-197.37\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"514.78,-201.34 507.23,-199.96 511.9,-199.36 509.02,-197.37 509.02,-197.37 509.02,-197.37 511.9,-199.36 510.81,-194.78 514.78,-201.34 514.78,-201.34\"/>\n",
       "<text text-anchor=\"start\" x=\"467.42\" y=\"-205.56\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "<text text-anchor=\"start\" x=\"463.92\" y=\"-190.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 10&#45;&gt;9 -->\n",
       "<g id=\"edge18\" class=\"edge\">\n",
       "<title>10&#45;&gt;9</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M503.51,-215.16C491.63,-216.48 477.02,-217.51 463.92,-216.76 460.44,-216.56 456.77,-216.25 453.17,-215.89\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"445.97,-215.1 453.27,-212.73 449.45,-215.48 452.93,-215.87 452.93,-215.87 452.93,-215.87 449.45,-215.48 452.59,-219 445.97,-215.1 445.97,-215.1\"/>\n",
       "<text text-anchor=\"start\" x=\"467.42\" y=\"-235.56\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "<text text-anchor=\"start\" x=\"463.92\" y=\"-220.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
915
       "<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fa3979355d0> >"
916
917
      ]
     },
918
     "execution_count": 8,
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "game = spot.automaton(\"ltlsynt --ins=a --outs=b -f '!b & GFa <-> Gb' --print-game-hoa |\");\n",
    "game"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In the graphical output, player 0 is represented by circles (or ellipses or rounded rectangles depending on the situations), while player 1's states are diamond shaped.  In the case of `ltlsynt`, player 0 plays the role of the environment, and player 1 plays the role of the controler.\n",
    "\n",
    "In the HOA output, a header `spot-state-player` (or `spot.state-player` in HOA 1.1) lists the owner of each state."
   ]
  },
  {
   "cell_type": "code",
939
   "execution_count": 9,
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "HOA: v1\n",
      "States: 11\n",
      "Start: 0\n",
      "AP: 2 \"b\" \"a\"\n",
      "acc-name: parity max odd 3\n",
      "Acceptance: 3 Fin(2) & (Inf(1) | Fin(0))\n",
      "properties: trans-labels explicit-labels trans-acc colored complete\n",
      "properties: deterministic\n",
      "spot-state-player: 0 1 1 0 0 0 1 1 1 0 1\n",
      "--BODY--\n",
      "State: 0\n",
      "[!1] 1 {1}\n",
      "[1] 2 {1}\n",
      "State: 1\n",
      "[!0] 3 {1}\n",
      "[0] 4 {1}\n",
      "State: 2\n",
      "[0] 4 {1}\n",
      "[!0] 5 {1}\n",
      "State: 3\n",
      "[!1] 6 {1}\n",
      "[1] 7 {2}\n",
      "State: 4\n",
      "[t] 8 {2}\n",
      "State: 5\n",
      "[1] 7 {2}\n",
      "[!1] 6 {1}\n",
      "State: 6\n",
      "[t] 3 {1}\n",
      "State: 7\n",
      "[t] 5 {2}\n",
      "State: 8\n",
      "[0] 4 {2}\n",
      "[!0] 9 {1}\n",
      "State: 9\n",
      "[t] 10 {1}\n",
      "State: 10\n",
      "[t] 9 {1}\n",
      "--END--\n"
     ]
    }
   ],
   "source": [
    "print(game.to_str('hoa'))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
996
    "Here is the solution of this particular game."
997
998
999
1000
   ]
  },
  {
   "cell_type": "code",
1001
   "execution_count": 10,
1002
1003
1004
1005
1006
1007
1008
1009
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
1010
     "execution_count": 10,
1011
1012
1013
1014
1015
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
1016
    "spot.solve_parity_game(game)"
1017
1018
1019
1020
   ]
  },
  {
   "cell_type": "code",
1021
   "execution_count": 11,
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.43.0 (0)\n",
       " -->\n",
       "<!-- Pages: 1 -->\n",
       "<svg width=\"567pt\" height=\"338pt\"\n",
       " viewBox=\"0.00 0.00 566.58 337.76\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 333.76)\">\n",
       "<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-333.76 562.58,-333.76 562.58,4 -4,4\"/>\n",
       "<text text-anchor=\"start\" x=\"197.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
       "<text text-anchor=\"start\" x=\"220.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "<text text-anchor=\"start\" x=\"236.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\">) &amp; (Inf(</text>\n",
       "<text text-anchor=\"start\" x=\"282.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "<text text-anchor=\"start\" x=\"298.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\">) | Fin(</text>\n",
       "<text text-anchor=\"start\" x=\"336.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
       "<text text-anchor=\"start\" x=\"352.79\" y=\"-315.56\" font-family=\"Lato\" font-size=\"14.00\">))</text>\n",
       "<text text-anchor=\"start\" x=\"223.79\" y=\"-301.56\" font-family=\"Lato\" font-size=\"14.00\">[parity max odd 3]</text>\n",
       "<!-- I -->\n",
       "<!-- 0 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>0</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" cx=\"56\" cy=\"-171.76\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"56\" y=\"-168.06\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
       "</g>\n",
       "<!-- I&#45;&gt;0 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>I&#45;&gt;0</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1.15,-171.76C2.79,-171.76 17.15,-171.76 30.63,-171.76\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-171.76 30.94,-174.91 34.44,-171.76 30.94,-171.76 30.94,-171.76 30.94,-171.76 34.44,-171.76 30.94,-168.61 37.94,-171.76 37.94,-171.76\"/>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>1</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"148.98,-163.76 126.02,-145.76 148.98,-127.76 171.94,-145.76 148.98,-163.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"148.98\" y=\"-142.06\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;1 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>0&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M69.9,-159.68C76.09,-154.68 83.92,-149.43 92,-146.76 101.41,-143.65 112.21,-142.86 121.8,-143.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"128.85,-143.33 121.72,-146.18 125.35,-143.18 121.86,-143.04 121.86,-143.04 121.86,-143.04 125.35,-143.18 121.99,-139.89 128.85,-143.33 128.85,-143.33\"/>\n",
       "<text text-anchor=\"start\" x=\"94.5\" y=\"-165.56\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
       "<text text-anchor=\"start\" x=\"92\" y=\"-150.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>2</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"148.98,-217.76 126.02,-199.76 148.98,-181.76 171.94,-199.76 148.98,-217.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"148.98\" y=\"-196.06\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;2 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>0&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M73.69,-176.89C88.1,-181.33 109.07,-187.78 125.05,-192.7\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"132.01,-194.84 124.39,-195.79 128.66,-193.81 125.32,-192.78 125.32,-192.78 125.32,-192.78 128.66,-193.81 126.24,-189.77 132.01,-194.84 132.01,-194.84\"/>\n",
       "<text text-anchor=\"start\" x=\"96.5\" y=\"-205.56\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
       "<text text-anchor=\"start\" x=\"92\" y=\"-190.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>3</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"241.96\" cy=\"-60.76\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"241.96\" y=\"-57.06\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;3 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>1&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M160.06,-136.34C175.16,-122.24 203.86,-95.42 222.7,-77.82\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"228.21,-72.67 225.24,-79.75 225.65,-75.06 223.09,-77.45 223.09,-77.45 223.09,-77.45 225.65,-75.06 220.94,-75.15 228.21,-72.67 228.21,-72.67\"/>\n",
       "<text text-anchor=\"start\" x=\"191.96\" y=\"-126.56\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
       "<text text-anchor=\"start\" x=\"189.96\" y=\"-111.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>4</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" cx=\"241.96\" cy=\"-182.76\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"241.96\" y=\"-179.06\" font-family=\"Lato\" font-size=\"14.00\">4</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;4 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>1&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M170.91,-146.58C181.75,-147.62 194.98,-149.89 205.96,-154.76 212.12,-157.49 218.12,-161.58 223.37,-165.8\"/>\n",
       "<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"228.73,-170.36 221.36,-168.22 225.74,-168.48 223.08,-166.21 223.4,-165.83 223.72,-165.44 226.39,-167.71 225.44,-163.43 228.73,-170.36 228.73,-170.36\"/>\n",
       "<text text-anchor=\"start\" x=\"193.96\" y=\"-173.56\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
       "<text text-anchor=\"start\" x=\"189.96\" y=\"-158.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;4 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>2&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M167.95,-196.4C181.93,-193.79 201.45,-190.14 216.79,-187.27\"/>\n",
       "<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"223.94,-185.94 217.64,-190.32 220.6,-187.07 217.15,-187.72 217.06,-187.22 216.97,-186.73 220.41,-186.09 216.48,-184.13 223.94,-185.94 223.94,-185.94\"/>\n",
       "<text text-anchor=\"start\" x=\"193.96\" y=\"-210.56\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
       "<text text-anchor=\"start\" x=\"189.96\" y=\"-195.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>5</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" cx=\"427.92\" cy=\"-140.76\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"427.92\" y=\"-137.06\" font-family=\"Lato\" font-size=\"14.00\">5</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;5 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>2&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M160.75,-208.85C168.39,-214.75 179.16,-222.01 189.96,-225.76 275.06,-255.28 319.26,-296.01 391.92,-242.76 413.34,-227.05 401.22,-210.86 409.92,-185.76 412.38,-178.66 415.21,-170.99 417.85,-164.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"420.4,-157.35 420.84,-165.01 419.15,-160.62 417.9,-163.89 417.9,-163.89 417.9,-163.89 419.15,-160.62 414.96,-162.76 420.4,-157.35 420.4,-157.35\"/>\n",
       "<text text-anchor=\"start\" x=\"279.96\" y=\"-282.56\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
       "<text text-anchor=\"start\" x=\"277.96\" y=\"-267.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>6</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"528.25,-71.76 505.29,-53.76 528.25,-35.76 551.21,-53.76 528.25,-71.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"528.25\" y=\"-50.06\" font-family=\"Lato\" font-size=\"14.00\">6</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;6 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>3&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M257.63,-51.19C263.78,-47.39 271.08,-43.12 277.96,-39.76 319.9,-19.23 330.01,-10.35 375.92,-1.76 425.97,7.61 481.93,-23.1 509.68,-41.29\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"515.79,-45.4 508.22,-44.11 512.88,-43.45 509.98,-41.5 509.98,-41.5 509.98,-41.5 512.88,-43.45 511.74,-38.88 515.79,-45.4 515.79,-45.4\"/>\n",
       "<text text-anchor=\"start\" x=\"378.42\" y=\"-20.56\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
       "<text text-anchor=\"start\" x=\"375.92\" y=\"-5.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>7</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"334.94,-124.76 311.98,-106.76 334.94,-88.76 357.89,-106.76 334.94,-124.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"334.94\" y=\"-103.06\" font-family=\"Lato\" font-size=\"14.00\">7</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;7 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>3&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M258.39,-68.56C273.79,-76.35 297.5,-88.33 314.24,-96.8\"/>\n",
       "<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"320.51,-99.97 312.84,-99.62 317.16,-98.84 314.03,-97.26 314.26,-96.81 314.49,-96.36 317.61,-97.94 315.68,-94 320.51,-99.97 320.51,-99.97\"/>\n",
       "<text text-anchor=\"start\" x=\"282.46\" y=\"-104.56\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
       "<text text-anchor=\"start\" x=\"277.96\" y=\"-89.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>8</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"334.94,-222.76 311.98,-204.76 334.94,-186.76 357.89,-204.76 334.94,-222.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"334.94\" y=\"-201.06\" font-family=\"Lato\" font-size=\"14.00\">8</text>\n",
       "</g>\n",
       "<!-- 4&#45;&gt;8 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>4&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M259.64,-186.79C273.79,-190.21 294.25,-195.16 310.12,-199\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"317.05,-200.67 309.5,-202.09 313.65,-199.85 310.24,-199.03 310.24,-199.03 310.24,-199.03 313.65,-199.85 310.98,-195.97 317.05,-200.67 317.05,-200.67\"/>\n",
       "<text text-anchor=\"start\" x=\"281.46\" y=\"-213.56\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "<text text-anchor=\"start\" x=\"277.96\" y=\"-198.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;6 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>5&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M442.18,-129.03C460.14,-113.14 492.15,-84.82 511.36,-67.81\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"516.89,-62.92 513.73,-69.92 514.27,-65.24 511.65,-67.56 511.65,-67.56 511.65,-67.56 514.27,-65.24 509.56,-65.2 516.89,-62.92 516.89,-62.92\"/>\n",
       "<text text-anchor=\"start\" x=\"466.42\" y=\"-125.56\" font-family=\"Lato\" font-size=\"14.00\">!a</text>\n",
       "<text text-anchor=\"start\" x=\"463.92\" y=\"-110.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;7 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>5&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"#e31a1c\" stroke-width=\"2\" d=\"M409.86,-142.24C399.69,-142.52 386.71,-141.81 375.92,-137.76 366.67,-134.29 357.82,-127.88 350.82,-121.79\"/>\n",
       "<polygon fill=\"#e31a1c\" stroke=\"#e31a1c\" stroke-width=\"2\" points=\"345.4,-116.81 352.69,-119.22 348.32,-118.81 350.9,-121.18 350.56,-121.55 350.22,-121.91 347.64,-119.55 348.43,-123.87 345.4,-116.81 345.4,-116.81\"/>\n",
       "<text text-anchor=\"start\" x=\"380.42\" y=\"-159.56\" font-family=\"Lato\" font-size=\"14.00\">a</text>\n",
       "<text text-anchor=\"start\" x=\"375.92\" y=\"-144.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;3 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>6&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M505.57,-54.29C453.62,-55.57 322.27,-58.81 267.52,-60.15\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"260.31,-60.33 267.23,-57.01 263.81,-60.25 267.31,-60.16 267.31,-60.16 267.31,-60.16 263.81,-60.25 267.39,-63.31 260.31,-60.33 260.31,-60.33\"/>\n",
       "<text text-anchor=\"start\" x=\"379.42\" y=\"-75.56\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "<text text-anchor=\"start\" x=\"375.92\" y=\"-60.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 7&#45;&gt;5 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>7&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M352.29,-102.15C363.83,-99.77 379.4,-98.37 391.92,-103.76 400.16,-107.31 407.38,-113.87 413.08,-120.49\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"417.5,-126 410.66,-122.51 415.31,-123.27 413.12,-120.54 413.12,-120.54 413.12,-120.54 415.31,-123.27 415.57,-118.57 417.5,-126 417.5,-126\"/>\n",
       "<text text-anchor=\"start\" x=\"379.42\" y=\"-122.56\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "<text text-anchor=\"start\" x=\"375.92\" y=\"-107.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;4 -->\n",
       "<g id=\"edge15\" class=\"edge\">\n",
       "<title>8&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M327.6,-192.49C320.95,-181.1 309.32,-164.86 293.96,-157.76 282.73,-152.57 270.27,-158.46 260.47,-165.83\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"255.04,-170.26 258.47,-163.39 257.75,-168.04 260.47,-165.83 260.47,-165.83 260.47,-165.83 257.75,-168.04 262.46,-168.27 255.04,-170.26 255.04,-170.26\"/>\n",
       "<text text-anchor=\"start\" x=\"281.96\" y=\"-176.56\" font-family=\"Lato\" font-size=\"14.00\">b</text>\n",
       "<text text-anchor=\"start\" x=\"277.96\" y=\"-161.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
       "</g>\n",
       "<!-- 9 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>9</title>\n",
       "<ellipse fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" cx=\"427.92\" cy=\"-212.76\" rx=\"18\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"427.92\" y=\"-209.06\" font-family=\"Lato\" font-size=\"14.00\">9</text>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;9 -->\n",
       "<g id=\"edge16\" class=\"edge\">\n",
       "<title>8&#45;&gt;9</title>\n",
       "<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M356.13,-206.53C369.86,-207.74 388.1,-209.35 402.62,-210.62\"/>\n",
       "<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"409.84,-211.26 402.59,-213.78 406.31,-211.45 402.82,-211.14 402.86,-210.64 402.91,-210.15 406.39,-210.45 403.14,-207.51 409.84,-211.26 409.84,-211.26\"/>\n",
       "<text text-anchor=\"start\" x=\"377.92\" y=\"-227.56\" font-family=\"Lato\" font-size=\"14.00\">!b</text>\n",
       "<text text-anchor=\"start\" x=\"375.92\" y=\"-212.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 10 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>10</title>\n",
       "<polygon fill=\"#ffffaa\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"528.25,-229.76 498.08,-211.76 528.25,-193.76 558.41,-211.76 528.25,-229.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"528.25\" y=\"-208.06\" font-family=\"Lato\" font-size=\"14.00\">10</text>\n",
       "</g>\n",
       "<!-- 9&#45;&gt;10 -->\n",
       "<g id=\"edge17\" class=\"edge\">\n",
       "<title>9&#45;&gt;10</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M441.39,-200.41C447.61,-195.11 455.58,-189.52 463.92,-186.76 479.35,-181.65 496.47,-189.25 509.02,-197.37\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"514.78,-201.34 507.23,-199.96 511.9,-199.36 509.02,-197.37 509.02,-197.37 509.02,-197.37 511.9,-199.36 510.81,-194.78 514.78,-201.34 514.78,-201.34\"/>\n",
       "<text text-anchor=\"start\" x=\"467.42\" y=\"-205.56\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "<text text-anchor=\"start\" x=\"463.92\" y=\"-190.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "<!-- 10&#45;&gt;9 -->\n",
       "<g id=\"edge18\" class=\"edge\">\n",
       "<title>10&#45;&gt;9</title>\n",
       "<path fill=\"none\" stroke=\"#33a02c\" stroke-width=\"2\" d=\"M503.51,-215.16C491.63,-216.48 477.02,-217.51 463.92,-216.76 460.44,-216.56 456.77,-216.25 453.17,-215.89\"/>\n",
       "<polygon fill=\"#33a02c\" stroke=\"#33a02c\" stroke-width=\"2\" points=\"445.97,-215.1 453.27,-212.73 449.51,-214.99 452.98,-215.37 452.93,-215.87 452.88,-216.36 449.4,-215.98 452.59,-219 445.97,-215.1 445.97,-215.1\"/>\n",
       "<text text-anchor=\"start\" x=\"467.42\" y=\"-235.56\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
       "<text text-anchor=\"start\" x=\"463.92\" y=\"-220.56\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
1258
       "<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7fa37f087db0> >"
1259
1260
      ]
     },
1261
     "execution_count": 11,
1262
1263
1264
1265
1266
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
1267
    "spot.highlight_strategy(game)"
1268
   ]
1269
1270
1271
1272
1273
1274
1275
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
1294
   "version": "3.9.1rc1"
1295
1296
1297
1298
1299
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}