Android: Rodent IV as a second opponent, with its characters and famous players
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run

The play sheet chooses Maia or Rodent IV, and Rodent's character in a full-screen
list (docs/design/android-rodent.md, docs/decisions.md «Rodent IV на телефоне»).
The engine is built from its authors' sources by androidApp/scripts/rodent4.sh
(patches: no wordexp.h on bionic; the search thread took its parameter by reference,
which clang builds read after it was gone) and ships in both APKs; the opening books
are one checked download. Rodent's tables, its book manifest and its opponent loop
move from the desktop into crates/play, shared by both apps; uci's EngineConfig takes
an environment (RODENT4HOME).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-27 03:03:02 +03:00
parent 3dac4a185b
commit b3774d1651
42 changed files with 4098 additions and 951 deletions

View file

@ -0,0 +1,18 @@
The search thread's lambda took the parameter p by reference, and StartThinkThread
returns at once: the thread then read p from a dead stack frame. GCC builds happened
to work; clang builds (the NDK's, AddressSanitizer: stack-use-after-return) searched
garbage and answered illegal moves (bestmove a1b1 from the start). Take p by value.
diff --git a/sources/src/rodent.h b/sources/src/rodent.h
index 30ccf22..3e100a0 100755
--- a/sources/src/rodent.h
+++ b/sources/src/rodent.h
@@ -981,7 +981,7 @@ class cEngine {
std::thread mWorker;
void StartThinkThread(POS *p) {
mDpCompleted = 0;
- mWorker = std::thread([&] { Think(p); });
+ mWorker = std::thread([this, p] { Think(p); });
}
~cEngine() { WaitThinkThread(); }; // should fix crash on windows on console closing