From: François Fleuret Date: Thu, 4 Jul 2024 01:57:39 +0000 (+0300) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=90f27333118e72b35068d7d7ac29e7b14f27aa3b;p=culture.git Update. --- diff --git a/reasoning.py b/reasoning.py index 768c15c..09e5362 100755 --- a/reasoning.py +++ b/reasoning.py @@ -27,9 +27,9 @@ class Reasoning(problem.Problem): ("cyan", [0, 255, 255]), ("violet", [255, 0, 255]), ("lightgreen", [192, 255, 192]), - ("pink", [255, 192, 192]), + ("brown", [165, 42, 42]), ("lightblue", [192, 192, 255]), - ("gray", [192, 192, 192]), + ("gray", [128, 128, 128]), ] def __init__(self, device=torch.device("cpu")): @@ -294,7 +294,7 @@ class Reasoning(problem.Problem): f_X[i1:i2, j1:j2] = c[n if n > 0 else -1] def task_move(self, A, f_A, B, f_B): - di, dj = torch.randint(2, (2,)) * 2 - 1 + di, dj = torch.randint(3, (2,)) - 1 nb_rec = 3 c = torch.randperm(len(self.colors) - 1)[:nb_rec] + 1 for X, f_X in [(A, f_A), (B, f_B)]: