#16331: Game Theory: Build capacity to solve matching games in to Sage.
-------------------------------------+-------------------------------------
Reporter: vinceknight | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: game theory | Resolution:
Keywords: Game Theory, | Merged in:
Matching Games, | Reviewers: Karl-Dieter Crisman,
Authors: Vince Knight, | Travis Scrimshaw
James Campbell | Work issues:
Report Upstream: N/A | Commit:
Branch: | f361765bc7747e9e4c47e28cf4af4dcc3cbb79e5
u/vinceknight/game_theory__build_capacity_to_solve_matching_games_in_to_sage_|
Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by vinceknight):
Ok, I'm slightly confused.
I just tried the fix in f361765 on two machines:
- On my macbook: tests pass no problem.
- On my linux box:
{{{
File "src/sage/game_theory/matching_game.py", line 235, in
sage.game_theory.matching_game.MatchingGame
Failed example:
sorted(D.items())
Expected:
[('Mercutio', 'Rosaline'), ('Romeo', 'Juliet'), (3, -3)]
Got:
[(3, -3), ('Mercutio', 'Rosaline'), ('Romeo', 'Juliet')]
}}}
I then tried loop over keys of the dictionary (which should just be a
sortable list (finger crossed?) and output the value of the dictionary for
each.
So something like:
{{{
sage: D = g.solve(
sage: for key in sorted(D.keys()):
....: key, D[key]
}}}
I've just tried that with similar (bad) results (fine on MacOS, no joy on
Ubuntu):
for key in sorted(D.keys()):
key, D[key]
Expected:
('Mercutio', 'Rosaline')
('Romeo', 'Juliet')
(3, -3)
Got:
(3, -3)
('Mercutio', 'Rosaline')
('Romeo', 'Juliet')
(Just about to push that commit in case it's helpful)
This is obviously quite a particular case with player names being a
mixture of numeric and string but still. At the moment I'm a bit
baffled... I'm going to sleep on it...
--
Ticket URL: <http://trac.sagemath.org/ticket/16331#comment:114>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.