「GYM102391B」Bigger Sokoban 40k

题意简述

GYM102391B

这有个游戏。
有一个 $n\times m$ 的网格图,每个格子可能是空地(.)或障碍物(#)。
还有一个放在空地里的 $2\times 2$ 的箱子(B),一个 $2\times 2$ 的目的地(S),和一个 $1\times 1$ 的玩家(P)。
每一步玩家可以上下左右移动,但是不能走到障碍上、箱子上或走出网格图。
如果玩家移动的方向上下一格是箱子,那么箱子会沿着相同的方向被推动。箱子不能被拉动。箱子不能被推到障碍上或出网格图。
当箱子到达目的地时就赢了。
现在请你构造一个 $n + m\le 100$ 的满足条件的网格图,使得有解且最小操作次数不小于 $40000$。

主要思路

八仙过海,各显神通。

首先我想让箱子每动几步都要让这个人绕很远到另一个方向来推。
于是得到了下面的答案。可以获得48213步的好成绩。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
47 53
SS...................................................
SS...................................................
##.###############################################...
#BB##...##########################################..#
PBB.....#....##########...#....##########...#....#...
........#.................#.................#........
....#...#.................#.................#........
#####..###..##...######...##..##...######...##..##...
...##..###..######...##..###..######...##..###..#####
........#...#....#........#...#....#........#...#....
........#........#........#........#........#........
...#....#........#...#....#........#...#....#........
#..######...##..###..######...##..###..######...##..#
#..##...######..###..##...######..###..##...######..#
........#....#...#........#....#...#........#....#...
........#........#........#........#........#........
....#...#........#....#...#........#....#...#........
#####..###..##...######..###..##...######..###..##...
...##..###..######...##..###..######...##..###..#####
........#...#....#........#...#....#........#...#....
........#........#........#........#........#........
...#....#........#...#....#........#...#....#........
#..######...##..###..######...##..###..######...##..#
#..##...######..###..##...######..###..##...######..#
........#....#...#........#....#...#........#....#...
........#........#........#........#........#........
....#...#........#....#...#........#....#...#........
#####..###..##...######..###..##...######..###..##...
...##..###..######...##..###..######...##..###..#####
........#...#....#........#...#....#........#...#....
........#........#........#........#........#........
...#....#........#...#....#........#...#....#........
#..######...##..###..######...##..###..######...##..#
#..##...######..###..##...######..###..##...######..#
........#....#...#........#....#...#........#....#...
........#........#........#........#........#........
....#...#........#....#...#........#....#...#........
#####..###..##...######..###..##...######..###..##...
...##..###..######...##..###..######...##..###..#####
........#...#....#........#...#....#........#...#....
........#........#........#........#........#........
...#....#........#...#....#........#...#....#........
#..######...##..###..######...##..###..######...##..#
#..##...######...##..##...######...##..##...######...
.................#.................#.................
.................#.................#.................
....##########...#....##########...#....##########...

后来我想了想,其实应该可以做一些

1
2
3
4
5
.########
.#...#...
.#.#.#.#.
.#.#.#.#.
...#...#.

之类的结构来更多地消耗步数。

然后借了一个 coach 号,看到了这个答案。可以获得63829步的好成绩。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
49 51
...............SS.................................P
.#############.SS##################################
.#...#...#...#...#..#....#..#....#..#....#..#....##
.#.#.#.#.#.#.#...#.......#.......#.......#.......##
.#.#.#.#.#.#.#...#......##.......#......##......###
.#.#.#.#.#.#.#...#...#...#...#...#...#...#...#.....
.#.#.#.#.#.#.#......##......##......##......##.....
.#.#.#.#.#.#.#.......#.......#.......#.......#.....
.#.#.#.#.#.#.#..#....#..#....#..#....#..#....###..#
.#.#.#.#.#.#.###################################..#
.#.#.#.#.#.#.##....#..#....#..#....#..#....#..##..#
.#.#.#.#.#.#.##.......#.......#.......#.......##..#
.#.#.#.#.#.#.###......##......#.......##......#...#
.#.#.#.#.#.#.##...#...#...#...#...#...#...#...#...#
.#.#.#.#.#.#.#....##......##......##......##......#
.#.#.#.#.#.#.#....#.......#.......#.......#.......#
.#.#.#.#.#.#.#....#....#..#....#..#....#..#....#..#
.#.#.#.#.#.#.#...##################################
.#.#.#.#.#.#.#...#..#....#..#....#..#....#..#....##
.#.#.#.#.#.#.#...#.......#.......#.......#.......##
.#.#.#.#.#.#.#...#......##.......#......##......###
.#.#.#.#.#.#.#...#...#...#...#...#...#...#...#.....
.#.#.#.#.#.#.#......##......##......##......##.....
.#.#.#.#.#.#.#.......#.......#.......#.......#.....
.#.#.#.#.#.#.#..#....#..#....#..#....#..#....###..#
.#.#.#.#.#.#.###################################..#
.#.#.#.#.#.#.##....#..#....#..#....#..#....#..##..#
.#.#.#.#.#.#.##.......#.......#.......#.......##..#
.#.#.#.#.#.#.###......##......#.......##......#...#
.#.#.#.#.#.#.##...#...#...#...#...#...#...#...#...#
.#.#.#.#.#.#.#....##......##......##......##......#
.#.#.#.#.#.#.#....#.......#.......#.......#.......#
.#.#.#.#.#.#.#....#....#..#....#..#....#..#....#..#
.#.#.#.#.#.#.#...##################################
.#.#.#.#.#.#.#...#..#....#..#....#..#....#..#....##
.#.#.#.#.#.#.#...#.......#.......#.......#.......##
.#.#.#.#.#.#.#...#......##.......#......##......###
.#.#.#.#.#.#.#...#...#...#...#...#...#...#...#.....
.#.#.#.#.#.#.#......##......##......##......##.....
.#.#.#.#.#.#.#.......#.......#.......#.......#.....
.#.#.#.#.#.#.#..#....#..#....#..#....#..#....###..#
.#.#.#.#.#.#.###################################..#
.#.#.#.#.#.#.##....#..#....#..#....#..#....#..##..#
.#.#.#.#.#.#.##.......#.......#.......#.......##..#
.#.#.#.#.#.#.###......##......#.......##......#...#
.#.#.#.#.#.#.##...#...#...#...#...#...#...#...#...#
.#.#.#.#.#.#.BB...##......##......##......##......#
.#.#.#.#.#.#.BB...#.......#.......#.......#.......#
...#...#...#####..#....#..#....#..#....#..#....#..#

怎么说,其实结构差别不是特别大。比较好的地方是舍弃了上面那两行空的,因为那显然不太优。

然后后来也找到了类似这种的。次数62624

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
45 55
#......................................................
#BB#################################################SS.
#BB#....########...#....########...#....########...#SS.
#P.#...............#...............#...............#...
#..##..............##..............##..............#..#
#..#...#########...#...#########...#...#########...#..#
#..#.......#..#...##.......#..#...##.......#..#...##..#
#..#.......#.......#.......#.......#.......#.......#..#
#..#..#...##.......#..#...##.......#..#...##.......#..#
#..#####...#...#########...#...#########...#...#####..#
#..#.......##...#..#.......##...#..#.......##...#..#..#
#..#.......#.......#.......#.......#.......#.......#..#
#..##...#..#.......##...#..#.......##...#..#.......#..#
#..#...#########...#...#########...#...#########...#..#
#..#.......#..#...##.......#..#...##.......#..#...##..#
#..#.......#.......#.......#.......#.......#.......#..#
#..#..#...##.......#..#...##.......#..#...##.......#..#
#..#####...#...#########...#...#########...#...#####..#
#..#.......##...#..#.......##...#..#.......##...#..#..#
#..#.......#.......#.......#.......#.......#.......#..#
#..##...#..#.......##...#..#.......##...#..#.......#..#
#..#...#########...#...#########...#...#########...#..#
#..#.......#..#...##.......#..#...##.......#..#...##..#
#..#.......#.......#.......#.......#.......#.......#..#
#..#..#...##.......#..#...##.......#..#...##.......#..#
#..#####...#...#########...#...#########...#...#####..#
#..#.......##...#..#.......##...#..#.......##...#..#..#
#..#.......#.......#.......#.......#.......#.......#..#
#..##...#..#.......##...#..#.......##...#..#.......#..#
#..#....########...#....########...#....########...#..#
#..#.......#..#...##.......#..#...##.......#..#...##..#
#..#.......#.......#.......#.......#.......#.......#..#
#..#..#...##.......#..#...##.......#..#...##.......#..#
#..#####...#...#########...#...#########...#...#####..#
#..#.......##...#..#.......##...#..#.......##...#..#..#
#..#.......#.......#.......#.......#.......#.......#..#
#..##...#..#.......##...#..#.......##...#..#.......#..#
#..#...#########...#...#########...#...#########...#..#
#..#.......#..#...##.......#..#...##.......#..#...##..#
#..#.......#.......#.......#.......#.......#.......#..#
#..#..#...##.......#..#...##.......#..#...##.......#..#
#..#####...#...#########...#...#########...#...#####...
#..........##..............##..............##..........
...........#...............#...............#...........
....####...#....########...#....########...#....####...

啊居然观赏性还挺高。
学到许多。(真的吗?)