Difference between revisions of "User:Selinger"

From HexWiki
Jump to: navigation, search
(Proposed article: Mustplay region: Flipped colors)
Line 102: Line 102:
 
== Example ==  
 
== Example ==  
  
Consider the following position, with Red to move:
+
Consider the following position, with Blue to move:
 
+
 
<hexboard size="7x7"
 
<hexboard size="7x7"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="B d3 b4 c4 d4 d6 f6 R c3 e3 f3 b5 c5"
+
   contents="R c4 d2 d3 d4 f4 f6 B b3 c3 c5 c6 e2 e3"
 
   />
 
   />
  
To determine Red's mustplay region, Red should consider the possible ways in which Blue could make a connection if it were ''Blue's turn''.  These are called Blue's ''threats''. Blue has (at least) the following threats:
+
To determine Blue's mustplay region, Blue should consider the possible ways in which Red could make a connection if it were ''Red's'' turn.  These are called Red's ''threats''. Red has (at least) the following threats:
  
* If Blue plays at d5, Blue is [[virtual connection|connected]] by two templates, namely [[edge template II]] and [[edge template IV2d]]. The [[carrier]] of Blue's connection is the set of all cells that are required for the connection, and is highlighted: <hexboard size="7x7"
+
* If Red plays at e4, Red is [[virtual connection|connected]] by two templates, namely [[edge template II]] and [[edge template IV2d]]. The [[carrier]] of Red's connection is the set of all cells that are required for the connection, and is highlighted: <hexboard size="7x7"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="B d3 b4 c4 d4 d6 f6 R c3 e3 f3 b5 c5
+
   contents="R c4 d2 d3 d4 f4 f6 B b3 c3 c5 c6 e2 e3
             B *:d5 S blue:(a5--a4--d4--d6 area(d6,g6,g3))"
+
             R *:e4 S red:(e1--d1--d4--f4 area(f4,f7,c7))"
 
   />
 
   />
  
* If Blue plays at e5, then Blue is connected via two copies of [[edge template II]] and two [[bridge]]s, as shown: <hexboard size="7x7"
+
* If Red plays at e5, then Red is connected via two copies of [[edge template II]] and two [[bridge]]s, as shown: <hexboard size="7x7"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="B d3 b4 c4 d4 d6 f6 R c3 e3 f3 b5 c5
+
   contents="R c4 d2 d3 d4 f4 f6 B b3 c3 c5 c6 e2 e3
             B *:e5 S blue:(a5--a4--d4 area(d4,d5,e6,g6,g5,e4))"
+
             R *:e5 S red:(e1--d1--d4 area(d4,e4,f5,f7,e7,d5))"
 
   />
 
   />
  
* Alternatively, if Blue plays at e5, Blue is also connected via [[edge template II]] and [[edge template III2e]], as shown: <hexboard size="7x7"
+
* Alternatively, if Red plays at e5, Red is also connected via [[edge template II]] and [[edge template III2e]], as shown: <hexboard size="7x7"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="B d3 b4 c4 d4 d6 f6 R c3 e3 f3 b5 c5
+
   contents="R c4 d2 d3 d4 f4 f6 B b3 c3 c5 c6 e2 e3
             B *:e5 S blue:(a5--a4--d4 area(d4,d5,f6,g6,g3))"
+
             R *:e5 S red:(e1--d1--d4 area(d4,e4,f6,f7,c7))"
 
   /> While the last two connections both use a Blue stone at e5, they have different carriers.
 
   /> While the last two connections both use a Blue stone at e5, they have different carriers.
  
* If Blue plays at e4, Blue is connected via a 3rd row [[ladder]], using f6 as a [[ladder escape]]. In this case, the carrier consists of the path the ladder will take, as well as the ladder escape template: <hexboard size="7x7"
+
* If Red plays at d5, Red is connected via a 3rd row [[ladder]], using f6 as a [[ladder escape]]. In this case, the carrier consists of the path the ladder will take and the space required for the ladder escape: <hexboard size="7x7"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="B d3 b4 c4 d4 d6 f6 R c3 e3 f3 b5 c5
+
   contents="R c4 d2 d3 d4 f4 f6 B b3 c3 c5 c6 e2 e3
             B *:e4 S blue:(a5--a4--e4 area(e4,e6,g6,g3))"
+
             R *:d5 S red:(e1--d1--d5 area(d5,f5,f7,c7))"
 
   />
 
   />
  
Red's mustplay region consists of those empty cells that are in the carriers of all of Blue's known threats. Therefore, Red's mustplay region consists of the cells a4, a5, e5, f5, g5, and g6.
+
Blue's mustplay region consists of those empty cells that are in the carriers of all of Red's known threats. Therefore, Blue's mustplay region consists of the cells d1, e1, e5, e6, e7, and f7.
 
<hexboard size="7x7"
 
<hexboard size="7x7"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="B d3 b4 c4 d4 d6 f6 R c3 e3 f3 b5 c5
+
   contents="R c4 d2 d3 d4 f4 f6 B b3 c3 c5 c6 e2 e3
             S red:(a4,a5,e5,f5,g5,g6)"
+
             S blue:(d1,e1,e5,e6,e7,f7)"
 
   />
 
   />
  
Note that this does not mean that all of a4, a5, e5, f5, g5, and g6 are winning moves for Red, or even that Red has any winning moves at all. Rather, what it means is that all ''other'' moves are losing. In other words, if Red has any winning moves at all, they must be in Red's mustplay region. Red must now consider each of the six moves a4, a5, e5, f5, g5, and g6 and check if any of them are winning, or barring that, which one of them is least likely to be losing.
+
Note that this does not mean that all of d1, e1, e5, e6, e7, and f7 are winning moves for Blue, or even that Blue has any winning moves at all. Rather, what it means is that all ''other'' moves are losing. In other words, if Blue has any winning moves at all, they must be in Blue's mustplay region. Blue must now consider each of the six moves d1, e1, e5, e6, e7, and f7 and check if any of them are winning, or barring that, which one of them is least likely to be losing.
  
To help narrow down Red's choices even further, it helps to consider [[captured cell|captured]] and [[dominated cell|dominated]] cells.  In the above example, a4, a5, g5, and g6 are captured by Blue, and therefore, Red should not play there. This leaves Red with e5 and f5 as the only possible moves to consider. It so happens that e5 is winning and f5 is losing. Therefore, considering the mustplay region has helped Red identify the only possible winning move. Red will play e5 and win the game.
+
To help narrow down Blue's choices even further, it helps to consider [[captured cell|captured]] and [[dominated cell|dominated]] cells.  In the above example, d1, e1, e7, and f7 are captured by Red, and therefore, Blue should not play there. This leaves Blue with e5 and e6 as the only possible moves to consider. It so happens that e5 is winning and e6 is losing. Therefore, considering the mustplay region has helped Blue identify the only possible winning move. Blue will play e5 and win the game.
 +
 
 +
== Definition ==
 +
 
 +
From the point of view of a player, a ''threat'' is a [[virtual connection]] between the opponent's board edges that the opponent can create in a single move. The ''carrier'' of the threat is the set of cells (empty or not) that are required for the virtual connection to be valid. The player's mustplay region is determined as follows:
 +
 
 +
* Identify as many threats as possible.
 +
 
 +
* Determine the intersection of the carriers of all of these threats.
 +
 
 +
* With respect to the chosen set of threats, the ''mustplay region'' is the set of empty cells in that intersection.
  
 
== Properties of the mustplay region ==
 
== Properties of the mustplay region ==
Line 164: Line 173:
 
== Example: no winning move ==
 
== Example: no winning move ==
  
If there are no winning moves in a player's mustplay region, the player is losing. To illustrate this, consider the following position, with Red to move.
+
If there are no winning moves in a player's mustplay region, the player is losing. To illustrate this, consider the following position, with Blue to move.
 
<hexboard size="5x5"
 
<hexboard size="5x5"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="R d1 c3 b5 c5 B d2 d3 c4 e3"
+
   contents="R b3 c2 d2 e1 B e2 c3 a4 a3"
 
   />
 
   />
Blue's main threats are:
+
Red's main threats are:
* c2, connecting via a [[ziggurat]]: <hexboard size="5x5"
+
* d3, connecting via a [[ziggurat]]: <hexboard size="5x5"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="R d1 c3 b5 c5 B d2 d3 c4 e1
+
   contents="R b3 c2 d2 e1 B e2 c3 a4 a3
             B *:c2 S blue:(area(a1,a4,c2,c1) d2 e1)"
+
             R *:d3 S red:(area(e5,b5,d3,e3) d2 e1)"
 
   />
 
   />
 
* b4, connecting via [[edge template II]]: <hexboard size="5x5"
 
* b4, connecting via [[edge template II]]: <hexboard size="5x5"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="R d1 c3 b5 c5 B d2 d3 c4 e1
+
   contents="R b3 c2 d2 e1 B e2 c3 a4 a3
             B *:b4 S blue:(a5--a4--c4--d3--d2--e1)"
+
             R *:b4 S red:(a5--b5--b3--c2--d2--e1)"
 
   />
 
   />
* b3, connecting via [[edge template II]] and a [[double threat]]: <hexboard size="5x5"
+
* c4, connecting via [[edge template II]] and a [[double threat]]: <hexboard size="5x5"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="R d1 c3 b5 c5 B d2 d3 c4 e1
+
   contents="R b3 c2 d2 e1 B e2 c3 a4 a3
             B *:b3 S blue:(a3,a4,b3,c2,b4,b5,d2,d3,e1)"
+
             R *:c4 S red:(c5,b5,c4,d3,b4,b3,d2,c2,e1)"
 
   />
 
   />
The only empty cell in the carrier of all three threats is a4, hence Red's mustplay region consists of a4. This means that all moves except possibly a4 are losing for Red.
+
The only empty cell in the carrier of all three threats is b5, hence Blue's mustplay region consists of b5. This means that all moves except possibly b5 are losing for Blue.
 
<hexboard size="5x5"
 
<hexboard size="5x5"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="R d1 c3 b5 c5 B d2 d3 c4 e1
+
   contents="R b3 c2 d2 e1 B e2 c3 a4 a3
             S red:(a4)"
+
             S blue:(b5)"
 
   />
 
   />
Unfortunately for Red, a4 is also losing, because if Red plays a4, Blue can win as follows:
+
Unfortunately for Blue, b5 is also losing, because if Blue plays b5, Red can win as follows:
 
<hexboard size="5x5"
 
<hexboard size="5x5"
 
   coords="show"
 
   coords="show"
 
   edges="all"
 
   edges="all"
   contents="R d1 c3 b5 c5 B d2 d3 c4 e1
+
   contents="R b3 c2 d2 e1 B e2 c3 a4 a3
             R 1:a4 B 2:b4 R 3:a5 B 4:b2"
+
             B 1:b5 R 2:b4 B 3:a5 R 4:d4"
 +
  />
 +
Therefore Blue has no winning moves at all and is losing the game.
 +
 
 +
== Applications ==
 +
 
 +
=== Foiling ===
 +
 
 +
Consider the following situation, with Blue to move:
 +
<hexboard size="7x7"
 +
  coords="show"
 +
  edges="all"
 +
  contents="R c2 b4 f2 f5 B c4 d4 d5 g3"
 
   />
 
   />
Therefore Red has no winning moves at all and is losing the game.
 
  
 
TODO:
 
TODO:

Revision as of 14:28, 5 July 2021

Proposed article: Pivoting template

The problem with this article draft, as currently written, is that the stated condition, "Red can either connect A to the edge, or else occupy and connect B to the edge", is weaker than what many of the templates satisfy. Most templates satisfy the stronger condition "Red can continuously threaten to connect A until Red occupies and connects B to the edge." There are situations where templates satisfying the weaker condition would be losing, but templates satisfying the stronger condition are winning. So one either needs several different notions, or specify the strength of each template. or state the stronger condition and select only templates that satisfy it. All choices seem awkward.

A pivoting template is a kind of edge template that guarantees that the template's owner can either connect the template's stone(s) to the edge, or else can occupy a specified empty hex and connect it to the edge.

Example

AB

This template guarantees that, with Blue to move, Red can either connect A to the edge, or else occupy and connect B to the edge. Its carrier is minimal with this property.

Proof: Red's main threat is to bridge to c and connect to the edge by ziggurat or edge template III1b. Therefore, to prevent Red from connecting to the edge outright, Blue must play in one of the cells a,...,g.

ABabcdefg

If Blue plays at a, Red responds at b and connects outright by edge template IV1a.

If Blue plays at b, Red responds with a 3rd row ladder escape fork:

A82147635

If Blue plays at c, d, or f, Red responds as follows and is connected by edge template V2f. If Blue plays on the right instead of 3, Red responds as if defending template V2f.

A431211

If Blue plays at e or g, Red responds at c and gets a 2nd or 3rd row ladder, which can reach B by ladder escape fork.

Usage

Pivoting templates can be useful in many situations, but are especially useful in connection with flanks.

[Todo: Add an example.]

More examples

AB
AB
AB
AB
AB

See also




Proposed article: Mustplay region

Informally, a mustplay region for a player is a set of cells in which the player must move to avoid losing immediately. Mustplay analysis is an important tool for analyzing Hex positions, because it can help narrow down the number of possibilities a player must consider.

Example

Consider the following position, with Blue to move:

abcdefg1234567

To determine Blue's mustplay region, Blue should consider the possible ways in which Red could make a connection if it were Red's turn. These are called Red's threats. Red has (at least) the following threats:

  • If Red plays at e5, then Red is connected via two copies of edge template II and two bridges, as shown:
    abcdefg1234567
  • Alternatively, if Red plays at e5, Red is also connected via edge template II and edge template III2e, as shown:
    abcdefg1234567
    While the last two connections both use a Blue stone at e5, they have different carriers.
  • If Red plays at d5, Red is connected via a 3rd row ladder, using f6 as a ladder escape. In this case, the carrier consists of the path the ladder will take and the space required for the ladder escape:
    abcdefg1234567

Blue's mustplay region consists of those empty cells that are in the carriers of all of Red's known threats. Therefore, Blue's mustplay region consists of the cells d1, e1, e5, e6, e7, and f7.

abcdefg1234567

Note that this does not mean that all of d1, e1, e5, e6, e7, and f7 are winning moves for Blue, or even that Blue has any winning moves at all. Rather, what it means is that all other moves are losing. In other words, if Blue has any winning moves at all, they must be in Blue's mustplay region. Blue must now consider each of the six moves d1, e1, e5, e6, e7, and f7 and check if any of them are winning, or barring that, which one of them is least likely to be losing.

To help narrow down Blue's choices even further, it helps to consider captured and dominated cells. In the above example, d1, e1, e7, and f7 are captured by Red, and therefore, Blue should not play there. This leaves Blue with e5 and e6 as the only possible moves to consider. It so happens that e5 is winning and e6 is losing. Therefore, considering the mustplay region has helped Blue identify the only possible winning move. Blue will play e5 and win the game.

Definition

From the point of view of a player, a threat is a virtual connection between the opponent's board edges that the opponent can create in a single move. The carrier of the threat is the set of cells (empty or not) that are required for the virtual connection to be valid. The player's mustplay region is determined as follows:

  • Identify as many threats as possible.
  • Determine the intersection of the carriers of all of these threats.
  • With respect to the chosen set of threats, the mustplay region is the set of empty cells in that intersection.

Properties of the mustplay region

  • All moves outside a player's mustplay region are losing. Moves within the mustplay region may be winning or losing.
  • If a player's mustplay region is empty, the player is losing.
  • If there are no winning moves in a player's mustplay region, the player is losing.
  • The mustplay region is not unique. By considering more opponent threats, a player may arrive at a smaller mustplay region.

Example: no winning move

If there are no winning moves in a player's mustplay region, the player is losing. To illustrate this, consider the following position, with Blue to move.

abcde12345

Red's main threats are:

The only empty cell in the carrier of all three threats is b5, hence Blue's mustplay region consists of b5. This means that all moves except possibly b5 are losing for Blue.

abcde12345

Unfortunately for Blue, b5 is also losing, because if Blue plays b5, Red can win as follows:

abcde123452431

Therefore Blue has no winning moves at all and is losing the game.

Applications

Foiling

Consider the following situation, with Blue to move:

abcdefg1234567

TODO:

  • application: foiling
  • application: puzzle 20210618-5
  • application: verification of templates
  • example with ladder creation + escape.
  • mustplay region in computer Hex
  • add reference