Author: Nolan Denson
Date: 14:14:48 07/24/02
Ok from some post that Mike made i realize that i can change the extension
values of crafty .... but I am still not sure whats going on.
As you can see from below the singular ext for Matrix is set at .58 ... I am
not sure if this is bad or good ... So if i wanted to change this value what
would the command be or where in the code does the rest of this get change at.
I notice that mike changes these values via the crafty.rc file. Where are these
values actually effecting crafty ?? Which part of the code ?? Then if anyone has
an understanding of the code for singular extension and know where those values
are ... please post also.
Like i said I am not a programmer ... (but I am learning alot about it by doing
these kind of things) .... I want to change the .58 to a different value, and
run some test to see what happens. At the end of this message i posted the code
for singular extensions as well. Also do you guys that know about this think
that the .58 is too low or too high? Mike changes his values via the following
commands : via the crafty.rc
booster 76 76 225
ext in 1
ext th 1
ext one .75
ext pawn .75
one-reply extension..................0.75
in-check extension...................1.00
recapture extension..................0.75
pushpp extension.....................0.75
mate thrt extension..................0.75
singular extension...................0.58
one-reply extension..................0.75
in-check extension...................1.00
recapture extension..................0.75
pushpp extension.....................0.75
mate thrt extension..................0.75
singular extension...................0.58
one-reply extension..................0.75
in-check extension...................1.00
recapture extension..................0.75
pushpp extension.....................0.75
mate thrt extension..................0.75
singular extension...................0.58
one-reply extension..................0.75
in-check extension...................1.00
recapture extension..................0.75
pushpp extension.....................0.75
mate thrt extension..................0.75
singular extension...................0.58
Matrix v99.99 (2 cpus)
White(1): ext
one-reply extension..................0.00
in-check extension...................0.00
recapture extension..................0.00
pushpp extension.....................0.00
mate thrt extension..................0.00
singular extension...................0.58
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "chess.h"
#include "data.h"
#include "epdglue.h"
#define SINGULAR_MARGIN 50
/* modified 06/03/01 */
/*
********************************************************************************
* *
* Singular() is a routine used by Search() to determine if a move appears to *
* be "singular". IE is there one move that appears to be better than all of *
* the other moves by a significant margin (SINGULAR_MARGIN). if so, this *
* move is passed back to Search() which will extend this one move by the *
* normal extension amount (3/4 ply). *
* *
********************************************************************************
*/
int Singular(TREE *tree, int alpha, int wtm, int depth, int ply)
{
register int singular=0;
int singular_move=0,tried=0;
register int value;
register int save_hash_move;
/*
----------------------------------------------------------
| |
| initialize. |
| |
----------------------------------------------------------
*/
/*printf("singular test begins, ply=%d...\n",ply);*/
tree->in_check[ply+1]=0;
tree->extended_reason[ply+1]=no_extension;
tree->last[ply]=tree->last[ply-1];
tree->next_status[ply].phase=HASH_MOVE;
save_hash_move=tree->hash_move[ply];
/*
----------------------------------------------------------
| |
| now iterate through the move list and search the |
| resulting positions. note that Search() culls any |
| move that is not legal by using Check(). the special |
| case is that we must find one legal move to search to |
| confirm that it's not a mate or draw. |
| |
----------------------------------------------------------
*/
while ((tree->phase[ply]=NextMove(tree,ply,wtm))) {
if (++tried>3 && !singular) break;
/*
----------------------------------------------------------
| |
| if there's only one legal move, the move is singular |
| "by definition". |
| |
----------------------------------------------------------
*/
if (tree->last[ply]-tree->last[ply-1] == 1) {
singular=2;
break;
}
/*
----------------------------------------------------------
| |
| now make the move and search the resulting position. |
| if we are in check, the current move must be legal |
| since NextEvasion ensures this, otherwise we have to |
| make sure the side-on-move is not in check after the |
| move to weed out illegal moves and save time. |
| |
----------------------------------------------------------
*/
MakeMove(tree,ply,tree->current_move[ply],wtm);
if (tree->in_check[ply] || !Check(wtm)) {
/*
----------------------------------------------------------
| |
| if the move to be made checks the opponent, then we |
| need to remember that he's in check. |
| |
----------------------------------------------------------
*/
if (Check(ChangeSide(wtm))) tree->in_check[ply+1]=1;
else tree->in_check[ply+1]=0;
value=-Search(tree,-alpha+SINGULAR_MARGIN+1,-alpha+SINGULAR_MARGIN,
ChangeSide(wtm), depth-(INCPLY*4),ply+1,1);
if (abort_search) {
UnMakeMove(tree,ply,tree->current_move[ply],wtm);
return(0);
}
if (value > alpha-SINGULAR_MARGIN-1) {
singular++;
singular_move=tree->current_move[ply];
}
}
UnMakeMove(tree,ply,tree->current_move[ply],wtm);
if (singular > 1) break;
}
/*
----------------------------------------------------------
| |
| all moves have been searched. |
| |
----------------------------------------------------------
*/
tree->hash_move[ply]=save_hash_move;
//printf("singular test ends, ply=%d...\n",ply);
if (singular != 1) return(0);
return(singular_move);
}
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.