noregret 0.0.0.dev2__tar.gz → 0.0.0.dev3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: noregret
3
- Version: 0.0.0.dev2
3
+ Version: 0.0.0.dev3
4
4
  Summary: No-regret learning dynamics
5
5
  Home-page: https://github.com/uoftcprg/noregret
6
6
  Author: Universal, Open, Free, and Transparent Computer Poker Research Group
@@ -388,7 +388,7 @@ class BlumMansour(ProbabilitySimplexSwapRegretMinimizer):
388
388
  self.previous_strategy[a] * prediction,
389
389
  )
390
390
 
391
- strategy = stationary_distribution(self.outputs)
391
+ strategy = stationary_distribution(self.outputs.T)
392
392
 
393
393
  self.strategies.append(strategy)
394
394
 
@@ -46,7 +46,11 @@ def euclidean_projection_on_probability_simplex(input_):
46
46
 
47
47
  def stationary_distribution(stochastic_matrix):
48
48
  P = stochastic_matrix
49
- eigenvalues, eigenvectors = LA.eig(P)
49
+
50
+ if not np.allclose(P.sum(1), 1):
51
+ raise ValueError('matrix not left stochastic')
52
+
53
+ eigenvalues, eigenvectors = LA.eig(P.T)
50
54
  pi = eigenvectors[:, np.isclose(eigenvalues, 1)][:, 0]
51
55
  pi /= pi.sum()
52
56
  pi = pi.real
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: noregret
3
- Version: 0.0.0.dev2
3
+ Version: 0.0.0.dev3
4
4
  Summary: No-regret learning dynamics
5
5
  Home-page: https://github.com/uoftcprg/noregret
6
6
  Author: Universal, Open, Free, and Transparent Computer Poker Research Group
@@ -4,7 +4,7 @@ from setuptools import find_packages, setup
4
4
 
5
5
  setup(
6
6
  name='noregret',
7
- version='0.0.0.dev2',
7
+ version='0.0.0.dev3',
8
8
  description='No-regret learning dynamics',
9
9
  long_description=open('README.md').read(),
10
10
  long_description_content_type='text/markdown',
File without changes
File without changes
File without changes