Skip to content

Commit

Permalink
Excluding rules kept but commented out.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhernandezgarcia committed Oct 25, 2023
1 parent 82b3377 commit 30baa2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions gflownet/envs/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,7 @@ def is_excluded_from_training(self, state):
-------
True if the state should be excluded from training; False otherwise.
"""
# return state[0] <= 0.5 and state[1] <= 0.5
# return state[1] >= 0.5 and state[0] < 0.5
# return state[0] >= 0.5 and state[1] < 0.5
# return all([s >= 0.33 and s <= 0.66 for s in state])
Expand Down
1 change: 1 addition & 0 deletions gflownet/envs/tetris.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ def is_excluded_from_training(self, state):
True if the state should be excluded from training; False otherwise.
"""
upper_half = state[: self.height // 2, :]
# return torch.any(upper_half > 0)
has_O = torch.any(upper_half // self.max_pieces_per_type == self.piece2idx("O"))
has_I = torch.any(upper_half // self.max_pieces_per_type == self.piece2idx("I"))
return has_O or has_I
Expand Down

0 comments on commit 30baa2b

Please sign in to comment.