mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
test: Add partial move sequence test for Rush Hour board
This commit is contained in:
parent
5750bd29a7
commit
f0ad47a29a
1 changed files with 4 additions and 1 deletions
|
|
@ -6,6 +6,9 @@ from reasoning_gym.games.rush_hour import Board
|
|||
def test_perform_moves():
|
||||
b = Board("GBBoLoGHIoLMGHIAAMCCCKoMooJKDDEEJFFo")
|
||||
assert not b.solved
|
||||
solution = "F+1 K+1 M-1 C+3 H+2 J-1 E+1 G+3 B-1 I-1 A-3 I+1 L+1 B+3 I-1 A+2 G-3 E-1 H-3 A-1 J+1 C-3 M+1 B+1 K-4 A+1 C+2 D-1 F-1 H+3 A-1 K+1 B-1 M-1 C+1 J-1 E+1 G+3 A-1 I+1 B-3 I-1 A+1 G-1 E-1 J+1 C-1 K-1 L-1 M+3 A+3"
|
||||
incomplete_moves = "F+1 K+1 M-1 C+3 H+2 J-1 E+1 G+3 B-1 I-1 A-3 I+1 L+1 B+3 I-1 A+2 G-3"
|
||||
b.perform_moves(incomplete_moves)
|
||||
assert not b.solved
|
||||
solution = "E-1 H-3 A-1 J+1 C-3 M+1 B+1 K-4 A+1 C+2 D-1 F-1 H+3 A-1 K+1 B-1 M-1 C+1 J-1 E+1 G+3 A-1 I+1 B-3 I-1 A+1 G-1 E-1 J+1 C-1 K-1 L-1 M+3 A+3"
|
||||
b.perform_moves(solution)
|
||||
assert b.solved
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue