You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -373,159 +373,6 @@ maxNumberEquilibria List := d -> (
373
373
mv
374
374
)
375
375
376
-
beginDocumentation()
377
-
378
-
doc ///
379
-
Node
380
-
Key
381
-
GameTheory
382
-
Headline
383
-
a Package
384
-
Description
385
-
Text
386
-
Computations in game theory.
387
-
Caveat
388
-
Nothing here yet.
389
-
Subnodes
390
-
"Ideals of Nash equilibria"
391
-
Node
392
-
Key
393
-
"Ideals of Nash equilibria"
394
-
Headline
395
-
computing the idealof a totally mixed Nash equilibria
396
-
Description
397
-
Text
398
-
This package provides methodsfor constructing the mixed probability polynomial rings and computing the Nash equilibrium polynomials and ideals, as well as the maxnumberof isolated totally mixed Nash Equilibra via polyhedral methods. It depends on the Polyhedrapackage. An introduction together with the relevant definitions is given in Chapter 6, Sturmfels, Bernd, @EM"Solving Systems of Polynomial Equations"@. American Mathematical Society, 2002. ISBN 978-0-8218-3251-6.
399
-
Text
400
-
This package uses the following functions in the @TOPolyhedra@ package:
401
-
Text
402
-
@UL {
403
-
{TO convexHull},
404
-
{TOdirectProduct},
405
-
{TO mixedVolume},
406
-
{TO simplex},
407
-
}@
408
-
Subnodes
409
-
nashEquilibriumRing
410
-
nashEquilibriumIdeal
411
-
maxNumberEquilibria
412
-
Node
413
-
Key
414
-
(nashEquilibriumRing, List)
415
-
nashEquilibriumRing
416
-
Headline
417
-
make the Nash Equilibrium ring
418
-
Usage
419
-
nashEquilibriumRing L
420
-
Inputs
421
-
L:List
422
-
a listof n-@TO Tensor@s with uniform dimensions
423
-
Outputs
424
-
:Ring
425
-
a polynomial ring generated from the mixed probabilities
426
-
Description
427
-
Text
428
-
An $n$-player game consists of players labeled with $0,1,\cdots, n-1$. The $i$-th player can choose from $d_i$ pure strategies. Let $p_{i,j}$ be the probablility of the $i$-th player choosing the $j$-the strategy, where $j=0,\cdots, d_j-1$. The idealof the totally mixed Nash equilibria of the game is defined in the polynomial ring over a field $k$ with generators $\{p_{i,j}:0\leq i\leq n-1, 0\leq j\leq d_j-1\}$.
429
-
430
-
This method computes this ring over $k=\mathbb{Q}$ from a listof tensors representing the payoff matrices ofall the $n$ players. The ringgenerators are ordered lexicographically.
431
-
Example
432
-
tensors = apply(3, i -> randomTensor {2,4,3})
433
-
R = nashEquilibriumRing tensors
434
-
baseRing R
435
-
gens R
436
-
Node
437
-
Key
438
-
(nashEquilibriumIdeal, Ring, List)
439
-
nashEquilibriumIdeal
440
-
Headline
441
-
make the Nash Equilibrium ideal
442
-
Usage
443
-
nashEquilibriumIdeal(R, L)
444
-
Inputs
445
-
R:Ring
446
-
the Nash Equilibrium ring. Typically obtained via @TO nashEquilibriumRing@
447
-
L:List
448
-
a listof payoff tensors
449
-
Outputs
450
-
:Ideal
451
-
An idealin the Nash Equilibrium ring R generated by the Nash equilibrium polynomials, along with the linear relationsof those probabilities variables, that the probabilities of each players sumto1
452
-
Description
453
-
Text
454
-
For an $n$-player game, the totally mixed Nash equilibria are the zero loci in the interior of the polytope of a system of polynomials in the variables $\{p_{i,j}:0\leq i\leq n-1, 0\leq j\leq d_j-1\}$. The coefficientsof these polynomials are differences of the entriesof the payoff matrices. From an algebraic-geometric point of view, these polynomials, together with the linear constraints that $\sum_j p_{i,j}=1$ for each $i$, generate an idealin the polynomial ring computed by @TO nashEquilibriumRing@.
455
-
456
-
This method computes this Nash equilibrium ideal by generating the polynomials from the payoff matrices first, and appending the linear relations that the sumof probabilities for each player is one.
457
-
Example
458
-
tensors = apply(3, i -> randomTensor {2,2,2})
459
-
R = nashEquilibriumRing tensors
460
-
gens R
461
-
I = nashEquilibriumIdeal(R, tensors)
462
-
Text
463
-
Here the embient ring $R$ is explicitly computed before finding the ideal $I$. Alternatively, one can assign both the ringand the idealto variables in the same line:
compute the maximum numberof totally mixed Nash equilibria
473
-
Usage
474
-
maxNumberEquilibria L
475
-
Inputs
476
-
L:List
477
-
a listof integers representing the dimensions of the game
478
-
Outputs
479
-
:ZZ
480
-
an integer value, the mixed volume, representing the maximum numberof totally mixed Nash equilibria
481
-
Description
482
-
Text
483
-
For an $n$-player game where the $i$-th player has $d_i$ pure strategies, the maximum numberof isolated totally mixed Nash equilibria is given by the mixed volume of the following listof polytopes:
This function first generates a tuple of delta polytopes from d, computes their mixed volume, prints a summary message, and returns the mixed volume. The mixed volume is computed via the function @TO mixedVolume@ in the @TO polyhedra@ package. This function currently runs very slow for higher dimension and requires improvement.
492
-
Example
493
-
d = {2,2,2}
494
-
mv = maxNumberEquilibria d
495
-
Text
496
-
Alternatively, if you have a tensor $T$, you can compute its maximum number as follows:
497
-
Example
498
-
T = randomTensor {2,2,2}
499
-
mv2 = maxNumberEquilibria format T
500
-
Node
501
-
Key
502
-
Tensor
503
-
Headline
504
-
representing the payoff matrices
505
-
///
506
-
507
-
TEST ///
508
-
-- Test nashEquilibriumRing with a list of tensors
509
-
tensorList = apply(3, i -> randomTensor {2,2,2})
510
-
R5 = nashEquilibriumRing tensorList
511
-
assert(numgens R5 > 0)
512
-
513
-
-- Test nashEquilibriumIdeal construction
514
-
I = nashEquilibriumIdeal(R5, tensorList)
515
-
assert(isIdeal I)
516
-
517
-
-- Test maxNumberEquilibria (prints and returns the mixed volume)
518
-
mv = maxNumberEquilibria {2,2,2}
519
-
assert(mv == 2)
520
-
521
-
-- Test maxNumberEquilibria using a tensor's format
522
-
T2 = randomTensor {2,2,2}
523
-
mv2 = maxNumberEquilibria format T2
524
-
assert(mv2 == 2)
525
-
///
526
-
527
-
end--
528
-
529
376
530
377
531
378
--***************************************--
@@ -921,6 +768,140 @@ doc ///
921
768
assemblePlayeriPolynomials
922
769
///
923
770
771
+
----------------------------------------
772
+
-- Documentation NashEquilibriumIdeal --
773
+
----------------------------------------
774
+
775
+
beginDocumentation()
776
+
777
+
doc ///
778
+
Node
779
+
Key
780
+
GameTheory
781
+
Headline
782
+
a Package
783
+
Description
784
+
Text
785
+
Computations in game theory.
786
+
Caveat
787
+
Nothing here yet.
788
+
Subnodes
789
+
"Ideals of Nash equilibria"
790
+
Node
791
+
Key
792
+
"Ideals of Nash equilibria"
793
+
Headline
794
+
computing the idealof a totally mixed Nash equilibria
795
+
Description
796
+
Text
797
+
This package provides methodsfor constructing the mixed probability polynomial rings and computing the Nash equilibrium polynomials and ideals, as well as the maxnumberof isolated totally mixed Nash Equilibra via polyhedral methods. It depends on the Polyhedrapackage. An introduction together with the relevant definitions is given in Chapter 6, Sturmfels, Bernd, @EM"Solving Systems of Polynomial Equations"@. American Mathematical Society, 2002. ISBN 978-0-8218-3251-6.
798
+
Text
799
+
This package uses the following functions in the @TOPolyhedra@ package:
800
+
Text
801
+
@UL {
802
+
{TO convexHull},
803
+
{TOdirectProduct},
804
+
{TO mixedVolume},
805
+
{TO simplex},
806
+
}@
807
+
Subnodes
808
+
nashEquilibriumRing
809
+
nashEquilibriumIdeal
810
+
maxNumberEquilibria
811
+
Node
812
+
Key
813
+
(nashEquilibriumRing, List)
814
+
nashEquilibriumRing
815
+
Headline
816
+
make the Nash Equilibrium ring
817
+
Usage
818
+
nashEquilibriumRing L
819
+
Inputs
820
+
L:List
821
+
a listof n-@TO Tensor@s with uniform dimensions
822
+
Outputs
823
+
:Ring
824
+
a polynomial ring generated from the mixed probabilities
825
+
Description
826
+
Text
827
+
An $n$-player game consists of players labeled with $0,1,\cdots, n-1$. The $i$-th player can choose from $d_i$ pure strategies. Let $p_{i,j}$ be the probablility of the $i$-th player choosing the $j$-the strategy, where $j=0,\cdots, d_j-1$. The idealof the totally mixed Nash equilibria of the game is defined in the polynomial ring over a field $k$ with generators $\{p_{i,j}:0\leq i\leq n-1, 0\leq j\leq d_j-1\}$.
828
+
829
+
This method computes this ring over $k=\mathbb{Q}$ from a listof tensors representing the payoff matrices ofall the $n$ players. The ringgenerators are ordered lexicographically.
830
+
Example
831
+
tensors = apply(3, i -> randomTensor {2,4,3})
832
+
R = nashEquilibriumRing tensors
833
+
baseRing R
834
+
gens R
835
+
Node
836
+
Key
837
+
(nashEquilibriumIdeal, Ring, List)
838
+
nashEquilibriumIdeal
839
+
Headline
840
+
make the Nash Equilibrium ideal
841
+
Usage
842
+
nashEquilibriumIdeal(R, L)
843
+
Inputs
844
+
R:Ring
845
+
the Nash Equilibrium ring. Typically obtained via @TO nashEquilibriumRing@
846
+
L:List
847
+
a listof payoff tensors
848
+
Outputs
849
+
:Ideal
850
+
An idealin the Nash Equilibrium ring R generated by the Nash equilibrium polynomials, along with the linear relationsof those probabilities variables, that the probabilities of each players sumto1
851
+
Description
852
+
Text
853
+
For an $n$-player game, the totally mixed Nash equilibria are the zero loci in the interior of the polytope of a system of polynomials in the variables $\{p_{i,j}:0\leq i\leq n-1, 0\leq j\leq d_j-1\}$. The coefficientsof these polynomials are differences of the entriesof the payoff matrices. From an algebraic-geometric point of view, these polynomials, together with the linear constraints that $\sum_j p_{i,j}=1$ for each $i$, generate an idealin the polynomial ring computed by @TO nashEquilibriumRing@.
854
+
855
+
This method computes this Nash equilibrium ideal by generating the polynomials from the payoff matrices first, and appending the linear relations that the sumof probabilities for each player is one.
856
+
Example
857
+
tensors = apply(3, i -> randomTensor {2,2,2})
858
+
R = nashEquilibriumRing tensors
859
+
gens R
860
+
I = nashEquilibriumIdeal(R, tensors)
861
+
Text
862
+
Here the embient ring $R$ is explicitly computed before finding the ideal $I$. Alternatively, one can assign both the ringand the idealto variables in the same line:
compute the maximum numberof totally mixed Nash equilibria
872
+
Usage
873
+
maxNumberEquilibria L
874
+
Inputs
875
+
L:List
876
+
a listof integers representing the dimensions of the game
877
+
Outputs
878
+
:ZZ
879
+
an integer value, the mixed volume, representing the maximum numberof totally mixed Nash equilibria
880
+
Description
881
+
Text
882
+
For an $n$-player game where the $i$-th player has $d_i$ pure strategies, the maximum numberof isolated totally mixed Nash equilibria is given by the mixed volume of the following listof polytopes:
This function first generates a tuple of delta polytopes from d, computes their mixed volume, prints a summary message, and returns the mixed volume. The mixed volume is computed via the function @TO mixedVolume@ in the @TO polyhedra@ package. This function currently runs very slow for higher dimension and requires improvement.
891
+
Example
892
+
d = {2,2,2}
893
+
mv = maxNumberEquilibria d
894
+
Text
895
+
Alternatively, if you have a tensor $T$, you can compute its maximum number as follows:
896
+
Example
897
+
T = randomTensor {2,2,2}
898
+
mv2 = maxNumberEquilibria format T
899
+
Node
900
+
Key
901
+
Tensor
902
+
Headline
903
+
representing the payoff matrices
904
+
///
924
905
925
906
----------------------------------------
926
907
-- Documentation toMarkovRing --
@@ -1433,7 +1414,29 @@ assert(class CE === Polyhedron)
1433
1414
assert(#vertices CE > ------
1434
1415
///
1435
1416
1417
+
---------------------------------
1418
+
--- TEST nashEquilibriumIdeal ---
1419
+
---------------------------------
1420
+
1421
+
TEST ///
1422
+
-- Test nashEquilibriumRing with a list of tensors
1423
+
tensorList = apply(3, i -> randomTensor {2,2,2})
1424
+
R5 = nashEquilibriumRing tensorList
1425
+
assert(numgens R5 > 0)
1426
+
1427
+
-- Test nashEquilibriumIdeal construction
1428
+
I = nashEquilibriumIdeal(R5, tensorList)
1429
+
assert(isIdeal I)
1436
1430
1431
+
-- Test maxNumberEquilibria (prints and returns the mixed volume)
1432
+
mv = maxNumberEquilibria {2,2,2}
1433
+
assert(mv == 2)
1434
+
1435
+
-- Test maxNumberEquilibria using a tensor's format
0 commit comments