Computer Chess Club Archives


Search

Terms

Messages

Subject: Branching Factor = q/p ?

Author: Matthias Gemuh

Date: 06:21:26 11/23/01



Hi Experts,
look at this piece of code:


p = 0; q = 0;

int AlphaBeta(int depth, int alpha, int beta)
{
    nLegalMoveCount = 0;
    if (depth == 0) return Evaluate();
    GenerateMoves();
    while (MovesLeft()) {
        MakeNextMove();
        if (!inCheck()) {

            nLegalMoveCount++; p = p + 1;
            if (nLegalMoveCount == 1) q = q + 1;

            val = -AlphaBeta(depth - 1, -beta, -alpha);
            UnmakeMove();
            if (val >= beta) return beta;
            if (val > alpha) alpha = val;
        }
    }
    return alpha;
}


Is the ratio q/p the thing bearing the sophiscated name "Branching Factor" ?
Optimal move ordering should mean q/p = 1. Do Profis come close to this?
In my pogram q/p is about 1/6 or 1/7. Must I weep ?

Thanx,
Matthias.




This page took 0.01 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.