From: Michael Orlitzky Date: Thu, 3 Nov 2016 12:08:31 +0000 (-0400) Subject: Pass ABS_TOL to CVXOPT when solving games. X-Git-Tag: 0.1.0~76 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=aea70b13ddca62b0f6294083fd8130495d9a331e;p=dunshire.git Pass ABS_TOL to CVXOPT when solving games. Our ABS_TOL is less than the CVXOPT default, and it looks like using ours reduces the number of "unknown" results that we get. So let's try that for now. --- diff --git a/dunshire/games.py b/dunshire/games.py index 1f672ab..c2ca68e 100644 --- a/dunshire/games.py +++ b/dunshire/games.py @@ -12,8 +12,6 @@ from .matrices import append_col, append_row, condition_number, identity from . import options printing.options['dformat'] = options.FLOAT_FORMAT -solvers.options['show_progress'] = options.VERBOSE - class Solution: """ @@ -467,6 +465,8 @@ class SymmetricLinearGame: # Actually solve the thing and obtain a dictionary describing # what happened. try: + solvers.options['show_progress'] = options.VERBOSE + solvers.options['abs_tol'] = options.ABS_TOL soln_dict = solvers.conelp(c, self._G(), h, C.cvxopt_dims(), self._A(), b) except ValueError as e: @@ -511,7 +511,7 @@ class SymmetricLinearGame: # value could be under the true optimal by ``ABS_TOL`` # and the dual value could be over by the same amount. # - if abs(p1_value - p2_value) > 2*options.ABS_TOL: + if abs(p1_value - p2_value) > options.ABS_TOL: raise GameUnsolvableException(self, soln_dict) if (p1_optimal not in self._K) or (p2_optimal not in self._K): raise GameUnsolvableException(self, soln_dict)