position fen 8/2Nb4/pp6/4rp1p/1Pp1pPkP/PpPpR3/1B1P2N1/1K6 w - -
go mate 5
info string no mate in 1 found
info string no mate in 2 found
info string no mate in 3 found
info string no mate in 4 found
info depth 9 seldepth 9 multipv 1 score mate 5 nodes 2282138 nps 3143440 tbhits 0 time 726 pv b1c1 d7a4 c1d1 a6a5 d1e1 a5b4 e1f2 b4c3 e3g3
bestmove b1c1 ponder d7a4
position fen 1K1N1b2/RPp1pr2/1kP5/2p5/P7/4B1P1/4p1b1/6n1 w - -
go mate 6
info string no mate in 1 found
info string no mate in 2 found
info string no mate in 3 found
info string no mate in 4 found
info string no mate in 5 found
info depth 11 currmove a7a5 currmovenumber 4
info depth 11 currmove e3d4 currmovenumber 5
info depth 11 currmove a7a8 currmovenumber 6
info depth 11 currmove b8c8 currmovenumber 7
info depth 11 seldepth 11 multipv 1 score mate 6 nodes 30712883 nps 3368009 hashfull 0 tbhits 0 time 9119 pv b8c8 g2h3 g3g4 h3g4 c8b8 g4d7 c6d7 c7c6 b8a8 b6c7 b7b8q
bestmove b8c8 ponder g2h3
position fen 1N1K1b1r/P3pPp1/4k1P1/rp1pB1RN/q4RP1/8/p2pB1p1/1b6 w - -
go mate 6
info string no mate in 1 found
info string no mate in 2 found
info string no mate in 3 found
info string no mate in 4 found
info depth 9 currmove e5d6 currmovenumber 4
info depth 9 currmove e5f6 currmovenumber 5
info depth 9 currmove f4f5 currmovenumber 6
info depth 9 currmove g5f5 currmovenumber 7
info depth 9 currmove h5g7 currmovenumber 8
info depth 9 currmove e5g7 currmovenumber 9
info depth 9 currmove b8c6 currmovenumber 10
info depth 9 currmove e2c4 currmovenumber 11
info depth 9 currmove e5d4 currmovenumber 12
info depth 9 currmove e5c7 currmovenumber 13
info depth 9 currmove f4c4 currmovenumber 14
info depth 9 currmove f4d4 currmovenumber 15
info depth 9 currmove f4e4 currmovenumber 16
info depth 9 currmove d8c7 currmovenumber 17
info depth 9 currmove d8e8 currmovenumber 18
info depth 9 currmove d8c8 currmovenumber 19
info depth 9 currmove e2b5 currmovenumber 20
info depth 9 currmove h5g3 currmovenumber 21
info depth 9 currmove e2d3 currmovenumber 22
info depth 9 currmove e2f3 currmovenumber 23
info depth 9 currmove e5c3 currmovenumber 24
info depth 9 currmove f4f3 currmovenumber 25
info depth 9 currmove f4b4 currmovenumber 26
info depth 9 currmove a7a8q currmovenumber 27
info depth 9 currmove a7a8r currmovenumber 28
info depth 9 currmove a7a8b currmovenumber 29
info depth 9 currmove a7a8n currmovenumber 30
info depth 9 currmove f4a4 currmovenumber 31
info depth 9 currmove b8a6 currmovenumber 32
info depth 9 currmove e5b2 currmovenumber 33
info depth 9 currmove f4f2 currmovenumber 34
info depth 9 currmove e2d1 currmovenumber 35
info depth 9 currmove e2f1 currmovenumber 36
info depth 9 currmove e5a1 currmovenumber 37
info depth 9 currmove f4f1 currmovenumber 38
info string no mate in 5 found
info depth 11 currmove f4f6 currmovenumber 1
info depth 11 currmove h5f6 currmovenumber 2
info depth 11 currmove b8d7 currmovenumber 3
info depth 11 seldepth 11 multipv 1 score mate 6 nodes 299839182 nps 3194127 hashfull 0 tbhits 0 time 93872 pv b8d7 g2g1q e5c7 a2a1q e2f3 b1e4 f4f5 e4f3 f5e5 a1e5 g5e5
bestmove b8d7 ponder g2g1q
position fen 1K1N1b2/RPp1pr2/1kP5/2p5/P7/4B1P1/4p1b1/6n1 w - -
go mate 6
info string no mate in 1 found
info string no mate in 2 found
info string no mate in 3 found
info string no mate in 4 found
info string no mate in 5 found
info depth 11 currmove e3d4 currmovenumber 5
info depth 11 currmove a7a8 currmovenumber 6
info depth 11 currmove b8c8 currmovenumber 7
info depth 11 seldepth 11 multipv 1 score mate 6 nodes 7058743 nps 1022709 hashfull 0 tbhits 0 time 6902 pv b8c8 g2h3 g3g4 h3g4 c8b8 g4d7 c6d7 c7c6 b8a8 b6c7 b7b8q
bestmove b8c8 ponder g2h3
position fen 1N1K1b1r/P3pPp1/4k1P1/rp1pB1RN/q4RP1/8/p2pB1p1/1b6 w - -
go mate 6
info string no mate in 1 found
info string no mate in 2 found
info string no mate in 3 found
info string no mate in 4 found
info depth 9 currmove e5d6 currmovenumber 4
info depth 9 currmove e5f6 currmovenumber 5
info depth 9 currmove f4f5 currmovenumber 6
info depth 9 currmove g5f5 currmovenumber 7
info depth 9 currmove h5g7 currmovenumber 8
info depth 9 currmove e5g7 currmovenumber 9
info depth 9 currmove b8c6 currmovenumber 10
info depth 9 currmove e2c4 currmovenumber 11
info depth 9 currmove e5d4 currmovenumber 12
info depth 9 currmove e5c7 currmovenumber 13
info depth 9 currmove f4c4 currmovenumber 14
info depth 9 currmove f4d4 currmovenumber 15
info depth 9 currmove f4e4 currmovenumber 16
info depth 9 currmove d8e8 currmovenumber 17
info depth 9 currmove d8c8 currmovenumber 18
info depth 9 currmove e2b5 currmovenumber 19
info depth 9 currmove h5g3 currmovenumber 20
info depth 9 currmove e2d3 currmovenumber 21
info depth 9 currmove e2f3 currmovenumber 22
info depth 9 currmove e5c3 currmovenumber 23
info depth 9 currmove f4f3 currmovenumber 24
info depth 9 currmove f4b4 currmovenumber 25
info depth 9 currmove a7a8q currmovenumber 26
info depth 9 currmove a7a8r currmovenumber 27
info depth 9 currmove a7a8b currmovenumber 28
info depth 9 currmove a7a8n currmovenumber 29
info depth 9 currmove f4a4 currmovenumber 30
info depth 9 currmove b8a6 currmovenumber 31
info depth 9 currmove e5b2 currmovenumber 32
info depth 9 currmove f4f2 currmovenumber 33
info depth 9 currmove e2d1 currmovenumber 34
info depth 9 currmove e2f1 currmovenumber 35
info depth 9 currmove e5a1 currmovenumber 36
info depth 9 currmove f4f1 currmovenumber 37
info depth 9 currmove d8c7 currmovenumber 38
info string no mate in 5 found
info depth 11 currmove f4f6 currmovenumber 1
info depth 11 currmove h5f6 currmovenumber 2
info depth 11 currmove b8d7 currmovenumber 3
info depth 11 seldepth 11 multipv 1 score mate 6 nodes 77304335 nps 1084775 hashfull 0 tbhits 0 time 71263 pv b8d7 g2g1q e5c7 a2a1q e2f3 b1e4 f4f5 e4f3 f5e5 a1e5 g5e5
bestmove b8d7 ponder g2g1q
position fen 1N1K1b1r/P3pPp1/4k1P1/rp1pB1RN/q4RP1/8/p2pB1p1/1b6 w - -
go mate 6
info string FEN: 1N1K1b1r/P3pPp1/4k1P1/rp1pB1RN/q4RP1/8/p2pB1p1/1b6 w - - (11+13)
info string Stellungs-Analyse: C0/R0/K1/P9/X34 W:8/38
info string Problem in Datenbank gefunden: #6; 00:01;
info string Suche nach Matt in 10 ... (Hash=64MB)
info depth 6 currmovenumber 11 currmove b8d7
info depth 6 time 238 score mate 6 pv b8d7
info depth 6 seldepth 6 currmovenumber 38 currmove d8c7 hashfull 42 nodes 610291 nps 692725
info string Suche abgeschlossen ... (Zeit=0.88s)
info string Matt in 6 gefunden ! (1 L÷sung in 00:00)
info depth 6 seldepth 6 time 881 score mate 6 multipv 1 pv b8d7 g2g1q e5c7 a2a1q e2f3 d2d1q f4d4 g1d4 g5e5 d4e5 d7c5
bestmove b8d7
position fen 1N1K1b1r/P3pPp1/4k1P1/rp1pB1RN/q4RP1/8/p2pB1p1/1b6 w - -
go mate 6
info string No mate in 1 found
info string No mate in 2 found
info string No mate in 3 found
info string No mate in 4 found
info depth 9 currmove e2c4 currmovenumber 17
info depth 9 currmove e5d4 currmovenumber 18
info depth 9 currmove f4b4 currmovenumber 19
info depth 9 currmove f4c4 currmovenumber 20
info depth 9 currmove f4d4 currmovenumber 21
info depth 9 currmove f4e4 currmovenumber 22
info depth 9 currmove h5g3 currmovenumber 23
info depth 9 currmove e2d3 currmovenumber 24
info depth 9 currmove e2f3 currmovenumber 25
info depth 9 currmove e5c3 currmovenumber 26
info depth 9 currmove f4f3 currmovenumber 27
info depth 9 currmove e5b2 currmovenumber 28
info depth 9 currmove f4f2 currmovenumber 29
info depth 9 currmove e2d1 currmovenumber 30
info depth 9 currmove e2f1 currmovenumber 31
info depth 9 currmove e5a1 currmovenumber 32
info depth 9 currmove f4f1 currmovenumber 33
info depth 9 currmove d8c8 currmovenumber 34
info depth 9 currmove d8e8 currmovenumber 35
info depth 9 currmove h5g7 currmovenumber 36
info depth 9 currmove e5g7 currmovenumber 37
info depth 9 currmove d8c7 currmovenumber 38
info string No mate in 5 found
info depth 11 currmove f4f6 currmovenumber 1
info depth 11 currmove e2b5 currmovenumber 2
info depth 11 currmove f4a4 currmovenumber 3
info depth 11 currmove a7a8q currmovenumber 4
info depth 11 currmove a7a8r currmovenumber 5
info depth 11 currmove a7a8b currmovenumber 6
info depth 11 currmove a7a8n currmovenumber 7
info depth 11 currmove b8d7 currmovenumber 8
info string Success! Mate in 6 found!
info depth 11 seldepth 11 multipv 1 score mate 6 nodes 27548385 nps 1062372 hashfull 0 tbhits 0 time 25931 pv b8d7 g2g1q e5c7 a2a1q e2f3 d2d1q f4d4 a1d4 d7c5 d4c5 g5e5
bestmove b8d7 ponder g2g1q
// Plain alpha-beta search function in negamax style,
// fail-soft framework.
Value search_mate(Position& pos, BasicStack* ss, Value alpha, Value beta, Depth depth) {
StateInfo st;
Value bestValue, value;
bool inCheck = !!pos.checkers();
int moveCount;
Color us = pos.side_to_move();
assert(alpha < beta);
// Start with a fresh pv
ss->pv.clear();
// At the leaf, we simply either return a mate score
// or zero. No evaluation needed!
if (depth == 0)
{
if (inCheck && !MoveList<LEGAL>(pos).size())
return mated_in(ss->ply);
else
return VALUE_DRAW;
}
// Check for draw by repetition and 50-move rule
if (pos.is_draw(ss->ply))
return VALUE_DRAW;
// TODO: Tablebase probe
// For the root color we can immediately return on
// TB draws or losses
bestValue = -VALUE_INFINITE;
moveCount = 0;
auto rankThisMove = 0;
// Search all legal moves
std::vector<RankedMove> legalMoves;
legalMoves.reserve(64); // avoid reallocations
auto king = pos.square<KING>(~us); // Square of the opponent's king
for (const auto& m : MoveList<LEGAL>(pos))
{
if (pos.gives_check(m))
rankThisMove += 2000 - 100 * distance(king, to_sq(m)); // Top priority!
else if (pos.capture(m))
rankThisMove += 200; // TODO MVV/LVA
else
rankThisMove += 20 * relative_rank(us, to_sq(m));
// Add this ranked move
legalMoves.emplace_back(RankedMove(m, rankThisMove));
rankThisMove = 0; // Reset for the next move
}
std::stable_sort(legalMoves.begin(), legalMoves.end(),
[](const RankedMove &rm1, const RankedMove &rm2) { return rm1.rank > rm2.rank; });
for (auto& rm : legalMoves)
{
moveCount++;
// At frontier nodes we can skip all non-checking moves
if ( depth == 1
&& rm.rank < 1000)
break;
pos.do_move(rm.move, st);
value = -search_mate(pos, ss+1, -beta, -alpha, depth-1);
pos.undo_move(rm.move);
// Do we have a new best value?
if (value > bestValue)
{
// Beta-cutoff?
if (value >= beta)
return value;
bestValue = value;
if (value > alpha)
{
// Update alpha
alpha = value;
// Reset PV and insert current best move
ss->pv.clear();
ss->pv.push_back(rm.move);
// Append child pv
for (auto& m : (ss+1)->pv)
ss->pv.push_back(m);
}
}
}
if (Threads.stop.load(std::memory_order_relaxed))
return VALUE_ZERO;
// No moves? Must be Mate or Stalemate!
if (!moveCount)
bestValue = inCheck ? mated_in(ss->ply) // Checkmate!
: VALUE_DRAW; // Stalemate!
assert(-VALUE_INFINITE < bestValue && bestValue < VALUE_INFINITE);
return bestValue;
}
struct BasicStack {
BasicStack() {
pv.reserve(8);
ply = 0;
}
std::vector<Move> pv;
int ply;
};
struct RankedMove {
RankedMove(Move m, int r) : move(m), rank(r) {}
Move move;
int rank;
};
> d.h. es ist wichtig dass der beste Zug an den Anfang kommt.
> Irrtum: Deine Aussage gilt für eine heuristische suche bei der es nicht um perfekte Ergebisse geht, sondern nur darum einen möglichst guten Zug zu finden.
position fen 1N1K1b1r/P3pPp1/4k1P1/rp1pB1RN/q4RP1/8/p2pB1p1/1b6 w - -
go mate 6
info depth 1 seldepth 1 multipv 1 score cp 0 nodes 2 nps 2000 tbhits 0 time 1 pv f4f6
info depth 3 seldepth 3 multipv 1 score cp 0 nodes 4399 nps 879800 tbhits 0 time 5 pv f4f6
info depth 7 seldepth 7 multipv 1 score cp 0 nodes 272546 nps 1222179 tbhits 0 time 223 pv f4f6
info currmove b8d7 currmovenumber 6
info string Success! Mate in 6 found!
info depth 9 seldepth 11 multipv 1 score mate 6 nodes 864765 nps 1219696 tbhits 0 time 709 pv b8d7 g2g1q e5c7 a2a1q e2f3 h8h5 g5e5 h5e5 f4f6 e7f6 d7f8
bestmove b8d7 ponder g2g1q
position fen k1r2q2/ppp5/6Qp/2P5/B7/5n2/5P2/1R5K w - -
go mate 4
Root move g6g1 PN: 30 DN: 1
Root move g6c2 PN: 30 DN: 1
Root move g6g2 PN: 30 DN: 1
Root move g6d3 PN: 30 DN: 1
Root move g6g3 PN: 30 DN: 1
Root move g6e4 PN: 50 DN: 39
Root move g6g4 PN: 30 DN: 1
Root move g6f5 PN: 65 DN: 21
Root move g6g5 PN: 31 DN: 1
Root move g6h5 PN: 30 DN: 30
Root move g6a6 PN: 0 DN: 10000000
Root move g6b6 PN: 30 DN: 1
Root move g6c6 PN: 29 DN: 507
Root move g6d6 PN: 30 DN: 1
Root move g6e6 PN: 30 DN: 1
Root move g6f6 PN: 65 DN: 21
Root move g6h6 PN: 30 DN: 1
Root move g6f7 PN: 61 DN: 21
Root move g6g7 PN: 30 DN: 1
Root move g6h7 PN: 30 DN: 1
Root move g6e8 PN: 29 DN: 1
Root move g6g8 PN: 29 DN: 1
Root move b1a1 PN: 30 DN: 1
Root move b1c1 PN: 30 DN: 1
Root move b1d1 PN: 30 DN: 1
Root move b1e1 PN: 30 DN: 1
Root move b1f1 PN: 30 DN: 1
Root move b1g1 PN: 30 DN: 1
Root move b1b2 PN: 30 DN: 1
Root move b1b3 PN: 30 DN: 1
Root move b1b4 PN: 30 DN: 1
Root move b1b5 PN: 29 DN: 1
Root move b1b6 PN: 30 DN: 1
Root move b1b7 PN: 29 DN: 36
Root move a4d1 PN: 30 DN: 1
Root move a4c2 PN: 30 DN: 1
Root move a4b3 PN: 30 DN: 1
Root move a4b5 PN: 29 DN: 1
Root move a4c6 PN: 29 DN: 40
Root move a4d7 PN: 30 DN: 1
Root move a4e8 PN: 29 DN: 1
Root move c5c6 PN: 32 DN: 1
Root move h1g2 PN: 30 DN: 1
info string Success! Mate in 4 found!
info time 5 multipv 1 depth 7 seldepth 7 nodes 6836 nps 1367200 tbhits 0 score mate 4 pv g6a6 c8b8 a4c6 f8f5 a6a7 a8a7 b1a1
bestmove g6a6 ponder c8b8
position fen 1N1K1b1r/P3pPp1/4k1P1/rp1pB1RN/q4RP1/8/p2pB1p1/1b6 w - -
go mate 6
Root move b8a6 PN: 216 DN: 259
Root move b8c6 PN: 233 DN: 267
Root move b8d7 PN: 0 DN: 10000000
Root move h5g3 PN: 245 DN: 67
Root move h5f6 PN: 233 DN: 36
Root move h5g7 PN: 215 DN: 177
Root move g5f5 PN: 215 DN: 117
Root move f4f1 PN: 215 DN: 91
Root move f4f2 PN: 225 DN: 132
Root move f4f3 PN: 225 DN: 142
Root move f4a4 PN: 215 DN: 11162
Root move f4b4 PN: 215 DN: 2104
Root move f4c4 PN: 215 DN: 3850
Root move f4d4 PN: 215 DN: 1319
Root move f4e4 PN: 215 DN: 4285
Root move f4f5 PN: 215 DN: 152
Root move f4f6 PN: 215 DN: 131
Root move e5a1 PN: 221 DN: 392
Root move e5b2 PN: 215 DN: 429
Root move e5c3 PN: 215 DN: 570
Root move e5d4 PN: 215 DN: 715
Root move e5d6 PN: 215 DN: 287
Root move e5f6 PN: 232 DN: 165
Root move e5c7 PN: 217 DN: 3427
Root move e5g7 PN: 216 DN: 202
Root move e2d1 PN: 228 DN: 99
Root move e2f1 PN: 230 DN: 84
Root move e2d3 PN: 222 DN: 337
Root move e2f3 PN: 215 DN: 1608
Root move e2c4 PN: 215 DN: 7803
Root move e2b5 PN: 215 DN: 3397
Root move a7a8q PN: 215 DN: 177
Root move a7a8r PN: 225 DN: 179
Root move a7a8b PN: 215 DN: 309
Root move a7a8n PN: 225 DN: 982
Root move d8c7 PN: 241 DN: 14
Root move d8e8 PN: 240 DN: 86
Root move d8c8 PN: 215 DN: 88
info string Success! Mate in 6 found!
info time 6682 multipv 1 depth 11 seldepth 11 nodes 10160763 nps 1520617 tbhits 0 score mate 6 pv b8d7 d5d4 f4f6 e6d5 e5h2 b1f5 h5f4 d5e4 f6e6 f5e6 g5e5
bestmove b8d7 ponder d5d4
Using ./huntsman with 1000000 nodes
Total fens: 6566
Found mates: 5147
Best mates: 3725
Using ./matefish with 1000000 nodes
Total fens: 6566
Found mates: 702
Best mates: 702
Powered by mwForum 2.29.3 © 1999-2014 Markus Wichitill