mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-29 17:35:16 +00:00
Fix GoL-Halt Determinism (#317)
* test alt case * fix determinism of gol-halt
This commit is contained in:
parent
e01910254d
commit
d9ef4f4d14
3 changed files with 19 additions and 0 deletions
|
|
@ -23,11 +23,14 @@ def test_game_of_life_config_validation():
|
|||
def test_game_of_life_deterministic():
|
||||
"""Test that dataset generates same items with same seed"""
|
||||
config = GameOfLifeConfig(seed=42, size=10)
|
||||
config2 = GameOfLifeConfig(seed=43, size=10)
|
||||
dataset1 = GameOfLifeDataset(config)
|
||||
dataset2 = GameOfLifeDataset(config)
|
||||
dataset3 = GameOfLifeDataset(config2)
|
||||
|
||||
for i in range(len(dataset1)):
|
||||
assert dataset1[i] == dataset2[i]
|
||||
assert dataset1[i] != dataset3[i]
|
||||
|
||||
|
||||
def test_game_of_life_basic_properties():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue