-
Notifications
You must be signed in to change notification settings - Fork 257
Draft overview of architecture #907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2357922
Draft overview of architecture
tturocy 1ed47ba
Update doc/developer.overview.rst
tturocy 0a6e389
Update doc/developer.overview.rst
tturocy 9520837
Update doc/developer.overview.rst
tturocy dcf71ad
Some final tweaks to architecture overview.
tturocy 2df341c
Clarify hybrid architecture description in overview
rahulsavani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| .. _architecture-overview: | ||
|
|
||
| Overview of Gambit architecture | ||
| =============================== | ||
|
|
||
| The core of Gambit is a library of C++ code for the representation and analysis of finite games. | ||
| This code is organised into three directories: | ||
|
|
||
| * ``src/core``: Generic functions, structures, and utility code which is not specific to | ||
| game theory. | ||
| * ``src/games``: Definition of the interface and representation data structures for game objects | ||
| and related concepts. | ||
| * ``src/solvers``: Implementation of algorithms for computation on games, principally for the | ||
| computation of (exact or approximate) Nash equilibria. | ||
|
|
||
| Gambit is written to the C++17 standard. Because Gambit is cross-platform, C++ library | ||
| dependencies are avoided to facilitate development and packaging. | ||
|
|
||
| The principal way in which code is written to use Gambit is via the Python package | ||
| ``pygambit``. In particular, testing is done via the Python test suite and ``pytest``, | ||
| which therefore (indirectly) tests the C++ data structures and algorithms. | ||
| Running ``make check`` has no effect (there are no tests defined in that build system). | ||
| The test suite makes use of a variety of games, which are drawn from examples in | ||
| the game theory literature and textbooks, as well as examples constructed specifically | ||
| to test edge cases. From Gambit 17, these are all curated as part of Gambit's | ||
| :ref:`catalog of games <catalog>`. | ||
|
|
||
| From Gambit 17, ``pygambit`` is also responsible for providing command-line interfaces to | ||
| equilibrium computation and other facilities; previously the command-line wrappers were | ||
| implemented in C++. | ||
|
|
||
| Gambit's core is also incorporated into a graphical user interface, also written | ||
| in C++ using wxWidgets (see ``src/gui``). This is built by ``make`` if an installation | ||
| of a suitable version of wxWidgets is detected. | ||
|
|
||
| This hybrid architecture aims to maintain some flexibility for future development as follows: | ||
|
|
||
| 1. Although in practice we expect ``pygambit`` will be the most common path for writing | ||
| code using Gambit, the C++ implementations are kept separate from the Python wrapper | ||
| so they can continue to be used directly in C++ | ||
| 2. Likewise, the graphical interface layer is kept cleanly separate from the core. | ||
| Graphical-based interfaces (different libraries, languages, | ||
| browser-based interfaces) can be developed without touching the core code. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.