Minimaxing

From HexWiki
Revision as of 02:15, 5 October 2023 by Selinger (Talk | contribs)

Jump to: navigation, search

In Hex, minimaxing or minmaxing means to do the minimum necessary to maintain a connection in one direction while maximizing one's strength in the other direction.

The term minimaxing as used in Hex has nothing to do with the minimax computer algorithm that is used to explore the game tree and select a move.

Example

Consider the following situation, which is fairly common in the obtuse corner.

abcde123451

Red was connected to the bottom edge by a ziggurat, but Blue intruded into Red's connection. Where should Red play? Beginners are often eager to reconnect in the most straightforward way possible, and might play at b5:

abcde1234512

While this reconnects c3 to the edge, it doesn't do much else for Red. In fact, it even gives Blue the opportunity to play b4 and get a free 2nd row ladder escape. Where should Red play instead? Certainly b4 is a better choice. But an even better one is b3:

abcde1234521

Note that Red is connected to the edge by edge template III2a. In addition, Red has also gained significant strength towards the top. Thus, Red has done the minimum necessary to connect to the bottom (played as far away from the bottom as possible), while gaining the maximum possible strength towards the top.

Of course, b3 may not be the only possible minimaxing move. Depending on what is going on on the rest of the board, it might also be possible for Red to reconnect by playing at e2, for example. Choosing the best one among several possible minimaxing moves is a useful skill. But in any case, playing a minimaxing move is almost always better than not playing one. Players who minimax typically win against players who don't, because the small advantages accumulated by minimaxing often end up making a difference in the endgame.

Minimaxing after a template intrusion

When the opponent intrudes into a template, it is often a good opportunity to look for a minimaxing move. By virtue of being a template, there always exists a way of re-establishing the connection. But that does not mean that all ways of reconnecting are equivalent.

Intrusion into edge template II

Since edge template II captures both of the empty cells in its carrier, it is always a bad idea for the opponent to intrude into this template. The player can just play in the other cell, which not only reconnects the template but also kills the opponent's piece.

abcdef12312

However, just because Red can play at d3 does not mean that Red should play at d3. In fact, there is almost always a better move available to Red. Here are some better possibilities:

So practically any nearby move is sufficient to reconnect d2 to the edge, and most are better than d3. Moreover, Red could even make a far-away move and reconnect d2 by ladder escape, for example like this or in many other ways:

abcdefghi12346821357