Rebel wrote:Cause I have nothing to add nor to distract.hyatt wrote:Have not seen a single piece of evidence from Ed. Wonder why?
What's causing the huge branch factor difference between 23.2 and 23.3 ?
Whatever the answer, it's not your original idea. You heard it from someone. And that person heard it from another one.
And In the end the origin of the idea comes from the hacked Rybka.
You Robert Hyatt are using idea's in Crafty that smell Rybka.
Hacked Rybka.
Idea's never meant to be yours.
Yet you use them.
23.2 and 23.3? Here is what was changed, and confirmed by using "diff" (anyone can verify this and that your claim is completely false with respect to "using rybka ideas." First, the comments from main.c:
* 23.3 Null-move search restriction changed to allow null-move searches *
* at any node where the side on move has at least one piece of any *
* type. Minor bug in ValidMove() fixed to catch "backward" pawn *
* moves and flag them as illegal. This sometimes caused an error *
* when annotating games and annotating for both sides. The killer *
* move array could have "backward" moves due to flipping sides back *
* and forth, which would cause some odd PV displays. Small change *
* to "reduce-at-root". We no longer reduce moves that are flagged *
* as "do not search in parallel". Check extension modified so that *
* if "SEE" says the check is unsafe, the extension is not done. We *
* found this to be worth about +10 Elo. We also now reduce any *
* capture move that appears in the "REMAINING_MOVES" phase since *
* they can only appear there if SEE returns a score indicating loss *
* of material. We now reduce a bit more aggressively, reducing by` *
* 2 plies once we have searched at least 4 moves at any ply. I *
* tried going to 3 on very late moves, but could not find any case *
* where this was better, even limiting it to near the root or other *
* ideas. But reducing by 2 plies after the at least 4 moves are *
* searched was an improvement. *
Taking the ideas one at a time. Null-move was restricted previously to one side having more than a rook. Not a single piece allows it to do a null-move search. It was significant. And it was done in older versions of Crafty. I have changed this "threshold" more times than I can remember.
Check extension was modified to not extend checks if Swap() (SEE) says the check is unsafe. You think that is in Rybka? Better look.
I used to not reduce captures, ever. I changed that to agree with the do not extend safe checks (based on SEE) so that we now do reduce a capture if SEE says it loses material. Not from Rybka. In fact, when I did this, I found no program that reduced a capture, period, nor one that didn't extend checks, regardless.
Finally, we changed the reduction (LMR) code very slightly. In version 23.2, I reduced by 1 ply. In 23.3 I reduce by 2 plies, with only one exception, that being that the first move searched is never reduced, to handle the case where I have no hash move, no good captures, and no killers. I did only reduce in the "REMAINING_MOVES" phase but that reduces every move if there are none of the moves mentioned above present. The new version reduces the first move by 1 ply, if it seems to be ok to reduce (not a safe capture or check or a passed pawn push, or other similar ideas you can find if you edit 23.3's "search.c" and search for "reduce."
Here is 23.2's code:
Code: Select all
if (tree->phase[ply] == REMAINING_MOVES && !tree->inchk[ply] &&
!extensions && moves_searched) {
if ((Piece(tree->curmv[ply]) != pawn ||
mask_passed[wtm][To(tree->
curmv[ply])] & Pawns(Flip(wtm)))) {
extensions =
Min(-Min(depth - 1 - LMR_remaining_depth,
(moves_searched >
2) ? LMR_max_reduction : LMR_min_reduction), 0);
if (extensions)
tree->reductions_done++;
}
Code: Select all
if (tree->phase[ply] == REMAINING_MOVES && !tree->inchk[ply] &&
!tree->inchk[ply + 1] && !CaptureOrPromote(tree->curmv[ply])) {
if (depth - 1 - LMR_depth >= LMR_min_depth &&
(Piece(tree->curmv[ply]) != pawn ||
mask_passed[wtm][To(tree->curmv[ply])] & Pawns(Flip(wtm))))
{
extensions -= LMR_depth;
tree->reductions_done++;
}
So, sorry, but the above changes _are_ my _original ideas_. Hate to disappoint you. Again, not _everybody_ has to copy to learn. And this code will likely change again as new ideas are tried and tested.
To end in your style,
You, Ed Schroeder, are about as full of crap as a Christmas turkey, with respect to the claims you have made here. Feel free to try to refute anything I wrote. Note that I compared the source for versions 23.2 and 23.3, completely. There are a total of 1023 lines of output. Only the indicated code was in search.c, the rest was in variable names, or some substantial evaluation changes from Tracy and myself.
For reference, the "diff" output for search.c by itself:
Code: Select all
search.c
3c3
< /* last modified 07/16/10 */
---
> /* last modified 12/21/09 */
20c20
< register int extensions;
---
> register int extensions, pieces;
163c163,164
< HashStore(tree, ply, MAX_DRAFT, wtm, EXACT, alpha, 0);
---
> HashStore(tree, ply, MAX_DRAFT, wtm, EXACT, alpha,
> tree->pv[ply].path[ply]);
201,203c202,206
< if (do_null && alpha == beta - 1 && depth > 1 && !tree->inchk[ply] &&
< TotalPieces(wtm, occupied)) {
< register BITBOARD save_hash_key;
---
> pieces =
> (wtm) ? TotalPieces(white, occupied) : TotalPieces(black, occupied);
> if (do_null && alpha == beta - 1 && depth > 1) {
> if (!tree->inchk[ply] && pieces && (pieces > 9 || depth < 7)) {
> register BITBOARD save_hash_key;
205,206c208,209
< tree->curmv[ply] = 0;
< tree->phase[ply] = NULL_MOVE;
---
> tree->curmv[ply] = 0;
> tree->phase[ply] = NULL_MOVE;
208,209c211,212
< if (ply <= trace_level)
< Trace(tree, ply, depth, wtm, beta - 1, beta, "Search1", 0);
---
> if (ply <= trace_level)
> Trace(tree, ply, depth, wtm, beta - 1, beta, "Search1", 0);
211,229c214,233
< tree->position[ply + 1] = tree->position[ply];
< Rule50Moves(ply + 1) = 0;
< save_hash_key = HashKey;
< if (EnPassant(ply)) {
< HashEP(EnPassant(ply + 1));
< EnPassant(ply + 1) = 0;
< }
< if (depth - null_depth - 1 > 0)
< value =
< -Search(tree, -beta, -beta + 1, Flip(wtm), depth - null_depth - 1,
< ply + 1, NO_NULL);
< else
< value = -QuiesceChecks(tree, -beta, -beta + 1, Flip(wtm), ply + 1);
< HashKey = save_hash_key;
< if (abort_search || tree->stop)
< return (0);
< if (value >= beta) {
< HashStore(tree, ply, depth, wtm, LOWER, value, tree->curmv[ply]);
< return (value);
---
> tree->position[ply + 1] = tree->position[ply];
> Rule50Moves(ply + 1) = 0;
> save_hash_key = HashKey;
> if (EnPassant(ply)) {
> HashEP(EnPassant(ply + 1));
> EnPassant(ply + 1) = 0;
> }
> if (depth - null_depth - 1 > 0)
> value =
> -Search(tree, -beta, -beta + 1, Flip(wtm), depth - null_depth - 1,
> ply + 1, NO_NULL);
> else
> value = -QuiesceChecks(tree, -beta, -beta + 1, Flip(wtm), ply + 1);
> HashKey = save_hash_key;
> if (abort_search || tree->stop)
> return (0);
> if (value >= beta) {
> HashStore(tree, ply, depth, wtm, LOWER, value, tree->curmv[ply]);
> return (value);
> }
271,274c275,276
< if (SwapO(tree, tree->curmv[ply], wtm) <= 0) {
< tree->extensions_done++;
< extensions = check_depth;
< }
---
> tree->extensions_done++;
> extensions = check_depth;
288c290
< * the LMR_remaining_depth value). *
---
> * the LMR_min_depth value). *
299,308c301,307
< !extensions && moves_searched) {
< if ((Piece(tree->curmv[ply]) != pawn ||
< mask_passed[wtm][To(tree->
< curmv[ply])] & Pawns(Flip(wtm)))) {
< extensions =
< Min(-Min(depth - 1 - LMR_remaining_depth,
< (moves_searched >
< 2) ? LMR_max_reduction : LMR_min_reduction), 0);
< if (extensions)
< tree->reductions_done++;
---
> !tree->inchk[ply + 1] && !CaptureOrPromote(tree->curmv[ply])) {
> if (depth - 1 - LMR_depth >= LMR_min_depth &&
> (Piece(tree->curmv[ply]) != pawn ||
> mask_passed[wtm][To(tree->curmv[ply])] & Pawns(Flip(wtm))))
> {
> extensions -= LMR_depth;
> tree->reductions_done++;
436d434
< tree->moves_searched = moves_searched;
501c499
< /* last modified 07/16/10 */
---
> /* last modified 07/04/09 */
571,574c569,570
< if (SwapO(tree, tree->curmv[ply], wtm) <= 0) {
< tree->extensions_done++;
< extensions = check_depth;
< }
---
> tree->extensions_done++;
> extensions = check_depth;
588c584
< * the LMR_remaining_depth value). *
---
> * the LMR_min_depth value). *
599,608c595,601
< !extensions) {
< if ((Piece(tree->curmv[ply]) != pawn ||
< mask_passed[wtm][To(tree->
< curmv[ply])] & Pawns(Flip(wtm)))) {
< extensions =
< Min(-Min(depth - 1 - LMR_remaining_depth,
< (tree->parent->moves_searched >
< 2) ? LMR_max_reduction : LMR_min_reduction), 0);
< if (extensions)
< tree->reductions_done++;
---
> !tree->inchk[ply + 1] && !CaptureOrPromote(tree->curmv[ply])) {
> if (depth - 1 - LMR_depth >= LMR_min_depth &&
> (Piece(tree->curmv[ply]) != pawn ||
> mask_passed[wtm][To(tree->curmv[ply])] & Pawns(Flip(wtm))))
> {
> extensions -= LMR_depth;
> tree->reductions_done++;
722d714
< tree->parent->moves_searched++;
750c742
< /* last modified 07/16/10 */
---
> /* last modified 07/04/09 */
764c756
< register int moves_searched = 0;
---
> register int first_move = 1;
792,795c784,785
< if (SwapO(tree, tree->curmv[1], wtm) <= 0) {
< tree->extensions_done++;
< extensions = check_depth;
< }
---
> tree->extensions_done++;
> extensions = check_depth;
809c799
< * the LMR_remaining_depth value). *
---
> * the LMR_min_depth value). *
819,821c809,812
< if (tree->phase[1] == REMAINING_MOVES && !tree->inchk[1] && !extensions
< && moves_searched) {
< if ((Piece(tree->curmv[1]) != pawn ||
---
> if (tree->phase[1] == REMAINING_MOVES && !tree->inchk[1] &&
> !tree->inchk[2] && !CaptureOrPromote(tree->curmv[1])) {
> if (depth - 1 - LMR_depth >= LMR_min_depth &&
> (Piece(tree->curmv[1]) != pawn ||
823,828c814,815
< extensions =
< Min(-Min(depth - 1 - LMR_remaining_depth,
< (moves_searched >
< 2) ? LMR_max_reduction : LMR_min_reduction), 0);
< if (extensions)
< tree->reductions_done++;
---
> extensions -= LMR_depth;
> tree->reductions_done++;
851c838
< if (moves_searched == 0) {
---
> if (first_move) {
857a845
> first_move = 0;
918d905
< moves_searched++;
944d930
< tree->moves_searched = moves_searched;
973c959
< if (moves_searched == 0) {
---
> if (first_move == 1) {
Again, ball is in your court. Feel free to tell me what I copied from Rybka? IP and Friends certainly reduce in a wildly different way than _I_ do, and that and the check extension idea are the only two changes that affect tree size with respect to effective branching factor...