View | Details | Raw Unified
Collapse All | Expand All

(-) gnushogi/genmove.c.old (-10 / +10 lines)
 Lines 40-46    Link Here 
static short InCheck = false, GenerateAllMoves = false;
static short InCheck = false, GenerateAllMoves = false;
static short check_determined = false;
static short check_determined = false;
static short INCscore = 0;
static short INCscore_local = 0;
short deepsearchcut = true;
short deepsearchcut = true;
short tas = false, taxs = false, ssa = false;
short tas = false, taxs = false, ssa = false;
 Lines 261-267    Link Here 
        node->reply = 0;
        node->reply = 0;
        node->flags = local_flag;
        node->flags = local_flag;
        node->score = s;
        node->score = s;
        node->INCscore = INCscore;
        node->INCscore = INCscore_local;
        if (GenerateAllMoves)
        if (GenerateAllMoves)
        {
        {
 Lines 504-510    Link Here 
                if ((boardu = board[u]) == king)
                if ((boardu = board[u]) == king)
                {
                {
                    s += 20; INCscore -= 18;
                    s += 20; INCscore_local -= 18;
                    *local_flag |= check; /* move threatens
                    *local_flag |= check; /* move threatens
                                           * opponents king */
                                           * opponents king */
                }
                }
 Lines 555-561    Link Here 
    }
    }
    while (u != t);
    while (u != t);
    INCscore += s;
    INCscore_local += s;
    return s;
    return s;
}
}
 Lines 620-626    Link Here 
        return;
        return;
    }
    }
    INCscore = 0;
    INCscore_local = 0;
#ifdef HISTORY
#ifdef HISTORY
    s += history[hindex(side, mv)];
    s += history[hindex(side, mv)];
 Lines 645-658    Link Here 
        {
        {
            /* bonus for square near enemy king */
            /* bonus for square near enemy king */
            s += 15;
            s += 15;
            INCscore += 2;
            INCscore_local += 2;
            local_flag |= kingattack;
            local_flag |= kingattack;
        }
        }
        else if (distance(t, OwnKing) <= 1)
        else if (distance(t, OwnKing) <= 1)
        {
        {
            /* bonus for square near own king */
            /* bonus for square near own king */
            s += 10;
            s += 10;
            INCscore++;
            INCscore_local++;
            local_flag |= kingattack;
            local_flag |= kingattack;
        }
        }
    }
    }
 Lines 765-771    Link Here 
        {
        {
            /* bonus for promotions */
            /* bonus for promotions */
            s++;
            s++;
            INCscore += value[stage][promoted[piece]] - value[stage][piece];
            INCscore_local += value[stage][promoted[piece]] - value[stage][piece];
        }
        }
        else
        else
        {
        {
 Lines 787-798    Link Here 
                    if (piece == pawn || piece == bishop || piece == rook)
                    if (piece == pawn || piece == bishop || piece == rook)
                    {
                    {
                        local_flag |= stupid;
                        local_flag |= stupid;
                        INCscore -= 20;
                        INCscore_local -= 20;
                    }
                    }
                    else
                    else
                    {
                    {
                        local_flag |= questionable;
                        local_flag |= questionable;
                        INCscore -= 10;
                        INCscore_local -= 10;
                    }
                    }
                }
                }
            }
            }