From 585c0bfb224b8ed20cb7718972c0443074d5864e Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 12 Oct 2014 11:04:48 +0200 Subject: [PATCH] Add option do adjust 50-moves draw claim The number of reversible moves after which a draw claim is emitted is now adjustable through an engine-defined option. --- fairymax.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fairymax.c b/fairymax.c index 281ccbf..418c926 100644 --- a/fairymax.c +++ b/fairymax.c @@ -102,6 +102,7 @@ int GameNr; int Resign; char Cambodian[80] = "makruk"; int Threshold = 800; +int drawMoves = 50; int Score; int makruk; int prom, pm, gating, succession, hill; @@ -375,7 +376,7 @@ int PrintResult(int s) } return 3; } - if(Fifty >=100) { + if(Fifty >= 2*drawMoves) { printf("1/2-1/2 {Draw by fifty move rule}\n"); return 4; } @@ -459,6 +460,7 @@ void PrintOptions() printf("feature option=\"Multi-PV Margin -spin %d 0 1000\"\n", margin); printf("feature option=\"Variant fairy selects -combo "); PrintVariants(1); printf("\"\n"); printf("feature option=\"Makruk rules -combo makruk /// Cambodian /// Ai-wok\"\n"); + printf("feature option=\"Claim draw after -spin %d 0 200\"\n", drawMoves); printf("feature option=\"Dummy Slider Example -slider 20 0 100\"\n"); printf("feature option=\"Dummy String Example -string happy birthday!\"\n"); printf("feature option=\"Dummy Path Example -path .\"\n"); @@ -759,6 +761,7 @@ printf("# promo = %d (%c) GT = %d\n", prom, prom + '`', GT); if(sscanf(line+7, "MultiVariation Margin=%d", &margin) == 1) continue; if(sscanf(line+7, "Variant fairy selects=%s", selectedFairy+6) == 1) continue; if(sscanf(line+7, "Makruk rules=%s", Cambodian) == 1) continue; + if(sscanf(line+7, "Claim draw after=%d", &drawMoves) == 1) continue; continue; } if (!strcmp(command, "go")) { -- 1.7.0.4