summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-08-24 13:27:27 -0400
committerpommicket <pommicket@gmail.com>2025-08-24 13:27:27 -0400
commitc1055b0b9c58bbe07d376707318028d1e6026162 (patch)
tree82fd3b8b0ffa236f173cda6f668584fab4d6f353
parent82f08e0d21520a6c673a2a4ee5737f12752db6c5 (diff)
Fix dotDescription issues, update README
-rw-r--r--README.md23
-rw-r--r--quacker/macondo.cpp6
-rw-r--r--quacker/macondobackend.cpp5
3 files changed, 29 insertions, 5 deletions
diff --git a/README.md b/README.md
index 56c4242..107917c 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,24 @@
-Quackle ![Icon](https://github.com/quackle/quackle/raw/master/IconSmall.png)
+Quackondo ![Icon](Quackondo.png)
=======
-[![CI builds](https://github.com/quackle/quackle/actions/workflows/build.yml/badge.svg)](https://github.com/quackle/quackle/actions/workflows/build.yml)
-
Crossword game artificial intelligence and analysis tool.
+This is a somewhat hacky attempt to integrate the [Macondo](https://github.com/domino14/macondo)
+AI into [Quackle](https://github.com/quackle/quackle/). Macondo can solve endgames and 1-in-the-bag pre-endgames,
+including very complex ones which Quackle's built-in solver can't handle.
+
+To install Quackondo, go to the [Releases](https://github.com/pommicket/Quackondo/releases) page.
+
+To use Macondo inside of Quackle, click on the 'Macondo' tab (next to 'Settings' on the left). You can then check the
+"Use Macondo for 'Simulate'" button, and click simulate (after generating choices) to see which move Macondo prefers.
+You can also solve (pre-)endgames, provided that the tile bag is sufficiently empty by clicking the Solve button in the Macondo tab.
+
+**There may be bugs!** Please report them here: <https://github.com/pommicket/Quackondo/issues>. Ideally include
+an explanation of what you were doing that caused the bug, a GCG file of the game, and the output from Macondo
+(available at the bottom of the 'Macondo' tab).
+
+License
+-----------------
See LICENSE in this directory.
Building Quackle:
@@ -29,6 +43,7 @@ The Quackle cmake build system uses Qt5 by default. But you can specify Qt6 by
cmake -DQT_VERSION=6 ..
+Latest known working version of Macondo: [v0.11.2](https://github.com/domino14/macondo/releases/tag/v0.11.2)
File organization:
------------------
@@ -40,7 +55,7 @@ File organization:
* quackle/data/ - lexicons, strategy files, and alphabet resources for Quackle.
In this directory is libquackle. Run qmake and then run make in this directory. Then cd to quackle/quackleio/, run qmake, and then run make.
-
+Original quackle authors:
olaughlin@gmail.com
jasonkatzbrown@gmail.edu
jfultz@wolfram.com
diff --git a/quacker/macondo.cpp b/quacker/macondo.cpp
index 8272dd4..aba5bca 100644
--- a/quacker/macondo.cpp
+++ b/quacker/macondo.cpp
@@ -1,3 +1,8 @@
+/*
+TODO:
+- handle early exit from (pre-)endgame solve
+*/
+
#include "macondo.h"
#include "macondobackend.h"
@@ -231,6 +236,7 @@ void Macondo::gameChanged(Quackle::Game *game) {
m_backend = new MacondoBackend(game, *m_initOptions);
connectBackendSignals();
m_game = game;
+ clearLog();
}
void Macondo::connectBackendSignals() {
diff --git a/quacker/macondobackend.cpp b/quacker/macondobackend.cpp
index 628066a..db9eee3 100644
--- a/quacker/macondobackend.cpp
+++ b/quacker/macondobackend.cpp
@@ -191,9 +191,12 @@ Quackle::Move MacondoBackend::createPlaceMove(const std::string &placement, cons
dotDescription += tiles.substr(i);
break;
}
- dotDescription += tiles.substr(i, j) + ".";
+ dotDescription += tiles.substr(i, j - i);
i = tiles.find(')', j);
if (i == std::string::npos) throw "mismatched parentheses";
+ // add appropriate number of dots
+ for (size_t d = 1; d < i - j; d++)
+ dotDescription.push_back('.');
i++;
}
auto move = Quackle::Move::createPlaceMove(placement, QUACKLE_ALPHABET_PARAMETERS->encode(dotDescription));