mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-11 00:22:41 +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:
@@ -99,7 +99,7 @@ class CtgBook implements IOpeningBook {
|
|||||||
if (options.preferMainLines)
|
if (options.preferMainLines)
|
||||||
weight *= 10;
|
weight *= 10;
|
||||||
}
|
}
|
||||||
int score = movePd.getOpponentScore();
|
float score = movePd.getOpponentScore() + 1e-4f;
|
||||||
// double w0 = weight;
|
// double w0 = weight;
|
||||||
weight = weight * score;
|
weight = weight * score;
|
||||||
// System.out.printf("%s : w0:%.3f rec:%d score:%d %.3f\n", TextIO.moveToUCIString(be.move),
|
// System.out.printf("%s : w0:%.3f rec:%d score:%d %.3f\n", TextIO.moveToUCIString(be.move),
|
||||||
@@ -426,7 +426,7 @@ class CtgBook implements IOpeningBook {
|
|||||||
return entries;
|
return entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return (wins + draws/2) / games. */
|
/** Return (loss * 2 + draws). */
|
||||||
final int getOpponentScore() {
|
final int getOpponentScore() {
|
||||||
int statStart = posLen + moveBytes;
|
int statStart = posLen + moveBytes;
|
||||||
// int wins = extractInt(buf, statStart + 3, 3);
|
// int wins = extractInt(buf, statStart + 3, 3);
|
||||||
|
|||||||
Reference in New Issue
Block a user