From 1e4a8338c80ab2bd7f5b2f56de3add4a46e8e402 Mon Sep 17 00:00:00 2001 From: Ted Turocy Date: Thu, 9 Jan 2025 12:50:02 +0000 Subject: [PATCH] Add enumpoly back to GUI --- src/gui/dlnash.cc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/gui/dlnash.cc b/src/gui/dlnash.cc index 417c5d63d..00ba5cb92 100644 --- a/src/gui/dlnash.cc +++ b/src/gui/dlnash.cc @@ -33,7 +33,7 @@ static wxString s_recommended(wxT("with Gambit's recommended method")); static wxString s_enumpure(wxT("by looking for pure strategy equilibria")); static wxString s_enummixed(wxT("by enumerating extreme points")); -// static wxString s_enumpoly(wxT("by solving systems of polynomial equations")); +static wxString s_enumpoly(wxT("by solving systems of polynomial equations")); static wxString s_gnm(wxT("by global Newton tracing")); static wxString s_ipa(wxT("by iterated polymatrix approximation")); static wxString s_lp(wxT("by solving a linear program")); @@ -67,14 +67,14 @@ gbtNashChoiceDialog::gbtNashChoiceDialog(wxWindow *p_parent, gbtGameDocument *p_ topSizer->Add(m_countChoice, 0, wxALL | wxEXPAND, 5); if (p_doc->NumPlayers() == 2 && m_doc->IsConstSum()) { - wxString methodChoices[] = {s_recommended, s_lp, s_simpdiv, s_logit}; + wxString methodChoices[] = {s_recommended, s_lp, s_simpdiv, s_logit, s_enumpoly}; m_methodChoice = - new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 4, methodChoices); + new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 5, methodChoices); } else { - wxString methodChoices[] = {s_recommended, s_simpdiv, s_logit}; + wxString methodChoices[] = {s_recommended, s_simpdiv, s_logit, s_enumpoly}; m_methodChoice = - new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 3, methodChoices); + new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 4, methodChoices); } m_methodChoice->SetSelection(0); topSizer->Add(m_methodChoice, 0, wxALL | wxEXPAND, 5); @@ -128,7 +128,7 @@ void gbtNashChoiceDialog::OnCount(wxCommandEvent &p_event) m_methodChoice->Append(s_liap); m_methodChoice->Append(s_gnm); m_methodChoice->Append(s_ipa); - // m_methodChoice->Append(s_enumpoly); + m_methodChoice->Append(s_enumpoly); } else { if (m_doc->NumPlayers() == 2) { @@ -243,14 +243,11 @@ gbtAnalysisOutput *gbtNashChoiceDialog::GetCommand() const cmd->SetDescription(count + wxT(" by enumeration of mixed strategies ") wxT("in strategic game")); } - /* else if (method == s_enumpoly) { cmd = new gbtAnalysisProfileList(m_doc, useEfg); cmd->SetCommand(prefix + wxT("enumpoly -d 10") + options); - cmd->SetDescription(count + wxT(" by solving polynomial systems ") + - game); + cmd->SetDescription(count + wxT(" by solving polynomial systems ") + game); } - */ else if (method == s_gnm) { cmd = new gbtAnalysisProfileList(m_doc, false); cmd->SetCommand(prefix + wxT("gnm -d 10") + options);