error in comments in stockfish 1.7.1

Discussion of chess software programming and technical issues.

Moderator: Ras

afzzq

error in comments in stockfish 1.7.1

Post by afzzq »

in "search.cpp" the comments for RootMove::operator< do not match the source:
---------

Code: Select all

 // RootMove::operator<() is the comparison function used when
    //  A move m1 is considered to be better
    // than a move m2 if it has a higher score, [b]or if the moves
    // have equal score but m1 has the higher node count.[/b]
    bool operator<(const RootMove& m) const {
        return score != m.score ? score < m.score : theirBeta <= m.theirBeta;
    }
--------
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: error in comments in stockfish 1.7.1

Post by mcostalba »

afzzq wrote:in "search.cpp" the comments for RootMove::operator< do not match the source:
Why ?
afzzq

Re: error in comments in stockfish 1.7.1

Post by afzzq »

mcostalba wrote:
afzzq wrote:in "search.cpp" the comments for RootMove::operator< do not match the source:
Why ?
Well, the comments say that the node count is used to break ties when the scores are equal, but the code says that the theirBeta value is used to break ties. Are these the same?
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: error in comments in stockfish 1.7.1

Post by mcostalba »

afzzq wrote:
mcostalba wrote:
afzzq wrote:in "search.cpp" the comments for RootMove::operator< do not match the source:
Why ?
Well, the comments say that the node count is used to break ties when the scores are equal, but the code says that the theirBeta value is used to break ties. Are these the same?
Ah, ok. Now I see, yes it was node count, but now is cut-off count.

Thanks for pointing out this.