A peep is a move in a specific region such that
- looking just at that region, it would normally be a forcing move (even if the global situation means the opponent should respond elsewhere), and
- if the opponent does respond in that region (rather than merely close to it), then the exchange does not help the opponent and may help the player who played the peep.
This situation occurs if one threatens to cut a connection between major groups or key stones of the opponent, or to create a connection between one's own major groups or key stones.
Sometimes it's hard to tell if a move is sufficiently forcing, and whether the opponent can gain by resisting, rather than just responding in the obvious way. Playing correct peeps is one of the most sophisticated aspects of Hex strategy.
The term "peep" is borrowed from the game of Go. Another term for peep, also borrowed from Go but less frequently used, is nozoki.
If at least one of the shaded hexes is occupied by a piece of the indicated color, then Blue playing "*" is a peep. This is because in such cases, Red playing "*" would kill a. Therefore, if Red just defends the bridge, then Blue can't do any better here than Blue playing "*" and Red responding at a.
Similarly to the bridge peep, there can also be peeps at other templates, with suitable surrounding conditions. For example, consider the following position, where Red is connected to the bottom edge by a ziggurat.
If Red just defends the ziggurat, then Blue can't do any better here than Blue getting the outside of the ziggurat and c2 connecting down.
Blue d2 captures the entire corner, turning the corner into this:
So Blue d2 is a peep at Red's ziggurat.
Namely, d3 first captures e2 and e3, then d4 and e4, and finally d2 and e1 by this capture pattern:
Therefore, the moves d2 and d3 are equivalent for Blue, and both are peeps at Red's ziggurat.
If Red just completed a bridge and Blue has a bridge peep such that cutting off the bridge would kill the stone Red just played, then Blue should play the bridge peep. This is called an automatic bridge peep. More precisely, if Blue was winning before Red's move, then Blue will still be winning after playing the automatic bridge peep.
For example, consider the following situation, where Red just played at 1:
Because the shaded bridge is bolstered on the b-side, a is a peep. Moreover, if Blue had both a and b, the red stone at 1 would be dead. Therefore, this is an automatic peep and Blue should play at a. (More precisely, if Blue was winning before Red played at 1, then Blue playing at a preserves the win. If Blue was in fact losing before Red played at 1, then Blue playing at a may be losing and Blue may potentially have a winning move elsewhere. In any case, the situation after Blue plays at a is no worse for Blue than before Red played at 1.)
There is an analogous notion of automatic peep for ziggurat peeps.
Playing peeps can be very useful. In certain situations, playing a peep can make the difference between winning and losing. Consider the following example:
The only winning move for Red is the peep at d6. If Red misses it, the game proceeds as follows and Blue wins:
If Red starts by playing d6 instead, Red wins.
There are several possible reasons a peep can be bad. Here are some of them:
- Due to circumstances outside of the region, the apparent cutting threat does not actually work, in which case the peep is close to a wasted move.
- While the apparent threat does work, it's not a big enough threat for the opponent to respond by defending against it.
- The opponent benefits by resisting the peep.
- The opponent can minimax, rather than answering more locally.
For example, consider the following situation, with Blue to move:
Here, Blue can win fairly easily by playing at a or b. But suppose that Blue instead decides to play the bridge peep at "*". If Red defends the bridge at c as Blue expects, then Blue still wins by playing a or b. However, if Red instead responds to the peep with a minimaxing move at d, Red wins.
Thus, the bridge peep was a bad peep in this situation.
Resisting a peep
Rather than responding in the obvious way, the opponent can play a move that mitigates against the peep's threat, while also getting something else. The most common example of this is foiling.
For example, in response to Red's peep 1 in the following diagram, Blue can play 2 instead of *:
Red could have gotten a 2nd row ladder towards the right, but after 1 and 2, a red ladder towards the right would be a 3rd row ladder.
Note that this does not necessarily mean the peep was bad. For example, Red could be fine with a 3rd row ladder, and Red can now get c2 before pushing the ladder:
Whereas if Red had started with c2, then Blue would presumably just defend the bridges.
The consequences of resisting a peep can also be much harder to assess. In the following example, Red chose to resist Blue's peep 1 by playing at 2, rather than just playing *.