mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-01-30 17:13:50 +01:00
DroidFish: Give a small positive weight for CTG book moves even if the book entry says wins=draws=0 for the move.
This commit is contained in:
parent
eb00cf60de
commit
cf212ff0ed
|
@ -99,11 +99,11 @@ class CtgBook implements IOpeningBook {
|
|||
if (options.preferMainLines)
|
||||
weight *= 10;
|
||||
}
|
||||
int score = movePd.getOpponentScore();
|
||||
// double w0 = weight;
|
||||
weight = weight * score;
|
||||
// System.out.printf("%s : w0:%.3f rec:%d score:%d %.3f\n", TextIO.moveToUCIString(be.move),
|
||||
// w0, recom, score, weight);
|
||||
float score = movePd.getOpponentScore() + 1e-4f;
|
||||
// double w0 = weight;
|
||||
weight = weight * score;
|
||||
// System.out.printf("%s : w0:%.3f rec:%d score:%d %.3f\n", TextIO.moveToUCIString(be.move),
|
||||
// w0, recom, score, weight);
|
||||
}
|
||||
be.weight = weight;
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ class CtgBook implements IOpeningBook {
|
|||
return entries;
|
||||
}
|
||||
|
||||
/** Return (wins + draws/2) / games. */
|
||||
/** Return (loss * 2 + draws). */
|
||||
final int getOpponentScore() {
|
||||
int statStart = posLen + moveBytes;
|
||||
// int wins = extractInt(buf, statStart + 3, 3);
|
||||
|
|
Loading…
Reference in New Issue
Block a user