Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
### Removed
- Eliminating dominated actions has been removed from the GUI as it was implementing a non-standard
formulation of dominance. (#612)
- The C++ method for computing subgame perfect equilibria with selected methods has been removed
(and as a result from the `enumpure`, `lp`, and `lcp` command-line tools); this will be replaced
with new and more customisable approaches. (#639)

## [16.4.1] - unreleased

Expand Down
1 change: 0 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ game_SOURCES = \
src/games/stratpure.cc \
src/games/stratpure.h \
src/games/stratmixed.h \
src/games/nash.cc \
src/games/file.cc \
src/games/writer.cc \
src/games/writer.h \
Expand Down
8 changes: 0 additions & 8 deletions doc/tools.enumpure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ pure-strategy Nash equilibria.
extensive games, as strategic games have only one information set
per player.

.. cmdoption:: -P

By default, the program computes all pure-strategy Nash
equilibria in an extensive game. This switch instructs the program to
find only pure-strategy Nash equilibria which are subgame perfect.
(This has no effect for strategic games, since there are no proper
subgames of a strategic game.)

.. cmdoption:: -h

Prints a help message listing the available options.
Expand Down
7 changes: 0 additions & 7 deletions doc/tools.lcp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ game.
causes the program to output greater detail on each equilbrium
profile computed.

.. cmdoption:: -P

By default, the program computes Nash equilibria in an extensive
game. This switch instructs the program to find only equilibria
which are subgame perfect. (This has no effect for strategic
games, since there are no proper subgames of a strategic game.)

.. cmdoption:: -e EQA

By default, the program will find all equilibria accessible from
Expand Down
7 changes: 0 additions & 7 deletions doc/tools.lp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ points of that set.
causes the program to output greater detail on each equilbrium
profile computed.

.. cmdoption:: -P

By default, the program computes Nash equilibria in an extensive
game. This switch instructs the program to find only equilibria
which are subgame perfect. (This has no effect for strategic
games, since there are no proper subgames of a strategic game.)

.. cmdoption:: -h

Prints a help message listing the available options.
Expand Down
204 changes: 0 additions & 204 deletions src/games/nash.cc

This file was deleted.

4 changes: 0 additions & 4 deletions src/games/nash.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ ToMixedBehaviorProfile(const std::list<MixedStrategyProfile<T>> &p_list)
template <class T>
using BehaviorSolverType = std::function<std::list<MixedBehaviorProfile<T>>(const Game &)>;

template <class T>
std::list<MixedBehaviorProfile<T>> SolveBySubgames(const Game &, BehaviorSolverType<T> p_solver,
BehaviorCallbackType<T> p_onEquilibrium);

//
// Exception raised when maximum number of equilibria to compute
// has been reached. A convenience for unraveling a potentially
Expand Down
7 changes: 4 additions & 3 deletions src/tools/convert/convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@

#include <iostream>
#include <fstream>
#include <cstdlib>
#include <getopt.h>

#include "gambit.h"
#include "games/writer.h"

using namespace Gambit;

void PrintBanner(std::ostream &p_stream)
{
p_stream << "Convert games among various file formats\n";
Expand Down Expand Up @@ -79,7 +80,7 @@ int main(int argc, char *argv[])
break;
case '?':
if (isprint(optopt)) {
std::cerr << argv[0] << ": Unknown option `-" << ((char)optopt) << "'.\n";
std::cerr << argv[0] << ": Unknown option `-" << static_cast<char>(optopt) << "'.\n";
}
else {
std::cerr << argv[0] << ": Unknown option character `\\x" << optopt << "`.\n";
Expand Down Expand Up @@ -122,7 +123,7 @@ int main(int argc, char *argv[])
}

try {
const Gambit::Game game = Gambit::ReadGame(*input_stream);
const Game game = ReadGame(*input_stream);

if (rowPlayer < 1 || rowPlayer > static_cast<int>(game->NumPlayers())) {
std::cerr << argv[0] << ": Player " << rowPlayer << " does not exist.\n";
Expand Down
13 changes: 5 additions & 8 deletions src/tools/enummixed/enummixed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//

#include <cstdlib>
#include <getopt.h>
#include <iostream>
#include <fstream>
Expand All @@ -34,7 +33,7 @@ using namespace Gambit::Nash;

template <class T>
void PrintCliques(const List<List<MixedStrategyProfile<T>>> &p_cliques,
std::shared_ptr<StrategyProfileRenderer<T>> p_renderer)
std::shared_ptr<MixedProfileRenderer<T>> p_renderer)
{
for (size_t cl = 1; cl <= p_cliques.size(); cl++) {
for (size_t i = 1; i <= p_cliques[cl].size(); i++) {
Expand Down Expand Up @@ -75,7 +74,7 @@ int main(int argc, char *argv[])
int numDecimals = 6;

int long_opt_index = 0;
struct option long_options[] = {
option long_options[] = {
{"help", 0, nullptr, 'h'}, {"version", 0, nullptr, 'v'}, {nullptr, 0, nullptr, 0}};
while ((c = getopt_long(argc, argv, "d:vhqcS", long_options, &long_opt_index)) != -1) {
switch (c) {
Expand All @@ -99,7 +98,7 @@ int main(int argc, char *argv[])
break;
case '?':
if (isprint(optopt)) {
std::cerr << argv[0] << ": Unknown option `-" << ((char)optopt) << "'.\n";
std::cerr << argv[0] << ": Unknown option `-" << static_cast<char>(optopt) << "'.\n";
}
else {
std::cerr << argv[0] << ": Unknown option character `\\x" << optopt << "`.\n";
Expand Down Expand Up @@ -130,8 +129,7 @@ int main(int argc, char *argv[])
try {
const Game game = ReadGame(*input_stream);
if (useFloat) {
std::shared_ptr<StrategyProfileRenderer<double>> renderer =
std::make_shared<MixedStrategyCSVRenderer<double>>(std::cout, numDecimals);
auto renderer = MakeMixedStrategyProfileRenderer<double>(std::cout, numDecimals, false);
auto solution = EnumMixedStrategySolveDetailed<double>(
game, [&](const MixedStrategyProfile<double> &p, const std::string &label) {
renderer->Render(p, label);
Expand All @@ -141,8 +139,7 @@ int main(int argc, char *argv[])
}
}
else {
std::shared_ptr<StrategyProfileRenderer<Rational>> renderer(
new MixedStrategyCSVRenderer<Rational>(std::cout));
auto renderer = MakeMixedStrategyProfileRenderer<Rational>(std::cout, numDecimals, false);
auto solution = EnumMixedStrategySolveDetailed<Rational>(
game, [&](const MixedStrategyProfile<Rational> &p, const std::string &label) {
renderer->Render(p, label);
Expand Down
Loading
Loading