Tuning #97

Merged
rektdie merged 7 commits from tuning into main 2025-09-07 19:44:51 +02:00
2 changed files with 82 additions and 57 deletions
Showing only changes of commit 768b8ed178 - Show all commits

No files matched your search

+50 -36
View File
@@ -1,45 +1,59 @@
[Event "?"] [Event "?"]
[Site "?"] [Site "?"]
[Date "2025.04.01"] [Date "2025.09.04"]
[Round "1"] [Round "1"]
[White "Eleanor-base"] [White "Eleanor-base"]
[Black "Eleanor-dev"] [Black "Eleanor-dev"]
[Result "1-0"] [Result "1-0"]
[FEN "2r5/1k6/2p4p/4p3/3b1p1B/5B1P/2R5/7K b - - 0 1"] [FEN "rn1qk1nr/ppp2pRp/3bp3/3p4/3P4/2P2P1P/PP2PP2/RNBQKB2 b Qkq - 0 1"]
[GameDuration "00:00:05"] [GameDuration "00:01:31"]
[GameEndTime "2025-04-01T18:10:20.331 Central Europe Daylight Time"] [GameEndTime "2025-09-04T22:39:24.808 CEST"]
[GameStartTime "2025-04-01T18:10:14.365 Central Europe Daylight Time"] [GameStartTime "2025-09-04T22:37:53.089 CEST"]
[PlyCount "58"] [PlyCount "84"]
[SetUp "1"] [SetUp "1"]
[Termination "abandoned"] [Termination "abandoned"]
[TimeControl "2.53+0.03"] [TimeControl "37.56+0.38"]
1... Kb6 {-0.43 11/0 127 176492} 2. Kg2 {+0.45 10/0 117 182773} 1... Ne7 {-1.65 14/26 1861 1544983} 2. Rg1 {+1.64 12/23 2087 934687}
Kb5 {-0.43 10/0 139 43190} 3. Bf2 {+0.48 10/0 94 154681} c5 {-1.74 15/32 1565 1167061} 3. f4 {+1.61 13/27 2002 772197}
Rg8+ {-0.41 10/0 104 181006} 4. Kf1 {+0.43 11/0 137 107880} Nd7 {-1.59 15/31 1455 1090717} 4. e3 {+1.84 14/31 1753 1387350}
c5 {-0.42 11/0 114 186919} 5. Ke2 {+0.42 10/0 131 26558} Qb6 {-1.65 14/31 1385 1273463} 5. a4 {+1.98 14/28 1505 1375155}
Rd8 {-0.31 11/0 126 178073} 6. Rd2 {+0.36 8/0 129 64726} Qc7 {-2.11 14/29 1849 830961} 6. dxc5 {+1.98 15/30 1571 1101192}
c4 {+0.11 11/0 124 101858} 7. Bxd4 {-0.11 11/0 86 135900} Nxc5 {-2.16 15/34 1778 545375} 7. a5 {+1.90 14/29 1555 1021903}
Rxd4 {+0.10 11/0 124 121262} 8. Rxd4 {-0.01 13/0 117 207646} a6 {-2.22 15/33 1706 667700} 8. Nd2 {+2.38 14/29 1267 922229}
exd4 {0.00 14/0 95 197856} 9. h4 {0.00 13/0 105 197264} O-O-O {-2.34 14/31 1641 580655} 9. b4 {+2.62 14/31 1463 975771}
Kb4 {0.00 14/0 91 195163} 10. Kd2 {0.00 13/0 111 105382} Ne4 {-2.37 15/39 1336 932258} 10. Nxe4 {+2.55 13/31 1579 228776}
Kc5 {0.00 13/0 109 62420} 11. h5 {0.00 14/0 78 150612} Kb4 {0.00 16/0 79 181784} dxe4 {-2.85 15/31 1004 694847} 11. Bd2 {+3.02 13/30 1247 753167}
12. Bd1 {0.00 15/0 86 193192} Kc5 {0.00 16/0 97 111839} Ng6 {-2.40 14/35 1118 862794} 12. Qb1 {+2.40 12/26 1475 339681}
13. Kc2 {0.00 17/0 90 192373} Kb4 {0.00 17/0 95 120438} f5 {-1.97 13/31 1465 304169} 13. Qb3 {+2.25 12/34 957 597544}
14. Bf3 {0.00 17/0 76 176571} Kc5 {0.00 17/0 101 66844} Nh4 {-2.21 14/38 1409 432849} 14. Be2 {+2.30 13/35 1343 843064}
15. Ba8 {0.00 18/0 75 165249} Kb4 {0.00 18/0 86 198233} Nf3+ {-2.18 14/40 1355 318067} 15. Bxf3 {+2.49 14/39 1346 645681}
16. Bf3 {0.00 18/0 77 183908} d3+ {+0.01 16/0 69 164278} exf3 {-2.59 15/30 1115 864898} 16. O-O-O {+2.85 14/35 1297 425564}
17. Kd2 {-0.03 16/0 81 145118} Kb3 {0.00 17/0 84 107987} Rhe8 {-2.11 13/34 1269 275858} 17. c4 {+2.35 13/30 1249 86929}
18. Be4 {0.00 16/0 61 125373} f3 {+0.09 17/0 75 163654} e5 {-1.53 14/40 1188 1007892} 18. Bc3 {+2.71 12/37 1207 154226}
19. Bxd3 {-0.01 16/0 86 109653} cxd3 {+0.57 18/0 55 140500} exf4 {-0.71 13/45 1186 280646} 19. c5 {+0.71 13/34 883 618110}
20. Kxd3 {-0.97 22/0 73 227257} f2 {+0.98 22/0 71 204108} Be5 {-0.52 13/65 1145 440206} 20. Rxd8+ {+0.56 13/36 861 757974}
21. Ke2 {-0.99 20/0 81 29772} Kc4 {+1.48 22/0 62 180691} Qxd8 {-0.55 15/56 1106 373775} 21. Bxe5 {+0.98 14/49 845 689690}
22. Kxf2 {-2.11 23/0 59 175088} Kd4 {+2.51 27/0 52 189697} Rxe5 {-0.87 14/83 799 511973} 22. exf4 {+0.98 13/36 1092 370730}
23. Kf3 {-3.34 26/0 62 187791} Ke5 {+2.50 32/0 48 167062} Re2 {-0.87 13/89 751 367978} 23. Rg8 {+1.05 13/43 1056 334030}
24. Ke3 {-2.24 28/0 54 178563} Kf5 {+2.15 31/0 72 166014} Re8 {-0.87 13/79 1030 242199} 24. Rxe8 {+1.13 12/34 1023 141620}
25. Kf3 {-2.22 32/0 52 188757} Kg5 {0.00 35/0 49 143292} Qxe8 {-0.87 13/41 998 22345} 25. Qd1 {+1.46 11/36 991 227470}
26. Ke4 {-2.09 32/0 62 209505} Kxh5 {0.00 39/0 48 159744} Qe4 {-0.89 12/59 968 192246} 26. Qd2 {+1.17 13/42 856 592181}
27. Kf5 {-2.09 33/0 70 226933} Kh4 {0.00 52/0 46 161548} Qc4+ {-0.90 11/95 891 510827} 27. Kb2 {+1.46 12/38 937 154015}
28. Kf4 {0.00 37/0 51 178144} h5 {0.00 64/0 29 95868} h5 {-1.01 11/66 913 404234} 28. Qc3 {+1.38 13/37 909 437481}
29. Kf3 {0.00 51/0 46 165319} Kh3 {0.00 64/0 15 14259} Qe2+ {-0.73 10/76 886 55851} 29. Qc2 {+1.42 14/34 882 272787}
30. Kf4 {0.00 52/0 64 186059, Black disconnects} 1-0 Qe4 {-1.19 10/49 860 32225} 30. Kb3 {+1.27 12/37 824 598253}
Qxf4 {-1.13 10/98 838 184366} 31. c6 {+1.24 12/51 734 627843}
Qe4 {-0.96 10/103 814 271816} 32. cxb7+ {+1.24 13/50 817 324130}
Kxb7 {-0.96 9/16 792 1604} 33. Qc3 {+1.24 14/30 796 171391}
Qd5+ {-1.20 8/35 772 15385} 34. Ka3 {+1.23 11/40 525 374116}
Qe4 {-1.25 8/85 752 9999} 35. Qd2 {+1.19 12/37 767 281732}
Kc7 {-1.09 10/65 733 175302} 36. Qb2 {+1.21 12/40 748 316739}
h4 {-1.09 7/48 715 39908} 37. Qc1+ {+1.19 11/38 529 523703}
Kd8 {-0.65 10/83 700 298167} 38. Qc3 {+1.26 12/49 723 322911}
Kd7 {-0.64 9/44 684 18906} 39. Qg7+ {+1.23 11/37 537 395773}
Kc8 {-1.04 8/14 667 847} 40. Qf7 {+1.23 11/45 572 501521}
Qd3+ {-1.04 7/81 653 28141} 41. Qb3 {+1.23 11/36 689 130089}
Qe2 {-1.28 8/54 639 10579} 42. Qc3+ {+1.08 11/38 581 477548}
Kd7 {-0.67 8/40 627 10552} 43. Qb2 {+1.08 11/33 663 104343, Black disconnects}
1-0
+32 -21
View File
@@ -48,35 +48,44 @@ static void ParsePosition(Board &board, std::string_view command, SEARCH::Search
MOVEGEN::GenerateMoves<All>(board); MOVEGEN::GenerateMoves<All>(board);
} }
static int ReadParam(std::string param, std::string &command) { static double ReadParam(const std::string& param, const std::string &command) {
size_t pos = command.find(param); size_t pos = command.find(param);
if (pos != std::string::npos) { if (pos == std::string::npos)
pos += param.length() + 1; return 0.0;
bool isNegative = false;
std::string result = "";
// Check for negative sign pos += param.length() + 1; // skip "param "
if (pos < command.length() && command[pos] == '-') { std::string result;
isNegative = true;
pos++; // optional sign
if (pos < command.length() && (command[pos] == '-' || command[pos] == '+')) {
result += command[pos];
pos++;
}
// digits and optional decimal point
bool decimalSeen = false;
while (pos < command.length() && (std::isdigit(command[pos]) || command[pos] == '.')) {
if (command[pos] == '.') {
if (decimalSeen) break; // only one decimal point
decimalSeen = true;
} }
result += command[pos++];
}
// Extract digits if (!result.empty()) {
while (pos < command.length() && std::isdigit(command[pos])) { try {
result += command[pos]; return std::stod(result);
pos++; } catch (const std::out_of_range&) {
} return (result[0] == '-') ? -1e308 : 1e308; // clamp to double range
} catch (const std::invalid_argument&) {
// Ensure result is not empty before calling stoi return 0.0;
if (!result.empty()) {
int value = std::stoi(result);
return isNegative ? -value : value;
} }
} }
return 0; return 0.0;
} }
#ifdef _WIN32 #ifdef _WIN32
// Windows implementation using std::thread // Windows implementation using std::thread
template <SEARCH::searchMode mode> template <SEARCH::searchMode mode>
@@ -169,7 +178,9 @@ static void SetOption(std::string& command, SEARCH::SearchContext* ctx) {
name.erase(0, name.find_first_not_of(' ')); name.erase(0, name.find_first_not_of(' '));
name.erase(name.find_last_not_of(' ') + 1); name.erase(name.find_last_not_of(' ') + 1);
int rawValue = ReadParam("value", command); double rawValue = ReadParam("value", command);
std::cout << rawValue << std::endl;
#define X_DOUBLE(paramName, default_val, min_val, max_val, step_val) \ #define X_DOUBLE(paramName, default_val, min_val, max_val, step_val) \
if (name == #paramName) { \ if (name == #paramName) { \