# Sokoban Level 3e

Sokoban Level 3e is one of the new maps for Sokoban in some variants of NetHack. It may appear as a second level map for Sokoban in UnNetHack, and may appear as a third level map for Sokoban in EvilHack, SpliceHack-Rewrite and Hack'EM; in Hack'EM, the level map is named "The Pergola". It has 14 boulders and holes, leaving no spare boulders.

This level may be flipped horizontally or vertically in UnNetHack, like all Sokoban levels there.

```    ------------------ 0 boulder
----....|.........+.| ^ hole
|....--.|.........|^| > starting position/downstairs
|.0.....|.<.......|^| < upstairs
---.----.|.........|^| # iron bars
|..0...0.-#-#-#-#-#-^|
|...00.00^^^^^^^^^^..|
|....0..0--#-#-#-#-..|
-->--.--.|...........|
|--..0..|.....00....|
|...00..|...........|
|....|..|...........|
---------------------
```

## Strategy

The following solution may not be very fast or organized. Improvements welcome. Like all Sokoban levels, it can be solved without making any boulders 'stick'.

All boulders are replaced by letters so they can be referred to. Moving the boulders is shortened to r for right, l for left, u for up, d for down. An asterisk is used to denote the last move filled a hole (and thus removed the boulder from the game). So "N ddrr*" means move boulder N two times down and two times to the right into a hole.

First, clear a way to the boulders closest to the holes and push them in:

```    ------------------ B u
----....|.........+.| C r
|....--.|.........|^| F d
|.A.....|.<.......|^| G r*
---.----.|.........|^| H lll
|..B...C.-#-#-#-#-#-^| I dddu uuu
|...DE.FG^^^^^^^^^^..| F l
|....H..I--#-#-#-#-..| I rr*
--@--.--.|...........| C uuud dddr rr*
|--..J..|.....KL....| F rrdd duuu urrr r*
|...MN..|...........|
|....|..|...........|
---------------------
```

Fill the next three holes with the boulders in the lower chamber:

```    ------------------ J rruu urrr rr*
----....|.........+.| M urrr uuur rrrr r*
|....--.|.........|^| N rruu uurr rrrr r*
|.A.....|.<.......|^|
---B----.|.........|^|
|........-#-#-#-#-#-^|
|...DE.....@.^^^^^^..|
|.H......--#-#-#-#-..|
-->--.--.|...........|
|--..J..|.....KL....|
|...MN..|...........|
|....|..|...........|
---------------------
```

Use the boulders in the entrance chamber to open a way to the halfway point:

```    ------------------ D d
----....|.........+.| E rrrr rrrr rrr*
|....--.|.........|^| D rrrr urrr rrrr rr*
|.A.....|.<.......|^| H rrrr rrur rrrr rrrr r*
---B----.|.........|^|
|........-#-#-#-#-#-^|
|...DE........@.^^^..|
|.H......--#-#-#-#-..|
-->--.--.|...........|
|--.....|.....KL....|
|.......|...........|
|....|..|...........|
---------------------
```

The last four pits can now be filled:

```    ------------------ K urrr rruu u*
----....|.........+.| L rrrr uuuu u*
|....--.|.........|^| A r
|.A.....|.<.......|^| B ddrr rrrr rrrr rrrr rrru uu*
---B----.|.........|^| A lddd rrrr rrrr rrrr rrrr ruuu u*
|........-#-#-#-#-#-^|
|................@...|
|........--#-#-#-#-..|
-->--.--.|...........|
|--.....|.....KL....|
|.......|...........|
|....|..|...........|
---------------------
```

The level is now complete:

```    ------------------
----....|.........+.|
|....--.|.........|.|
|.......|.<.......|@|
---.----.|.........|.|
|........-#-#-#-#-#-.|
|....................|
|........--#-#-#-#-..|
-->--.--.|...........|
|--.....|...........|
|.......|...........|
|....|..|...........|
---------------------
```