Skip to content

Commit

Permalink
Fix #729 (scoreMean & scoreStdev)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiraoka committed Jul 6, 2020
1 parent aa7a276 commit e0a49d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/featurecat/lizzie/gui/LizzieFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int
double curWR = stats.maxWinrate; // winrate on this move
double curSM = stats.maxScoreMean; // mean score on this move
boolean validWinrate = (stats.totalPlayouts > 0); // and whether it was actually calculated
boolean validScore = validWinrate;
if (!validWinrate) {
curWR = Lizzie.board.getHistory().getData().winrate;
validWinrate = Lizzie.board.getHistory().getData().getPlayouts() > 0;
Expand Down Expand Up @@ -967,7 +968,7 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int
setPanelFont(g, (int) (min(width, height) * 0.2));

String text = "";
if (Lizzie.leelaz.isKataGo) {
if (Lizzie.leelaz.isKataGo && validScore) {
double score = Lizzie.leelaz.scoreMean;
if (Lizzie.board.getHistory().isBlacksTurn()) {
if (Lizzie.config.showKataGoBoardScoreMean) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/featurecat/lizzie/gui/WinratePane.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int
Leelaz.WinrateStats stats = Lizzie.leelaz.getWinrateStats();
double curWR = stats.maxWinrate; // winrate on this move
boolean validWinrate = (stats.totalPlayouts > 0); // and whether it was actually calculated
boolean validScore = validWinrate;
if (Lizzie.frame.isPlayingAgainstLeelaz
&& Lizzie.frame.playerIsBlack == !Lizzie.board.getHistory().getData().blackToPlay) {
validWinrate = false;
Expand Down Expand Up @@ -172,7 +173,7 @@ private void drawMoveStatistics(Graphics2D g, int posX, int posY, int width, int
setPanelFont(g, (int) (min(width, height) * 0.2));

String text = "";
if (Lizzie.leelaz.isKataGo) {
if (Lizzie.leelaz.isKataGo && validScore) {
double score = Lizzie.leelaz.scoreMean;
if (Lizzie.board.getHistory().isBlacksTurn()) {
if (Lizzie.config.showKataGoBoardScoreMean) {
Expand Down

0 comments on commit e0a49d4

Please sign in to comment.