1 2

Port-and-Sweep Solitaire

An interactive guide


The Rules

abcdefg 1234567 Reset board to initial state

Figure 1

Port-and-Sweep version of a famous peg solitaire puzzle.
Play until only a single counter remains in the center.

Port-and-Sweep Solitaire is a puzzle game played with counters on a board with a square grid. The fundamental rule of PaSS is:

There are two kinds of moves, which you can play in any direction (left, right, up or down):

Each move leaves one less counter on the board. The challenge in most port-and-sweep puzzles is to play until just one counter remains. Jump right in and try to finish the difficult puzzle in Figure 1 if you like, or read on for a gentler introduction (and more puzzles, of varying difficulty).

Example: Solve it in Six

The puzzle in Figure 2 can be solved in six moves. You can make the moves yourself by clicking and dragging on the figure, or click through the steps here in sequence:

  1. Sweep e1 → e4 (click on e1, then drag to e4)
  2. Port e4 → c4
  3. Sweep d4 → a4
  4. Sweep a5 → a2
  5. Port a2 → a4
  6. Port a4 → c4 leaving one counter at c4, done!

If things go awry, or you want to start over, click the reset button next to the board.

abcde 12345 Reset board to initial state

Figure 2

Play to a single counter. Click and drag on the figure above to make moves, or click the links in the walkthough to see the solution.

Warmups and Tips

The port and sweep moves can take some getting used to (especially if you're used to ordinary peg solitaire). Figure 3 offers four relatively forgiving problems on the 5×5 square board. Hopefully you won't get stuck for too long on any of them, but they illustrate some typical maneuvers.

Each move has source squares (the squares you're taking counters away from), and a target square (the square you're adding to). To clarify the rules a little further:

Try both possibilities for the first move in the upper-right puzzle. One solution uses two sweeps; the other uses just one. PaSS puzzles typically have a large number of possible solutions, and looking for a solution that ends with a long sequence of ports can be an interesting extra challenge.

Reset board to initial state Reset board to initial state Reset board to initial state Reset board to initial state

Figure 3

Warmups on the 5×5 board.
Play to a single counter in the center.

Small Puzzles: A Dozen Moves (Or So)

The 5×5 square is just about the smallest board that provides for interesting gameplay, but puzzles of a dozen or so moves on this board already make pretty good brain-teasers. The four puzzles in Figure 4 all finish with a single counter in the center of the board, though they exhibit a variety of symmetries in the initial arrangement of their counters. Despite the modest size, I think you'll find them satisfying to solve!

PaSS works well on a variety of board shapes. Figure 5 poses a few problems on the 25-square diamond. They don't all finish in the center, and that can make it harder to visualize a solution. That's where mathematics can help out: with some simple arithmetic, it is easy to deduce where the final counter could end up in these puzzles, even before you solve them. More about the calculations later, though!

I have a separate page full of selected puzzles, which includes many more 12-move puzzles to play on the 5×5 and 25-square diamond boards.

Reset board to initial state Reset board to initial state Reset board to initial state Reset board to initial state

Figure 4

Short but tricky puzzles on the 5×5 square.
All play to a single counter in the center.

Reset board to initial state Reset board to initial state Reset board to initial state Reset board to initial state

Figure 5

Twelve-move problems on the 25-square diamond.
Play to a single counter — not necessarily in the center.

Bigger Puzzles: Complement Problems in PaSS

Among the nicest PaSS puzzles are those like Figure 1 that begin with a single 2 on a board full of 1s, and finish with a single 1 where the 2 used to be. In the course of play, you end up removing one counter from every square, albeit in a very roundabout way. I call these complement problems, or more specifically, (-1)-complement problems.

The cross-shaped board in Figure 1, with 33 squares, is called the English board in the peg solitaire literature. George Bell's A Fresh Look at Peg Solitaire gives theoretical reasons behind the popularity of the English board for peg solitaire. Surprisingly, one of the best features holds true for PaSS, too: All (-1)-complement problems on the English board are solvable, no matter where the initial 2 is! They are all rather difficult to solve purely by trial and error; I think the "d2" problem is the most difficult of them.

Figure 6 shows a complement problem on a 6×6 board with the corners removed. I've taken to calling this the German board. Like the English board, all (-1)-complement problems on the German board are solvable. These are much easier than the English problems.

In Figure 7, we have a central complement problem on a 7×7 board with four interior squares missing. I call this the Swiss board (because of the holes). All (-1)-complement problems on the Swiss board are solvable, and challenging. Don't forget that you can port across the gaps!

For brevity, I've included only one complement problem here for each of the English, German, and Swiss boards, but all the possibilities are playable on the big puzzle collection page.

PaSS actually has two kinds of complements; there are (+1) as well as (-1) complement problems. In practice, the (+1) problems, although they look pretty, tend to be less interesting to play, so I haven't included any examples here. More on those later, perhaps.

abcdef 123456 Reset board to initial state

Figure 6

One of five possible complement problems on the German board.
Finish with a single counter at c3.

Reset board to initial state

Figure 7

Central complement problem on the Swiss board.
Finish with a single counter in the center.

About the Game: Sources and Targets

In 2009, I included a short unit on peg solitaire in my abstract algebra class as a fun "application" of finite fields — you can define invariants in the field of four elements for an elegant proof that certain peg solitaire puzzles are impossible [1]. I was curious whether there was a solitaire variant that would relate to the field of nine elements in a similar way. The idea of the sweep move was obvious, but by itself, it is too rigid and makes very dull puzzles. The port move also had the right algebraic properties, but was clearly terrible for puzzles! It took time to realize that allowing both moves could bring a game to life.

In 2010, I wrote a short article about Port-and-Sweep for Math Horizons [2]. It's an easy introduction to the mathematics of the game and how the field of nine elements comes to be involved. It was a fun article to write, but also somewhat disappointing, as I suspected that few people would ever bother trying the puzzles that appeared in print. I hope this page will make the game more accessible to play and enjoy.

For some time I wasn't sure if the game had much interest as a puzzle; I was afraid that the two moves were too powerful and made puzzles too easy to solve. Once I began exploring the problem space systematically, however, I found plenty of frustrating, elusive, and attractive problems even on small boards like the 5×5. I was even more excited when I realized that Port-and-Sweep has beautiful analogs to peg solitaire concepts like null-class boards and complement problems. Puzzles like Figure 1 are beautifully ordered at the beginning and end, but have to pass through chaos in their solution. They should offer a "through-the-looking-glass" experience for anyone who has mastered the jumps of ordinary peg solitaire and wants a fresh challenge.

Moreover, the mathematics of Port-and-Sweep seems easily as rich as that of peg solitaire. Theoretical problems like the Solitaire Army [3], long ago solved for ordinary peg solitaire, are fascinating to explore in the Port-and-Sweep world. Peg Solitaire is known to be NP-complete [4], and the same is probably true of PaSS (but I have not written a proof out yet). The solvable positions of peg solitaire on a 1×N strip form a regular language [5], and here, too, the proof can probably be adapted to PaSS (but I haven't done so yet).

References and Links

  1. de Bruijn (1972), A solitaire game and its relation to a finite field [PDF], Journal of Recreational Mathematics, 5: 133–137
  2. Siehler (2010), Port-and-Sweep Solitaire [PDF], Math Horizons, 18:1, 22-25
  3. Mathematical Mysteries: The Solitaire Advance, Plus Online Maths Mag. Issue 12, Sept. 2000.
  4. Uehara & Iwata (1990), Generalized Hi-Q is NP-complete [ResearchGate], Trans. IEICE.
  5. Moore & Eppstein (2000), One-Dimensional Peg Solitaire, and Duotaire, ArXiv, math.CO/0008172.