Skip to content

Commit b4c7ac5

Browse files
added generate random test set
1 parent 4bc6221 commit b4c7ac5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/domains/pancake.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,7 @@ def generate_state(size, steps):
9393
state.apply_action(np.random.choice(actions))
9494

9595
return state
96+
97+
@staticmethod
98+
def generate_random_state(size):
99+
return Pancake(list(np.random.permutation(size)))

src/domains/sliding_tile_puzzle.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,7 @@ def generate_state(size:int, n_steps_goal:int):
206206
state.apply_action(np.random.choice(actions))
207207

208208
return state
209+
210+
@staticmethod
211+
def generate_random_state(size:int):
212+
raise NotImplementedError

0 commit comments

Comments
 (0)