Difference between revisions of "Minimaxing"
m (cat : strategy) |
(replaced non-existing link by an external link) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | In Hex, '''minimaxing''' or '''minmaxing''' means to do the '''mini'''mum necessary to maintain a connection in one direction while '''max'''imizing one's strength in the other direction. | |
− | [[ | + | The term minimaxing as used in Hex has nothing to do with the [https://en.wikipedia.org/wiki/Minimax 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. | ||
+ | <hexboard size="5x5" | ||
+ | edges="bottom left" | ||
+ | coords="bottom left" | ||
+ | contents="R c3 B 1:d4" | ||
+ | /> | ||
+ | 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: | ||
+ | <hexboard size="5x5" | ||
+ | edges="bottom left" | ||
+ | coords="bottom left" | ||
+ | contents="R c3 B 1:d4 R 2:b5" | ||
+ | /> | ||
+ | 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: | ||
+ | <hexboard size="5x5" | ||
+ | edges="bottom left" | ||
+ | coords="bottom left" | ||
+ | contents="R c3 B 1:d4 R 2:b3" | ||
+ | /> | ||
+ | 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 [[captured cell|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 [[dead cell|kills]] the opponent's piece. | ||
+ | <hexboard size="3x6" | ||
+ | edges="bottom" | ||
+ | coords="bottom right" | ||
+ | visible="-a1 a2 b1" | ||
+ | contents="R d2 B 1:c3 R 2:d3" | ||
+ | /> | ||
+ | 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: | ||
+ | |||
+ | * Red e2 [[captured cell|captures]] d3 and e3 and [[dead cell|kills]] c1: <hexboard size="3x6" | ||
+ | edges="bottom" | ||
+ | coords="bottom right" | ||
+ | visible="-a1 a2 b1" | ||
+ | contents="R d2 B 1:c3 R 2:e2 S red:area(d2,c3,e3,e2)" | ||
+ | /> | ||
+ | * Red c2 [[captured cell|captures]] b3 and d3 and [[dead cell|kills]] c1: <hexboard size="3x6" | ||
+ | edges="bottom" | ||
+ | coords="bottom right" | ||
+ | visible="-a1 a2 b1" | ||
+ | contents="R d2 B 1:c3 R 2:c2 S red:area(c2,b3,d3,d2)" | ||
+ | /> | ||
+ | * Red f2 [[captured cell|captures]] d3, e2, e3, and f3 and [[dead cell|kills]] c1: <hexboard size="3x6" | ||
+ | edges="bottom" | ||
+ | coords="bottom right" | ||
+ | visible="-a1 a2 b1" | ||
+ | contents="R d2 B 1:c3 R 2:f2 S red:area(d2,c3,f3,f2)" | ||
+ | /> | ||
+ | * Red b2 [[captured cell|captures]] a3, b3, c2, and d3 and [[dead cell|kills]] c1: <hexboard size="3x6" | ||
+ | edges="bottom" | ||
+ | coords="bottom right" | ||
+ | visible="-a1 a2 b1" | ||
+ | contents="R d2 B 1:c3 R 2:b2 S red:area(b2,a3,d3,d2)" | ||
+ | /> | ||
+ | * Red e1 connects by [[edge template III2b]]: <hexboard size="3x6" | ||
+ | edges="bottom" | ||
+ | coords="bottom right" | ||
+ | visible="-a1 a2 b1" | ||
+ | contents="R d2 B 1:c3 R 2:e1 S gray:area(e1,d2,d3,f3,f1)" | ||
+ | /> | ||
+ | * Red f1 connects by [[edge template III2g]]: <hexboard size="3x6" | ||
+ | edges="bottom" | ||
+ | coords="bottom right" | ||
+ | visible="-a1 a2 b1" | ||
+ | contents="R d2 B 1:c3 R 2:f1 S gray:area(e1,d2,d3,f3,f1)" | ||
+ | /> | ||
+ | * Red d1 connects by [[double threat]] at d3 and b2: <hexboard size="3x6" | ||
+ | edges="bottom" | ||
+ | coords="bottom right" | ||
+ | visible="-a1 a2 b1" | ||
+ | contents="R d2 B 1:c3 R 2:d1 S gray:area(c1,a3,d3,d1)-c3" | ||
+ | /> | ||
+ | * Red c1 also connects by [[double threat]] at d3 and b2: <hexboard size="3x6" | ||
+ | edges="bottom" | ||
+ | coords="bottom right" | ||
+ | visible="-a1 a2 b1" | ||
+ | contents="R d2 B 1:c3 R 2:c1 S gray:area(c1,a3,d3,d1)-c3" | ||
+ | /> | ||
+ | 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: | ||
+ | <hexboard size="3x9" | ||
+ | edges="bottom" | ||
+ | coords="bottom right" | ||
+ | visible="-a1 a2 b1" | ||
+ | contents="R d2 B 1:c3 R 2:h2 B 3:d3 R 4:e2 B 5:e3 R 6:f2 B 7:f3 R 8:g2" | ||
+ | /> | ||
+ | |||
+ | [[category:Advanced Strategy]] |
Latest revision as of 02:18, 5 October 2023
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.
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:
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:
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.
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:
- Red e2 captures d3 and e3 and kills c1:
- Red c2 captures b3 and d3 and kills c1:
- Red f2 captures d3, e2, e3, and f3 and kills c1:
- Red b2 captures a3, b3, c2, and d3 and kills c1:
- Red e1 connects by edge template III2b:
- Red f1 connects by edge template III2g:
- Red d1 connects by double threat at d3 and b2:
- Red c1 also connects by double threat at d3 and b2:
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: