]> gitweb.michael.orlitzky.com - dunshire.git/log
dunshire.git
8 years agoAdd more docs for a few private methods and implement the do-over.
Michael Orlitzky [Thu, 3 Nov 2016 19:56:22 +0000 (15:56 -0400)]
Add more docs for a few private methods and implement the do-over.

Some examples and return type documentation were added for the
_zero(), _A(), and _G() methods of SymmetricLinearGame. The _zero()
method was also uncached, since attempting to cache _A() and _G()
revealed that CVXOPT clobbers them. The zero vector appears safe, but
let's play it safe.

This also implements a two-stage retry for the solution of a game. Our
default tolerance is now 1e-6, but when we're trying to solve a game,
we try it with 1e7 first. If we can solve it with the stricter
tolerance, then great. If not, we use the default.

8 years agoTake the condition number into account when evaluating test results.
Michael Orlitzky [Thu, 3 Nov 2016 18:29:21 +0000 (14:29 -0400)]
Take the condition number into account when evaluating test results.

This adds a ``modifier`` parameter to the assert_within_tol() method
used in the SymmetricLinearGame unit tests. The condition number of
the game is always passed in as the modifier, and that lets us allow a
larger tolerance for nasty matrices.

8 years agoPass ABS_TOL to CVXOPT when solving games.
Michael Orlitzky [Thu, 3 Nov 2016 12:08:31 +0000 (08:08 -0400)]
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.

8 years agoChange EPSILON to something more conservative in the test suite.
Michael Orlitzky [Thu, 3 Nov 2016 12:06:45 +0000 (08:06 -0400)]
Change EPSILON to something more conservative in the test suite.

The old value of EPSILON was more lenient, but the new one can
actually be justified. The tests are currently pretty reliable, but
some tolerance > EPSILON failures are still occurring so this will
probably need to be massaged some more.

8 years agoSet MAX_COND to 100 in the randomgen module to facilitate random testing.
Michael Orlitzky [Thu, 3 Nov 2016 12:06:18 +0000 (08:06 -0400)]
Set MAX_COND to 100 in the randomgen module to facilitate random testing.

8 years agoChange the default tolerance to 1e-6 to reduce unknown solutions.
Michael Orlitzky [Thu, 3 Nov 2016 12:04:42 +0000 (08:04 -0400)]
Change the default tolerance to 1e-6 to reduce unknown solutions.

8 years agoEnsure that e1,e2 are far enough inside K in random_orthant_game().
Michael Orlitzky [Tue, 1 Nov 2016 23:09:39 +0000 (19:09 -0400)]
Ensure that e1,e2 are far enough inside K in random_orthant_game().

8 years agoAdd more doctest examples to the randomgen module.
Michael Orlitzky [Tue, 1 Nov 2016 22:58:18 +0000 (18:58 -0400)]
Add more doctest examples to the randomgen module.

8 years agoUse "..." for floating point output in doctests.
Michael Orlitzky [Tue, 1 Nov 2016 22:49:56 +0000 (18:49 -0400)]
Use "..." for floating point output in doctests.

8 years agoFix typo in last commit.
Michael Orlitzky [Tue, 1 Nov 2016 22:47:22 +0000 (18:47 -0400)]
Fix typo in last commit.

8 years agoEnable doctest ELLIPSIS in a few modules.
Michael Orlitzky [Tue, 1 Nov 2016 22:45:58 +0000 (18:45 -0400)]
Enable doctest ELLIPSIS in a few modules.

8 years agoEnable docs for the new test modules and clean them up.
Michael Orlitzky [Tue, 1 Nov 2016 22:25:23 +0000 (18:25 -0400)]
Enable docs for the new test modules and clean them up.

8 years agoRemove one TODO for a failing test that was caused by a typo (fixed earlier).
Michael Orlitzky [Tue, 1 Nov 2016 22:03:35 +0000 (18:03 -0400)]
Remove one TODO for a failing test that was caused by a typo (fixed earlier).

8 years agoRemove the TODO for the dunshire.matrices tests.
Michael Orlitzky [Tue, 1 Nov 2016 22:03:08 +0000 (18:03 -0400)]
Remove the TODO for the dunshire.matrices tests.

8 years agoRename a test that I mistakenly renamed earlier.
Michael Orlitzky [Tue, 1 Nov 2016 22:02:30 +0000 (18:02 -0400)]
Rename a test that I mistakenly renamed earlier.

8 years agoImprove the two no-clobber tests with deepcopy().
Michael Orlitzky [Tue, 1 Nov 2016 22:01:51 +0000 (18:01 -0400)]
Improve the two no-clobber tests with deepcopy().

8 years agoComment my new method-rgx in .pylintrc.
Michael Orlitzky [Tue, 1 Nov 2016 21:55:27 +0000 (17:55 -0400)]
Comment my new method-rgx in .pylintrc.

8 years agoClean up and document some of the new test code.
Michael Orlitzky [Tue, 1 Nov 2016 21:54:31 +0000 (17:54 -0400)]
Clean up and document some of the new test code.

8 years agoAdd a new unit test suite for the dunshire.matrices module.
Michael Orlitzky [Tue, 1 Nov 2016 18:36:54 +0000 (14:36 -0400)]
Add a new unit test suite for the dunshire.matrices module.

8 years agoEnable and fix doctests for the new randomgen module.
Michael Orlitzky [Tue, 1 Nov 2016 17:20:05 +0000 (13:20 -0400)]
Enable and fix doctests for the new randomgen module.

8 years agoFactor out the random test generation code into a new module.
Michael Orlitzky [Tue, 1 Nov 2016 17:15:28 +0000 (13:15 -0400)]
Factor out the random test generation code into a new module.

8 years agoMake the SymmetricLinearGame.condition() method public.
Michael Orlitzky [Tue, 1 Nov 2016 17:14:50 +0000 (13:14 -0400)]
Make the SymmetricLinearGame.condition() method public.

8 years agoFix a pylint warning in the matrices module.
Michael Orlitzky [Tue, 1 Nov 2016 17:11:56 +0000 (13:11 -0400)]
Fix a pylint warning in the matrices module.

8 years agoFix a pylint warning for a top-level variable name in test/__main__.py.
Michael Orlitzky [Tue, 1 Nov 2016 17:07:08 +0000 (13:07 -0400)]
Fix a pylint warning for a top-level variable name in test/__main__.py.

8 years agoUse a shebang for the main test executable.
Michael Orlitzky [Tue, 1 Nov 2016 16:27:56 +0000 (12:27 -0400)]
Use a shebang for the main test executable.

This replaces the "python test/" call with "./test/__main__py". It
may seem like a pointless change, but the former will always use
whatever "python" points to, and the latter will use the contents of
the shebang in "__main__.py". Distributions can fix the shebang on
that one file to ensure that the test suite is run with the proper
version of python.

8 years agoRemove some debug print() statements and fix a copy-paste-o in the tests.
Michael Orlitzky [Tue, 1 Nov 2016 12:57:29 +0000 (08:57 -0400)]
Remove some debug print() statements and fix a copy-paste-o in the tests.

8 years agoAdd another failing test TODO, and one about a payoff() method.
Michael Orlitzky [Tue, 1 Nov 2016 12:57:05 +0000 (08:57 -0400)]
Add another failing test TODO, and one about a payoff() method.

8 years agoAdd another testing TODO.
Michael Orlitzky [Tue, 1 Nov 2016 01:50:02 +0000 (21:50 -0400)]
Add another testing TODO.

8 years agoOverhaul the tests to get more predictable behavior.
Michael Orlitzky [Tue, 1 Nov 2016 00:15:50 +0000 (20:15 -0400)]
Overhaul the tests to get more predictable behavior.

The most important change to the SymmetricLinearGame tests is that we
now check the condition numbers of the generated games. That prevents
most of the numerical trouble experienced before, and solves a few
open TODO items.

A RANDOM_MAX constant was introduced, and incorporated into the fudge
factor for the absolute tolerance used in tests. That contributes to
fixing the open TODO items as well.

The test code itself is pretty ugly now, but it can be fixed once they
all pass reliably (there's still a Lyapunov-like test failing).

8 years agoSet options.ABS_TOL to 1e-7; we should adjust it elsewhere if needed.
Michael Orlitzky [Tue, 1 Nov 2016 00:11:26 +0000 (20:11 -0400)]
Set options.ABS_TOL to 1e-7; we should adjust it elsewhere if needed.

8 years agoAdd a fudge factor of two when checking "unknown" conelp results.
Michael Orlitzky [Tue, 1 Nov 2016 00:10:51 +0000 (20:10 -0400)]
Add a fudge factor of two when checking "unknown" conelp results.

8 years agoAdd two more TODOs, one minor, and one bad test failure.
Michael Orlitzky [Tue, 1 Nov 2016 00:10:24 +0000 (20:10 -0400)]
Add two more TODOs, one minor, and one bad test failure.

8 years agoHalve the definition of the condition number of a game.
Michael Orlitzky [Sun, 30 Oct 2016 22:51:57 +0000 (18:51 -0400)]
Halve the definition of the condition number of a game.

8 years agoAdd a TODO to avoid comparing floats in doctests.
Michael Orlitzky [Sun, 30 Oct 2016 22:44:33 +0000 (18:44 -0400)]
Add a TODO to avoid comparing floats in doctests.

8 years agoAdd the condition number of the game to its string representation.
Michael Orlitzky [Sun, 30 Oct 2016 21:24:30 +0000 (17:24 -0400)]
Add the condition number of the game to its string representation.

8 years agoAdd a PoorScalingException for the "math domain errors" that haunt me.
Michael Orlitzky [Sun, 30 Oct 2016 20:40:58 +0000 (16:40 -0400)]
Add a PoorScalingException for the "math domain errors" that haunt me.

8 years agoDocument a missing parameter for GameUnsolvableExceptions.
Michael Orlitzky [Sun, 30 Oct 2016 20:40:32 +0000 (16:40 -0400)]
Document a missing parameter for GameUnsolvableExceptions.

8 years agoAdd the condition_number() function to the matrices module.
Michael Orlitzky [Sun, 30 Oct 2016 20:27:45 +0000 (16:27 -0400)]
Add the condition_number() function to the matrices module.

8 years agoAdd a "typecode" parameter to the identity() matrix function.
Michael Orlitzky [Sun, 30 Oct 2016 20:27:12 +0000 (16:27 -0400)]
Add a "typecode" parameter to the identity() matrix function.

8 years agoAdd yet another TODO for failing tests.
Michael Orlitzky [Sun, 30 Oct 2016 19:19:56 +0000 (15:19 -0400)]
Add yet another TODO for failing tests.

8 years agoExit with a non-zero code when the test suite fails.
Michael Orlitzky [Sun, 30 Oct 2016 17:39:08 +0000 (13:39 -0400)]
Exit with a non-zero code when the test suite fails.

8 years agoAdd two more TODOs concerning failing tests.
Michael Orlitzky [Sun, 30 Oct 2016 17:38:31 +0000 (13:38 -0400)]
Add two more TODOs concerning failing tests.

8 years agoClean up a few pylint warnings and make "doc" a phony target.
Michael Orlitzky [Wed, 26 Oct 2016 18:31:34 +0000 (14:31 -0400)]
Clean up a few pylint warnings and make "doc" a phony target.

8 years agoUpdate Sphinx with the new directory structure.
Michael Orlitzky [Wed, 26 Oct 2016 18:16:20 +0000 (14:16 -0400)]
Update Sphinx with the new directory structure.

8 years agoAdd setup.py and reorganize everything to make its "test" command happy.
Michael Orlitzky [Wed, 26 Oct 2016 18:05:20 +0000 (14:05 -0400)]
Add setup.py and reorganize everything to make its "test" command happy.

8 years agoRemove a unicode hyphen from a reference.
Michael Orlitzky [Wed, 26 Oct 2016 18:05:00 +0000 (14:05 -0400)]
Remove a unicode hyphen from a reference.

8 years agoAdd the AGPL3 license.
Michael Orlitzky [Wed, 26 Oct 2016 17:07:59 +0000 (13:07 -0400)]
Add the AGPL3 license.

8 years agoPylint cleanup for tests.
Michael Orlitzky [Sun, 16 Oct 2016 04:51:24 +0000 (00:51 -0400)]
Pylint cleanup for tests.

8 years agoRemove two more defunct TODO items.
Michael Orlitzky [Sun, 16 Oct 2016 04:43:43 +0000 (00:43 -0400)]
Remove two more defunct TODO items.

8 years agoPrint the game data along with every GameUnsolvableException.
Michael Orlitzky [Sun, 16 Oct 2016 04:42:48 +0000 (00:42 -0400)]
Print the game data along with every GameUnsolvableException.

8 years agoRename "xi" and "gamma" to "p" and "q" to avoid name clashes with CVXOPT.
Michael Orlitzky [Sun, 16 Oct 2016 04:24:05 +0000 (00:24 -0400)]
Rename "xi" and "gamma" to "p" and "q" to avoid name clashes with CVXOPT.

8 years agoRemove a few completed TODO items.
Michael Orlitzky [Sun, 16 Oct 2016 01:49:12 +0000 (21:49 -0400)]
Remove a few completed TODO items.

8 years agoSeparate and organize the various documentation sections.
Michael Orlitzky [Sun, 16 Oct 2016 01:48:16 +0000 (21:48 -0400)]
Separate and organize the various documentation sections.

8 years agoReorganize the test source code and doc building.
Michael Orlitzky [Sun, 16 Oct 2016 01:12:16 +0000 (21:12 -0400)]
Reorganize the test source code and doc building.

8 years agoMove unit test code into its own file (unders test/ instead of src/).
Michael Orlitzky [Sat, 15 Oct 2016 23:49:48 +0000 (19:49 -0400)]
Move unit test code into its own file (unders test/ instead of src/).

8 years agoAdd another TODO.
Michael Orlitzky [Sat, 15 Oct 2016 22:55:09 +0000 (18:55 -0400)]
Add another TODO.

8 years agoSwitch to Mathjax for the docs and finish the "Background" section.
Michael Orlitzky [Sat, 15 Oct 2016 22:53:59 +0000 (18:53 -0400)]
Switch to Mathjax for the docs and finish the "Background" section.

8 years agoRemove a completed TODO.
Michael Orlitzky [Sat, 15 Oct 2016 21:54:12 +0000 (17:54 -0400)]
Remove a completed TODO.

8 years agoEnable doctesting of ReST docs with `make doctest`.
Michael Orlitzky [Sat, 15 Oct 2016 21:53:48 +0000 (17:53 -0400)]
Enable doctesting of ReST docs with `make doctest`.

8 years agoDo a bunch more README work.
Michael Orlitzky [Fri, 14 Oct 2016 23:05:37 +0000 (19:05 -0400)]
Do a bunch more README work.

8 years agoAdd one more TODO.
Michael Orlitzky [Fri, 14 Oct 2016 23:04:06 +0000 (19:04 -0400)]
Add one more TODO.

8 years agoTweak the makefile now that the imports work better.
Michael Orlitzky [Fri, 14 Oct 2016 22:48:44 +0000 (18:48 -0400)]
Tweak the makefile now that the imports work better.

8 years agoClean up a bit of the import mess.
Michael Orlitzky [Fri, 14 Oct 2016 22:45:26 +0000 (18:45 -0400)]
Clean up a bit of the import mess.

8 years agoRemove docs with `make clean`.
Michael Orlitzky [Fri, 14 Oct 2016 17:47:23 +0000 (13:47 -0400)]
Remove docs with `make clean`.

8 years agoDo a bunch more work on the intro/background.
Michael Orlitzky [Fri, 14 Oct 2016 17:47:10 +0000 (13:47 -0400)]
Do a bunch more work on the intro/background.

8 years agoBegin writing the background/introduction material.
Michael Orlitzky [Fri, 14 Oct 2016 14:29:56 +0000 (10:29 -0400)]
Begin writing the background/introduction material.

8 years agoLocally disable another pylint warning to get clean again.
Michael Orlitzky [Thu, 13 Oct 2016 23:38:12 +0000 (19:38 -0400)]
Locally disable another pylint warning to get clean again.

8 years agoFiddle with the pylint settings.
Michael Orlitzky [Thu, 13 Oct 2016 23:24:05 +0000 (19:24 -0400)]
Fiddle with the pylint settings.

8 years agoMake sure SymmetricPSD doesn't contain asymmetric matrices.
Michael Orlitzky [Thu, 13 Oct 2016 23:14:26 +0000 (19:14 -0400)]
Make sure SymmetricPSD doesn't contain asymmetric matrices.

8 years agoEliminate some unused variables by slicing a tuple before assignment.
Michael Orlitzky [Thu, 13 Oct 2016 23:08:44 +0000 (19:08 -0400)]
Eliminate some unused variables by slicing a tuple before assignment.

8 years agoFix two more pylint bad-variable-name warnings.
Michael Orlitzky [Thu, 13 Oct 2016 23:04:44 +0000 (19:04 -0400)]
Fix two more pylint bad-variable-name warnings.

8 years agoAdd a .pylintrc file and fix a few warnings.
Michael Orlitzky [Thu, 13 Oct 2016 23:02:20 +0000 (19:02 -0400)]
Add a .pylintrc file and fix a few warnings.

8 years agoAdd tests for Lyapunov games over the ice-cream cone.
Michael Orlitzky [Thu, 13 Oct 2016 18:17:54 +0000 (14:17 -0400)]
Add tests for Lyapunov games over the ice-cream cone.

8 years agoReturn CVXOPT matrices from the random matrix functions.
Michael Orlitzky [Thu, 13 Oct 2016 16:33:31 +0000 (12:33 -0400)]
Return CVXOPT matrices from the random matrix functions.

8 years agoTest the dual game value of a Lyapunov game over the orthant.
Michael Orlitzky [Thu, 13 Oct 2016 16:21:56 +0000 (12:21 -0400)]
Test the dual game value of a Lyapunov game over the orthant.

8 years agoRemove unused import.
Michael Orlitzky [Thu, 13 Oct 2016 16:16:32 +0000 (12:16 -0400)]
Remove unused import.

8 years agoAdd another TODO for Lyapunov game tests.
Michael Orlitzky [Thu, 13 Oct 2016 12:44:57 +0000 (08:44 -0400)]
Add another TODO for Lyapunov game tests.

8 years agoAdd a test for Lyapunov games over the orthant.
Michael Orlitzky [Thu, 13 Oct 2016 12:44:03 +0000 (08:44 -0400)]
Add a test for Lyapunov games over the orthant.

8 years agoAdd eigenvalues_re() to compute real parts of eigenvalues of any matrix.
Michael Orlitzky [Thu, 13 Oct 2016 12:32:19 +0000 (08:32 -0400)]
Add eigenvalues_re() to compute real parts of eigenvalues of any matrix.

8 years agoRefactor the random matrix functions a bit.
Michael Orlitzky [Thu, 13 Oct 2016 00:30:32 +0000 (20:30 -0400)]
Refactor the random matrix functions a bit.

8 years agoUse syevr instead of syev for eigenvalues.
Michael Orlitzky [Thu, 13 Oct 2016 00:29:46 +0000 (20:29 -0400)]
Use syevr instead of syev for eigenvalues.

8 years agoAdd a test for the value of a positive operator on the nonnegative orthant.
Michael Orlitzky [Wed, 12 Oct 2016 19:51:39 +0000 (15:51 -0400)]
Add a test for the value of a positive operator on the nonnegative orthant.

8 years agoAdd tests for the orthogonality relationships of a game solution.
Michael Orlitzky [Wed, 12 Oct 2016 19:37:05 +0000 (15:37 -0400)]
Add tests for the orthogonality relationships of a game solution.

8 years agoFix (or cover up) a bunch of pylint warnings.
Michael Orlitzky [Wed, 12 Oct 2016 17:16:16 +0000 (13:16 -0400)]
Fix (or cover up) a bunch of pylint warnings.

8 years agoAdd tests for the "translated" and "negated" games (from a few corollaries).
Michael Orlitzky [Wed, 12 Oct 2016 16:18:53 +0000 (12:18 -0400)]
Add tests for the "translated" and "negated" games (from a few corollaries).

8 years agoRemove a completed TODO.
Michael Orlitzky [Tue, 11 Oct 2016 15:28:47 +0000 (11:28 -0400)]
Remove a completed TODO.

8 years agoAttempt to recover from "unknown" solutions.
Michael Orlitzky [Tue, 11 Oct 2016 15:24:30 +0000 (11:24 -0400)]
Attempt to recover from "unknown" solutions.

Sometimes CVXOPT was coming back with "unknown" solutions that looked
pretty close to real solutions. Now, instead of failing immediately,
we check to see if the primal/dual objectives are within ABS_TOL of
each other, and whether or not the optimal solutions lie in the
cone. If they all do, we take that as our solution and succeed rather
than raising an exception.

This required the loosening of what it means to be in the cone. Before
this commit, a point needed to be "far" inside the cone (past the
tolerance). Now it can lie outside of the cone (but still within the
tolerance). This weakens the checks that we perform on e1 and e2, but
gives us an easy way to check the optimal strategies.

8 years agoSet ABS_TOL to 1e-6 to fix solution comparisons in the test suite.
Michael Orlitzky [Tue, 11 Oct 2016 14:49:15 +0000 (10:49 -0400)]
Set ABS_TOL to 1e-6 to fix solution comparisons in the test suite.

8 years agoRemove a completed TODO.
Michael Orlitzky [Tue, 11 Oct 2016 14:35:44 +0000 (10:35 -0400)]
Remove a completed TODO.

8 years agoGet rid of the contains_strict() methods and compare against ABS_TOL.
Michael Orlitzky [Tue, 11 Oct 2016 14:33:56 +0000 (10:33 -0400)]
Get rid of the contains_strict() methods and compare against ABS_TOL.

Since we're comparing floating point numbers in the containment tests,
we should be doing it against a tolerance. But then, it becomes
pointless to distinguish between strict and non-strict containment.
So, this commit leaves only the __contains__() methods and checks
against options.ABS_TOL.

8 years agoAdd two more tests for nonnegative scaling factors.
Michael Orlitzky [Tue, 11 Oct 2016 14:05:58 +0000 (10:05 -0400)]
Add two more tests for nonnegative scaling factors.

8 years agoAdd another TODO about failing tests.
Michael Orlitzky [Tue, 11 Oct 2016 14:05:37 +0000 (10:05 -0400)]
Add another TODO about failing tests.

8 years agoAdd a test for an example in the Gowda/Ravindran paper.
Michael Orlitzky [Tue, 11 Oct 2016 13:52:13 +0000 (09:52 -0400)]
Add a test for an example in the Gowda/Ravindran paper.

8 years agoReplace one TODO with something else, and add a new one.
Michael Orlitzky [Tue, 11 Oct 2016 13:38:41 +0000 (09:38 -0400)]
Replace one TODO with something else, and add a new one.

8 years agoRemove a completed TODO.
Michael Orlitzky [Tue, 11 Oct 2016 13:36:22 +0000 (09:36 -0400)]
Remove a completed TODO.

8 years agoFinish overhauling the docstrings to numpy format.
Michael Orlitzky [Mon, 10 Oct 2016 18:46:27 +0000 (14:46 -0400)]
Finish overhauling the docstrings to numpy format.

8 years agoSwitch the docs style of cones.py and update cartesian product containment.
Michael Orlitzky [Mon, 10 Oct 2016 17:44:29 +0000 (13:44 -0400)]
Switch the docs style of cones.py and update cartesian product containment.

The docs for cones.py have all been switched (roughly) to use the
numpy style. In the process, I noticed that cartesian product
containment was a lot weirder than it needs to be. The "point" that
the __contains__() and contains_strict() methods take is now a tuple
corresponding to the factors of the cartesian product.

8 years agoAnother shot at documenting the options module.
Michael Orlitzky [Mon, 10 Oct 2016 17:44:14 +0000 (13:44 -0400)]
Another shot at documenting the options module.

8 years agoMore "easy" docs work in matrices.py/options.py.
Michael Orlitzky [Mon, 10 Oct 2016 16:12:38 +0000 (12:12 -0400)]
More "easy" docs work in matrices.py/options.py.

8 years agoRename the "symmetric_linear_game" module to "games".
Michael Orlitzky [Mon, 10 Oct 2016 15:57:01 +0000 (11:57 -0400)]
Rename the "symmetric_linear_game" module to "games".