Efficiency

From HexWiki
Revision as of 17:53, 26 November 2022 by Selinger (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A move is more efficient than another if it achieves the same goal more quickly, i.e., in a smaller number of moves.

In Hex, there is no special reward for efficiency: a player wins the game if they connect their opposite board edges, and it doesn't matter how many moves it takes them to do so. Nevertheless, efficiency can be a secondary goal for the winning player. Once a player is sure to win, they might want to carry out the win in the fastest way possible. Typically, this means going for straightforward connections rather than playing minimaxing moves or trying to gain more territory. Efficiency is not usually a goal for the losing player: if they wanted the game to end more quickly, they could just resign.

Examples

Defending a template

If Blue intrudes on edge template II, Red is usually well advised to respond with a minimaxing move such as the following.

21

The reason that move 2 is usually good is hat it captures the entire shaded area. However, Red needs up to two additional turns to complete the connection:

421356

Therefore, in a situation where Red does not need the additional captured area, it is more efficient for Red to simply reconnect like this:

12

Fast forwarding

When playing a ladder or other predictable sequence of moves, it is sometimes more efficient to "fast forward", rather than playing out the ladder. For example, consider this situation, with Red to move:

The most straightforward way for Red to win here is to play the bottom ladder, then pivot and play the top ladder:

141210151311913587246

But note that this is relatively inefficient for Red: Red requires 8 turns to complete the connection (plus an additional 3 turns to defend the various bridges if Blue chooses to invade them. A more efficient way for Red to connect is to "fast forward" to the end of the bottom ladder, playing the pivot stone immediately:

1

Now Blue must choose between blocking the bottom ladder or the top ladder. No matter how Blue plays, Red can win in at most 7 additional turns.

We note that fast forwarding does not work in every situation. For example, consider the following position with Red to move. Red cannot fast forward the ladder.

The only way Red can win is by playing the ladder in its entirety:

1110913587246

Caution

It bears repeating that playing efficiently is not a primary goal of Hex. A player should never choose efficiency over other important goals, such as gaining territory or making stronger connections, unless the player is sure that they will win anyway.

Measuring efficiency

When evaluating which of several moves is more efficient, it is sometimes useful to quantify efficiency. It is usually convenient to measure efficiency in turns (i.e., counting one player's moves) rather than moves (i.e., counting both player's moves). For example, from Red's point of view, the efficiency of a position is the worst-case number of turns that Red must play before Red wins. Smaller numbers are more efficient.

For example, the following position is a win for Red with efficieny 3:

This is because, no matter how Blue plays, Red can use each of her next 3 turns to solidify one of her bridges, and it is clearly not possible to make a solid connection in fewer than 3 turns.

On the other hand, the following position, which is also winning for Red due to edge template IV2a, has efficiency 5:

If Blue prolongs the game as long as possible, Red wins in 5 turns, for example like this:

91051246783

Efficiency of templates

The efficiency of a template is the maximum number of turns that the template's owner requires to defend the template to a solid connection.

Interior templates

For most of the named interior templates, the efficiency happens to equal half the number of empty cells in the template (i.e., in the worst case, defending the template requires to fill all of its empty cells). The exceptions are:

  • The hammock has efficiency 3. Here, efficiency is measured as the number of turns required for Red to achieve the template's guarantee, i.e., the connect the template's 2 endpoints.

Edge templates

The following table lists the efficiencies of various edge templates:

Template Efficiency
Edge template II 1
Ziggurat 3
Edge template IV2a 4
Edge template IV1a 5

More templates can be added to this table in the future, or the efficiency could be listed on each template's own page.