#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: | e1f57f5e44d352fc009217a952c8a108a510b146
u/vinceknight/game_theory__build_capacity_to_solve_matching_games_in_to_sage_|
Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by kcrisman):
> I will probably add in a test with a # random so as to describe what
output would look like before going on to using the sorted(D.items())
throughout.
Yes, that is just what you should do.
> sorted(D.items(), key=lambda x: x[0]._name)
If we have to resort to that to get Romeo with Juliet, something is
terribly wrong in Verona. But I think that
[http://stackoverflow.com/questions/5884066/hashing-a-python-dictionary
this SO question] might be on the right track, as
> Using sorted(d.items()) isn't enough to get us a stable repr. Some of
the values in d could be dictionaries too, and their keys will still come
out in an arbitrary order.
And presumably the players are what is being sorted, not their ''names''.
I'm not sure what a better solution will be but I really hope it can be
something that is intelligible to those newcomers Vincent is mentioning.
--
Ticket URL: <http://trac.sagemath.org/ticket/16331#comment:117>
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.