Moteur : abandon proposé, réponse de l'ordinateur comme gnubg de bureau

Porte dans engine.c la décision de gnubg 1.08.003 (play.c l. 951-975 et
1074-1097, rollout.c l. 1754-1815), l'expose par engine.h et engine-cli
(commande resign), et ajoute sept abandons de référence comparés à gnubg
de bureau (make reference).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre MARTIN
2026-11-13 00:37:19 +01:00
co-authored by Claude Opus 5.5
parent da9845466b
commit e98497e5b1
16 changed files with 539 additions and 8 deletions
+7 -1
View File
@@ -143,10 +143,16 @@ elif .type == "level" then
(if (.levels | length) > 0 and all(.levels[]; (.plies | nombre) and (.noise | nombre)
and ((.move | type) == "string" or (.decision | type) == "string"))
then empty else "niveaux incomplets" end)
elif .type == "resign" then
(if (.resignations | keys) == ["backgammon", "gammon", "single"]
and (.probabilities | keys | length) == 5
and all(.resignations[]; (.accepted | type) == "boolean"
and (if .accepted then (.points | nombre) else .points == null end))
then empty else "abandon incomplet" end)
else "type inconnu" end
JQ
mapfile -t analyses < <(jq -r '(.moves + .cubes + .levels)[].id' analyses.json)
mapfile -t analyses < <(jq -r '(.moves + .cubes + .levels + .resigns)[].id' analyses.json)
doublons="$(printf '%s\n' "${analyses[@]}" "${ids[@]}" | sort | uniq -d | paste -sd' ' -)"
[ -z "$doublons" ] || signaler "analyses.json : identifiants en double : $doublons"
for id in "${analyses[@]}"; do