This commit is contained in:
Sander Land committed 2020-09-06 13:00:40 +02:00
1 parent 163ca07d90
commit 046e3a02d7
2 files changed
+8 -7

No files matched your search

+6 -6
View File
@@ -362,7 +362,7 @@ class BadukPanWidget(Widget):
polsize = 1.1 * math.sqrt(policy_grid[y][x])
policy_circle_color = (
*POLICY_COLOR,
GHOST_ALPHA + TOP_MOVE_ALPHA * (policy_grid[y][x] == best_move_policy),
POLICY_ALPHA + TOP_MOVE_ALPHA * (policy_grid[y][x] == best_move_policy),
)
draw_circle(
(self.gridpos_x[x], self.gridpos_y[y]), polsize * self.stone_size, policy_circle_color
@@ -395,7 +395,7 @@ class BadukPanWidget(Widget):
self.draw_hover_contents()
def draw_hover_contents(self, *_args):
ghost_alpha = GHOST_ALPHA
ghost_alpha = POLICY_ALPHA
katrain = self.katrain
game_ended = katrain.game.end_result
current_node = katrain.game.current_node
@@ -415,16 +415,16 @@ class BadukPanWidget(Widget):
for i, move_dict in enumerate(hint_moves):
move = Move.from_gtp(move_dict["move"])
if move.coords is not None:
alpha, scale = GHOST_ALPHA, 1.0
scale = 0.95
if move_dict["visits"] < VISITS_FRAC_SMALL * hint_moves[0]["visits"]:
scale = 0.8
scale = 0.75
if "pv" in move_dict:
self.active_pv_moves.append((move.coords, move_dict["pv"], current_node))
else:
katrain.log(f"PV missing for move_dict {move_dict}", OUTPUT_DEBUG)
evalsize = self.stone_size * scale
evalcol = self.eval_color(move_dict["pointsLost"])
Color(*evalcol)
Color(*evalcol[:3], HINTS_ALPHA)
Rectangle(
pos=(self.gridpos_x[move.coords[0]] - evalsize, self.gridpos_y[move.coords[1]] - evalsize),
size=(2 * evalsize, 2 * evalsize),
@@ -456,7 +456,7 @@ class BadukPanWidget(Widget):
)
# children of current moves in undo / review
alpha = GHOST_ALPHA
alpha = POLICY_ALPHA
if katrain.analysis_controls.show_children.active:
for child_node in current_node.children:
points_lost = child_node.points_lost
+2 -1
View File
@@ -61,7 +61,8 @@ BOARD_COLOR = [0.85, 0.68, 0.40, 1]
STONE_SIZE = 0.505 # texture edge is transparent
VISITS_FRAC_SMALL = 0.1
GHOST_ALPHA = 0.5
POLICY_ALPHA = 0.5
HINTS_ALPHA = 0.75
TOP_MOVE_ALPHA = 0.4
TOP_MOVE_BORDER_COLOR = [10 / 255, 200 / 255, 250 / 255, 1.0]
CHILD_SCALE = 0.95