X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=doc%2FREADME.rst;h=71876c6271b7912198acd51aa41afef0f7ef6adc;hb=b29d7c33db5a796778ae477329306e4f4531725a;hp=46407670a2ad0b3d57a9ec8cff98a9f792c1f186;hpb=82e5057f3954a56df76d7e52101f86f3758d3bb3;p=dunshire.git diff --git a/doc/README.rst b/doc/README.rst index 4640767..71876c6 100644 --- a/doc/README.rst +++ b/doc/README.rst @@ -63,40 +63,43 @@ game over both of those cones. First, we use the nonnegative orthant in :math:`\mathbb{R}^{2}`: ->>> from dunshire import * ->>> K = NonnegativeOrthant(2) ->>> L = [[1,0],[0,1]] ->>> e1 = [1,1] ->>> e2 = e1 ->>> G = SymmetricLinearGame(L,K,e1,e2) ->>> print(G.solution()) -Game value: 0.5000000 -Player 1 optimal: - [0.5000000] - [0.5000000] -Player 2 optimal: - [0.5000000] - [0.5000000] +.. doctest:: + + >>> from dunshire import * + >>> K = NonnegativeOrthant(2) + >>> L = [[1,0],[0,1]] + >>> e1 = [1,1] + >>> e2 = e1 + >>> G = SymmetricLinearGame(L,K,e1,e2) + >>> print(G.solution()) + Game value: 0.5000000 + Player 1 optimal: + [0.5000000] + [0.5000000] + Player 2 optimal: + [0.5000000] + [0.5000000] Next we try the Lorentz ice-cream cone in :math:`\mathbb{R}^{2}`: ->>> from dunshire import * ->>> K = IceCream(2) ->>> L = [[1,0],[0,1]] ->>> e1 = [1,1] ->>> e2 = e1 ->>> G = SymmetricLinearGame(L,K,e1,e2) ->>> print(G.solution()) -Game value: 0.5000000 -Player 1 optimal: - [0.5000000] - [0.5000000] -Player 2 optimal: - [0.5000000] - [0.5000000] - -(The answer when :math:`L`, :math:`e_{1}`, and :math:`e_{2}` are so -simple is independent of the cone.) +.. doctest:: + + >>> from dunshire import * + >>> K = IceCream(2) + >>> L = [[1,0],[0,1]] + >>> e1 = [1,1] + >>> e2 = e1 + >>> G = SymmetricLinearGame(L,K,e1,e2) + >>> print(G.solution()) + Game value: 0.5000000 + Player 1 optimal: + [0.8347039] + [0.1652961] + Player 2 optimal: + [0.5000000] + [0.5000000] + +Note that these solutions are not unique, although the game values are. Requirements ------------