X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dunshire.git;a=blobdiff_plain;f=dunshire%2Fgames.py;h=ae1426a2c611f7e315f94fc5fea0e98f1da0905b;hp=a1ac0f54c2982cd59b25cc479293c4e3dc558e44;hb=cd77ba5250ed98ece623730c26af845366847487;hpb=60f232a1669856e3b061632ede2509789be1e1d8 diff --git a/dunshire/games.py b/dunshire/games.py index a1ac0f5..ae1426a 100644 --- a/dunshire/games.py +++ b/dunshire/games.py @@ -853,6 +853,15 @@ class SymmetricLinearGame: self._L_specnorm_value = specnorm(self.L()) return self._L_specnorm_value + def epsilon_scale(self, solution): + # Don't return anything smaller than 1... we can't go below + # out "minimum tolerance." + norm_p1_opt = norm(solution.player1_optimal()) + norm_p2_opt = norm(solution.player2_optimal()) + scale = self._L_specnorm()*(norm_p1_opt + norm_p2_opt) + return max(1, scale) + + def solution(self): """ Solve this linear game and return a :class:`Solution`.