From: Michael Orlitzky Date: Wed, 9 Nov 2016 14:23:23 +0000 (-0500) Subject: Replace _try_solution() with something more reliable and update tests. X-Git-Tag: 0.1.0~62 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=13b585b28aaacb1d603c3ae41614bacf613afa14;hp=13b585b28aaacb1d603c3ae41614bacf613afa14;p=dunshire.git Replace _try_solution() with something more reliable and update tests. This huge change eliminates _try_solution() entirely. It turns out that if we just solve with the default tolerance and then *test* what we get back (regardless of the "status" field), we do better than the two-phase _try_solution() approach. Well, we fail less, anyway. The code for solution is now fairly simple. It solves the problem, and if it isn't infeasible, checks the solution for sanity: the primal/dual values are close (within 2*ABS_TOL) and the optimal points are in the cone. If those two things are true, we return the solution even if CVXOPT said "unknown". This fixes two test failures, which are now included as doctests to ensure that they can be solved. Moreover, the value of a game is now set to be the payoff at the optimal points. Before, we simply took the primal optimal value from CVXOPT. That was causing some test failures though, and either one is just as good as the other and mathematically unjustified as yet. There were existing tests to check the payoff at the optimal points, but they became redundant and were removed. Finally, all of the tests have been updated to use more conservative modifiers, not based on the condition number of the game. Some failures are still being ironed out, but they are rare. Note: the _c(), _h(), etc. methods on the game are now overkill since they are only used once, but they don't hurt I guess. ---