Difference between revisions of "User:Hexanna"

From HexWiki
Jump to: navigation, search
(reorganize)
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
19×19 is the most popular of the "large" board sizes. This board size offers a lot of room for strategic freedom (unlike 11×11 or 13×13), but tactics and local play remain highly important.
+
[[Openings on 19 x 19]]
  
An average well-played game lasts about 72-90 moves before one side resigns, or 20-25% of the board, though it varies considerably from game to game.
+
[[Strategic advice from KataHex]]
  
The advice in this guide is heavily influenced by hzy's KataHex bot, the strongest known (and easily superhuman) bot as of March 2023.
+
I started learning Hex mid-July of 2021, about 2 weeks before I created my LittleGolem account.
  
==Differences from smaller boards==
+
==katahex/general strategy part 2 (rough draft)==
  
* While [[corner move|corner moves]] are still good moves, playing near the middle of your opponent's 5th row is often just as good. This starts to become true for boards 18×18 and larger.
+
This is not very organized, and some bullet points won't make sense without further context. I also need to decide which ideas are worth keeping. (I have outlines and rough drafts of even more stuff, but I'm worried about making the article too long and diluting it with only rarely-applicable advice.)
  
* Ladders and ladder escapes are less important. Human games often have long ladders across a side of the board, but it's usually a mistake for the defending side to keep pushing the ladder. Often, it's best for the defender to jump, allowing their opponent to connect in exchange for territory. Here is a [https://hexworld.org/board/#19n,c2d16p15o5r4q2q3r2p3p2o3m3o2 common example].
+
* If you can't find a good move, avoid a bad one by playing "skew" relative to existing stones.
 +
** That is, play a move that interacts with existing stones as little as possible (at least distance 3 from all other stones).
 +
** The difference between a good move and a blunder is >5x the difference between a great move and a good move.
  
* There is a lot more room to ignore your opponent's threats and [[tenuki|play elsewhere]] in the early opening. Moves are less forcing, and there's a much larger variety of different strategies you can try.
+
* Stone "arithmetic": not an exact science, use your intuition; play the move that maximizes the sum of local and global efficiency. I am not actually calculating values when playing, just making mental adjustments.
 +
** The best move locally is rarely the best move globally. Hex is a game of concessions and tradeoffs. There is no "free lunch," unless you count concepts like inferiority/domination.
 +
** Conversely, if it looks like your opponent is beating you on one side of the board, there are two possibilities:
 +
*** You played suboptimal moves in that region.
 +
*** Your opponent played too strong in that area, which necessarily means they made concessions elsewhere (usually the opposite side of the board).
 +
** If the first option is true, you are probably losing anyways, so assume (or hope) the second is true. That means you should tend to tenuki and play the opposite side of the board, if you think your opponent overplayed one side. Indeed, if you continue playing on the same side, your opponent might be able to get out of their mistake by minimaxing, such that they go from being overconnected to being merely connected.
  
* On smaller boards, the game becomes quite tactical after the opening, and playing well often means playing stones that "work well" with existing stones near the corner. On 19×19, there is room to start a local fight near the middle of the board, relatively far away from existing stones.
+
* For brevity, some notation for up-weighting and down-weighting particular moves:
 +
** chess notation: ??/?/?!/!?/!
 +
** one way to think about it: you are a machine who has to assign a score (or a prior policy probability) to each move. !? means slightly upweight, ! means upweight, ?? means strongly downweight, and so on.
 +
** asymmetric scale, one blunder can take multiple "great" moves to recover from; also, brilliancies (!!) are rare and don't come from easily described rules like the ones in this article
  
==Common human mistakes==
+
* !? bridge moves, either from your own stone or your opponent's
 +
** an additional !? if it's part of a bridge ladder that you'll win (you're playing 5-4 acute corner), ?! if your opponent will win
 +
* ? moves adjacent to your own stone, unless you are minimaxing and know that it's the best move. Be careful of bad minimaxing, where you connect too weakly to one side, allowing your opponent to intrude for territory. More often than not, the concession you make here isn't worth the extra strength.
  
* Playing too close to your own edge is by far the most common mistake in the opening. There are exceptions where it can be a good idea, like when you're playing a corner move or joseki, or your opponent has intruded heavily into one of your edges, or you're responding to a local tactical situation. However, if your opponent hasn't played near one of your edges, it's almost always a bad idea to play a move closer to that edge than one of your opponent's edges.
+
===a3 opening===
 +
Nowadays, strong players rarely play a3 on the first move because it's similar to c2 (which is already on the losing side on most board sizes), but a bit weaker. There are some subtle differences between a3 and c2, however, and most strategy advice on the a3 opening is outdated.
  
==General principles==
+
If Red plays a3, some older strategy guides recommend that Blue respond d6 or e7 if she wants to play in the acute corner. However, KataHex considers this an inaccuracy; even though d6 and e7 are attacking stones in the sense that Blue would win a [[bridge ladder]] towards the acute corner, they don't do a good job blocking Red's edge the way e4 does in an empty corner.
  
* Corner and edge moves: In the absence of other stones nearby, Red would do well to play in one of the following spots:
+
If you want to play the acute corner, 5-5, or 4-4 on smaller boards, is a good choice. (There are other options further away from the corner on larger boards.) KataHex and other bots consistently prefer these moves:
 +
* https://www.littlegolem.net/jsp/game/game.jsp?gid=2175191&nmove=4
 +
* https://www.littlegolem.net/jsp/game/game.jsp?gid=2033243&nmove=2
 +
* https://www.littlegolem.net/jsp/game/game.jsp?gid=2018841&nmove=8
 +
* https://www.littlegolem.net/jsp/game/game.jsp?gid=1950209&nmove=20
  
<hexboard size="19x19"
+
One reason may be the efficiency of templates [[Edge template IV2e|IV2e]] and [[Fifth_row_edge_templates#V-2-d|V2d]], both of which have a "hole"; the template can be rotated so that the hole coincides with Red's a3 stone. This is explored in more detail below.
  coords="show"
+
  contents="R d5 e6 *:f7 g8 f9 *:e10 *:e11 *:d16 p15 o14 *:n13 m12 n11 *:o10 *:o9 *:p4"
+
  />
+
  
This is far from an exhaustive list; many other moves near the middle of Blue's 4th to 6th rows are often just as good. Of course, the presence of other stones even moderately nearby can influence things. KataHex prefers the spots marked (*) especially often.
+
It can be useful to realize that a3 is primarily a blocking move (blocking Blue on the left rather than helping Red connect to top), whereas c2 is half blocking and half connecting. To illustrate the point, it's a bad idea for Red to play both c2 and 4-4 obtuse corner on the top edge (in the absence of Blue's blocking stones), because that's too much strength near the top. However, Red could feasibly play both a3 and 4-4 on the top edge.
  
* If Blue plays too closely to her edge, Red usually has some good local responses. In particular, if Blue plays near the middle of her 4th row, Red can choose one of the following blocks:
+
a3 can combine well with c5. Red's goal is to leave b4/c5 open as options (these are the same hexes used in the a3 escape trick, but of course, a3+c5 can also connect upwards). Blue should also keep an eye on b4 - not to play immediately because it's too close to her own edge - but as the most efficient option for connecting to the left side near the top. Blue would much prefer to connect using b4 (which is a locally efficient move that neutralizes a3's switchback and upwards connecting potential) than b5 (which only slightly weakens a3's potential, forcing Red to play d5 instead of c5), or a 2nd row ladder with b3 (which removes Red's weakness at b1).
<hexboard size="7x7"
+
  coords="hide"
+
  edges="left"
+
  contents="B d4 E A:f3 B:e4 C:e5"
+
  />
+
KataHex prefers A the most often on a relatively empty board.
+
  
* If Blue plays near the middle of her 5th row:
+
a3 is one of my favorite openings to analyze (I only wish it were more fair as an opening move). Unlike c2 where Blue's best move is typically to tenuki, a3 gives Blue the option to fight in the same acute corner. There is essentially a separate theory of a3 corner joseki.
<hexboard size="7x8"
+
  coords="hide"
+
  edges="left"
+
  contents="B e4 E A:g3 B:f4 C:f5 D:d6 E:c5 F:d3 *:f2"
+
  />
+
KataHex usually prefers A or E, though B/C/D/F are also common. The move marked (*) is usually less good, because Blue can respond at A.
+
  
* If Blue plays near the middle of her 6th row:
+
I find a3 lines particularly educational because a3 changes the corner just enough to make different moves more efficient. You can learn a lot about how an existing stone influences neighboring stones.
<hexboard size="7x9"
+
  coords="hide"
+
  edges="left"
+
  contents="B f4 E A:h3 B:e6 C:d5 D:e3 *:(g2 g5) +:g4"
+
  />
+
Here, all of A/B/C/D are often good choices. The moves marked (*) are usually worse because Blue can respond at A. The move marked (+) is also worse, and Blue usually does well to tenuki.
+
  
* If Blue plays close to the center, Red would do well to block at a distance, rather than using an adjacent or near block.
+
* d4: https://hexworld.org/board/#14c1,a3d4e4e3
 +
** Note that Red e4 is near his own edge, but it's adjacent to Blue's stone at d4 and does a good job at blocking it; this is analogous to the joseki https://hexworld.org/board/#14nc1,k10k9, where Blue 2 is often a strong move. Blue e3 is counterintuitive, but it forms [[Fifth_row_edge_templates#V-2-d|template V2d]], which has a hole at Red's a3. In essence, Blue makes Red's a3 stone nearly useless in this line.
 +
** Red avoids b5 which is a very weak move, because it makes Blue b4 even more efficient: https://hexworld.org/board/#14c1,a3d4b5b4c4d2. This position is practically Blue's dream; Blue makes full use of d4 and the weakness at a3 with [[Edge template IV2e|template IV2e]] (which also has a hole).
 +
*** This is similar to Red 5 being a blunder in this opening: https://hexworld.org/board/#14nc1,a10d11c12c11b12b11
 +
* e3 first: https://hexworld.org/board/#14c1,a3e3c4b4d2c3d3c5
 +
* d3 is bad: https://hexworld.org/board/#14c1,a3d3b4
 +
* Why is e4 weak? After Red c5!, the normally locally efficient b4 (even though it's globally inefficient, because it's on Blue's 2nd row) is terrible because Red d3 is a bridge cut. Note that a3 primarily is a blocking move, not a connecting one, so d3+a3 is not so much strength near the top that it renders d3 a bad move. https://hexworld.org/board/#14c1,a3e4c5b4d3
 +
* e5: In some ways, these resemble the low intrusion 5-4 joseki, shifted up one row.
 +
** https://hexworld.org/board/#14nc1,a3e5c5c6d6d5 Red 5 is optional but actually an acceptable bridge peep, because intruding on the other side of the bridge would be too much strength near the top and almost never a good idea.
 +
** Red must still avoid b5 for the same reason as before: https://hexworld.org/board/#14nc1,a3e5c5c4b5b4d4f3d3 is very favorable to Blue. Observe that Blue 8 at f3 is more efficient than at e2, because e2 is followed by Red f3 which is a bridge cut
 +
** https://hexworld.org/board/#14nc1,a3e5c5c4d4c6d6e6c8d5g6h4 Red peeps the bridge with 7. d6; Blue 8. e6 may be a stronger reply than connecting directly. If Red played 11. f6 instead, that would be a blunder because Blue g4 is a strong undermining reply.
 +
** https://hexworld.org/board/#14nc1,a3e5c5d4c4c6f5h3 There are too many variations after Blue d4 to list them all. Blue 6 at d3 leads to a fun minimaxing sequence but is perhaps a slight inaccuracy: https://hexworld.org/board/#14nc1,a3e5c5d4c4d3b6d2c3d7
  
* A well-played game between equally matched players should "use" almost the whole board. In particular, large templates like [[edge template VI1a]] rarely matter on 19&times;19. Many players are tempted to play a stone in the middle of their 6th row, because such a stone is connected. However, the opponent has good responses intruding into the template (see above).
+
==Second row ladder vs. connecting directly==
  
* Suppose Red has played the 5-4 opening. It turns out that a [https://hexworld.org/board/#19nc1,d5g3:pd4 decent response by Blue] is playing at 3-7 (from Red's perspective), partially due to the threat of Blue 4-4 as a followup. This would imply that, had Blue ''first'' played at 3-7 before Red played in the corner, Red should not respond with 5-4, because that would make Blue's 3-7 (which was placed first) unnecessarily effective. Red should instead play a move that works well against Blue's stone. It turns out that the [https://hexworld.org/board/#19nc1,:pg3d4 4-4 corner] is such a move. This is an important concept &mdash; you don't want to play a move close to your opponent's, if that would make your opponent's stone efficiently placed relative to yours.
+
Pretty contrived, but holding your opponent to a (one-sided) second row ladder instead of letting them connect directly is worth more than getting a second-row escape yourself.
  
* Here's another [https://hexworld.org/board/#19nc1,e4d4d5 example]. Red accidentally played the 4-5 corner move instead of 5-4. Blue should not play 4-4, because then Red could play 5-4, and he would be in the same position that he would've been, had he played the first move correctly (via the Red 5-4, Blue 4-4, Red 4-5 joseki). Blue essentially let Red out of his mistake. A better move for Blue here is simply to tenuki.
+
I came across this intuition a few times when studying various sequences on large boards, and it seemed surprisingly self-evident (almost like it "has" to be true). I wasn't sure why, so I thought it was a fun exercise to convince myself that it actually makes sense from first principles. Here is an informal argument:
  
==Acute corner theory==
+
* Let x = "holding your opponent to a second row ladder instead of letting them connect directly"
 +
* Let y = "getting a second-row escape yourself"
 +
* To show that x > y, decompose x = m - n, where
 +
* m = "your opponent has a second row ladder"
 +
* n = "your opponent connects directly"
 +
* Also, -y is "your opponent has a second-row escape". Then, x > y is equivalent to m + (-y) > n.
 +
* That is, all else equal, you'd rather allow your opponent a second-row ladder with a second-row escape, than allow your opponent a direct connection. Why is this true? In the first situation (m + (-y)), you have the ability to jump as the defender, and gain territory in exchange for allowing your opponent to connect. On the other hand, if the opponent is connected directly without the need for a ladder escape, you have no such option.
  
Corner joseki on 19&times;19 can be quite involved. Here's a sampler for inspiration.
+
Some potential applications of this rule (it's a stretch to say that these are direct implications of the rule, but the rule can help with building intuition):
 +
* Helps explain why Blue 4 is surprisingly strong here: https://hexworld.org/board/#19nc1,e15e17d17b18:pc19d18
 +
* Blue is not afraid of the ladder in the 4-4 3-2 obtuse corner: https://hexworld.org/board/#19nc1,c2d16b17e17c15b18d17c19
 +
* Red is just fine in this line of the obtuse corner opening: https://hexworld.org/board/#19nc1,a19:pd15c17c14e16b17b18a18c15a16b15
  
('''TODO''' elaborate, add diagrams)
+
==Insights and tidbits from KataHex (hzy's bot)==
  
===5-4 acute corner===
+
* katahex_model_20220618.bin.gz (I'll call this the "strong" net) appears significantly stronger than the "default" net.
 +
* Swap map for 19&times;19 generated with the strong net, with around 15k visits for most moves. For the red hexes, the number corresponds to Blue's Elo advantage if she swaps Red's move; for the blue hexes, the number corresponds to Blue's Elo advantage if she does not swap Red's move. Smaller numbers correspond to fairer openings. Includes all fair openings as well as a few selected unfair openings, including the strongest move without swap (e10). I used more visits for the fairest moves: 1000k for e3 (49.5% win rate), 500k for n3 (49.2%), 100k for a15 (52.5%).
 +
** Key takeaways: The swap map at [[Swap rule#Size 19]] uses [https://pic4.zhimg.com/v2-7287c3a2a4e948da89c3ccad38cea82f_r.jpg data] that is almost certainly from the "weak" net. Compared to the weak net, the strong net notably thinks a19, n3&mdash;p3, and k4&mdash;l4 are stronger. I personally trust the strong net's evaluations more; I think it's dubious that the weak net thought l4 was a very fair opening. The nets disagree on whether e3 is winning or losing, though it's so close to 50% that the difference isn't meaningful.
  
* High intrusion is by far the most common: [https://hexworld.org/board/#19nc1,p15p16o16p14 here]
+
<hexboard size="19x19"
 
+
Blue typically doesn't play 4 if she already occupies the obtuse corner on that side, but in other cases it's often the best move. Other bots like leela_bot also play this joseki often, so even if the benefit of Blue 4 isn't immediately obvious to humans, the move still deserves serious consideration.
+
 
+
* An extended version: [https://hexworld.org/board/#19nc1,p15p16o16p14q14o17n17 here]
+
 
+
===6-5 acute corner===
+
 
+
* Low intrusion by Blue, high intrusion by Red: [https://hexworld.org/board/#19nc1,o14o16p16p15n16n17m17 here]
+
 
+
* A much longer variation: [https://hexworld.org/board/#19nc1,o14o16p16o17q17p18q18p15q13p17n16n15o15m18l17m16m17 here]
+
 
+
Blue has a couple ways to gain territory from Red 15, either playing at j18 or k19, but it seems better to defer the [[question]] and wait until one option is clearly preferable.
+
 
+
* High intrusion by Blue: [https://hexworld.org/board/#19nc1,o14o15p14p15n15m17l16m15m16k18q13p16j17k16k17 here]
+
 
+
Red 11 is a good minimaxing move, but he can only play it after Blue 10, since otherwise Blue has a [https://hexworld.org/board/#19nc1,o14o15p14p15n15m17q13l18 strong minimaxing reply].
+
 
+
===7-6 acute corner===
+
 
+
* Here's a standard one that KataHex prefers: [https://hexworld.org/board/#19nc1,n13n15o15n16p16p17r17q18o17 here]
+
 
+
==Obtuse corner theory==
+
 
+
===4-4 obtuse corner===
+
 
+
It's highly instructive to go through the many possible Blue responses to Red 4-4 in the obtuse corner.
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 E A:c5 B:d3 C:e3 D:e2 E:f2 F:d6 G:c6 H:b6 I:e5 J:d5 K:e4"
+
  />
+
 
+
'''A:''' KataHex's favorite response on 19&times;19 by far. Blue's move 3 gives her a 3rd row ladder escape in the form of [[edge template III2a]].
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:c5 R 2:d5 B 3:c6 R 4:d6"
+
  />
+
 
+
Unless Red's acute corner is free, Red usually connects directly to the bottom with move 4. This may be counterintuitive since it goes against the principle of minimaxing, but most Red attempts to minimax allow Blue to gain territory. For instance, if Red plays at 4 below, Blue gets move 7 for free, and the result is favorable to Blue.
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:c5 R 2:d5 B 3:c6 R 4:e5 B 5:d7 R 6:f6 B 7:f5 R 8:e6"
+
  />
+
 
+
If the acute corner is free, Red can play an alternative joseki on move 4:
+
 
+
<hexboard size="7x19"
+
  coords="hide"
+
  edges="bottom left right"
+
  contents="R d4 B 1:c5 R 2:d5 B 3:c6 R 4:p3 B 5:m5 R 6:q4"
+
  />
+
 
+
This joseki is quite tactical. After Blue's move 3, Red has a third row ladder from the obtuse corner, even if he plays elsewhere, but no ladder escape. Instead of connecting outright, Red plays 4 to give himself a ladder escape at a distance. Blue can defend the ladder by pushing for a few turns, but it's a mistake to push all the way to the acute corner where Red can escape the ladder. So, Blue jumps at a distance on move 5. Note that Blue deliberately chooses the 3-7 point, which works well against Red's 4.
+
 
+
After Red responds at 6, Blue has several reasonable options. Blue can push the ladder defensively, which Red can't escape outright because of Blue 5, but eventually Red can climb or carry out a complex switchback with the help of 4 and 6 (neither of which are overly strong for Red). Alternatively, Blue can start a fight in the acute corner for territory or ladder escapes. Since this is a joseki, it represents excellent play by both sides without big mistakes, but the exact best continuation will depend on the surrounding board situation.
+
 
+
'''B:''' Interestingly, this move is relatively common on 11&times;11 but not 13&times;13. The usual purpose of this move is to block Red from playing at (+) below. It appears slightly worse than move '''A''', but it's still very playable. Red has many reasonable responses marked (*):
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:d3 E +:e2 *:(c4 e3 f2)"
+
  />
+
 
+
'''C:''' This move is often effective on smaller boards when Blue has a ladder escape at her acute corner. However, the acute corner is much farther away on 19&times;19, and Blue's 5th row ladder is much less threatening, so Blue gains less from playing this move. Red, who is defending the ladder, usually pushes the ladder by playing at (*) below, or he jumps a couple hexes forward on the 3rd or 5th row (either immediately or after pushing a few times), indicated by (+):
+
 
+
<hexboard size="8x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d5 B 1:e4 E *:d4 +:(c3 e2)"
+
  />
+
 
+
'''D:''' This blocking move is common on 13&times;13 but less so on 19&times;19. Blue's idea, if Red ignores the threat, is to follow up with this move 2, which is quite strong since it neutralizes Red's 4-4 stone significantly:
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:e2 2:f3"
+
  />
+
 
+
Indeed, Red usually responds to the threat, and the following sequence is a common joseki on 13&times;13:
+
 
+
<hexboard size="8x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d5 B 1:e3 R 2:c4 B 3:d2 R 4:e2 B 5:d3 E *:b3 +:b4 -:f3"
+
  />
+
 
+
Red 6 is often at one of (*), (+), or (-). The move (*) allows Red to gain territory, while (+) creates a [[Flank#Capped_flank|capped flank]] that blocks Blue 3rd row ladders under Red's 4-4 stone. It's not obvious to me why, but KataHex tends to think Red is slightly better after this sequence on 19&times;19, so Blue usually doesn't play '''D''' in the first place.
+
 
+
'''E:''' Usually not the best move for Blue. Depending on local tactics, Red should either tenuki, or play one of (*):
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:f2 E *:(e2 c2)"
+
  />
+
 
+
'''F:''' This 4-2 obtuse corner block is strong on small boards like 11&times;11, but it's rarely a good move on 19&times;19, whether as the first stone in the obtuse corner, or in response to 4-4. There are exceptions &mdash; the 4-2 move works well in combination with a "middle of third row" opening stone, for example. Red would do well to connect directly with 2:
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:d6 R 2:c6"
+
  />
+
 
+
'''G:''' This block is a "surprise weapon" of sorts &mdash; it's a weak move on an empty board, but for local tactical reasons it can be very strong. The standard example is with the q2 opening, where an unsuspecting Blue who plays 4-4 in response is faced with an unpleasant surprise (more on that later).
+
 
+
<hexboard size="5x5"
+
  coords="hide"
+
  edges="top right"
+
  contents="R c2 B 1:b4 R 2:d3"
+
  />
+
 
+
Move '''G''' is also a threat if Blue already has a stone in either of (*) below.
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 E *:(e5 f6) G:c6"
+
  />
+
 
+
If '''G''' is played, Red should consider blocking the 3rd row ladder at a, or minimaxing at b.
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:c6 E a:b6 b:c3"
+
  />
+
 
+
'''H:''' Another "surprise weapon," arguably even more so. Anecdotally, when KataHex thinks '''H''' is the best move in a position, it rarely assigns a high policy to the move, only liking the move after some search. In other words, KataHex's policy "intuition" rarely considers the move a top choice, or even top 10, until it realizes that the move works tactically in the particular situation.
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:b6 E *:d5"
+
  />
+
 
+
This 2-2 obtuse corner move typically works as an unusual minimaxing move, providing ladder escapes for Blue while simultaneously blocking Red and threatening a move like (*).
+
 
+
'''I:''' This move is sometimes played on 13&times;13, but it rarely works on 19&times;19. The standard joseki is favorable to Red, probably because Blue 1 and 5 function mainly as a ladder escape blocker, and ladders/ladder escapes are themselves less important on 19&times;19.
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:e5 R 2:c4 B 3:c5 R 4:d5 B 5:d6 R 6:b5"
+
  />
+
 
+
'''J:''' Like many other Blue responses, this is a bad move in isolation. Red's 4-4 is already connected to the bottom via [[edge template IV1d]], so Blue attempts to block are futile unless she gets useful territory in exchange (like with '''A'''), but the territory gained by '''J''' is not nearly as good. However, this move can become useful if there are other blue stones present.
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:d5 R 2:c5"
+
  />
+
 
+
'''K:''' Also a weak response. Can you see why?
+
 
+
<hexboard size="7x7"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R d4 B 1:e4 R 2:e2"
+
  />
+
 
+
Red 2 is strong, but that's not the only reason why. It turns out that had Blue played 1 first (before Red played the initial 4-4 stone), then a good Red response would be playing at 4-4. Going back to our general principles, it's a bad idea to play a move that would make your opponent's existing stone unnecessarily well-placed relative to yours, and that's exactly what '''K''' does.
+
 
+
===5-5 obtuse corner===
+
 
+
'''TODO'''
+
 
+
==The first move==
+
 
+
See [[Swap_rule#Size_19]] for a swap map.
+
 
+
We'll now go through the general strategy of specific first moves. For simplicity, everything will be from Red's point of view, assuming Blue doesn't swap. Unlike the guides for smaller board sizes, we won't think too hard about ladder escapes or switchbacks, and instead we will just mention some brief notes for some selected openings.
+
 
+
===Acute corner openings===
+
 
+
<hexboard size="5x5"
+
  coords="hide"
+
  edges="top left"
+
  contents="S red:all blue:(a1--e1 a2--e2 a3)
+
            E *:(c2 d3 e3 b4)"
+
  />
+
 
+
The stone in the acute corner affects which moves are locally efficient for Red and Blue.
+
 
+
====c2====
+
 
+
On 13&times;13, b5 or c6, marked with (*) below, are common Red moves that combine well with c2. On 19&times;19, these moves are a bit too close to the corner. Playing a bit further along the b5-c6 diagonal, such as A or B below, is often a better move:
+
 
+
<hexboard size="9x6"
+
 
   coords="show"
 
   coords="show"
  edges="top left"
+
   contents="S red:all blue:(a1--r1 a2--q2 a3 e3--n3 s3)
   contents="R c2 E *:(b5 c6) A:d7 B:e8"
+
              blue:(a17 f17--o17 s17 c18--s18 b19--s19)
 +
            E 65:(d3 p17)
 +
              3:(e3 o17)
 +
              73:(f3 n17)
 +
              76:(g3 m17)
 +
              73:(h3 l17)
 +
              84:(i3 k17)
 +
              90:(j3 j17)
 +
              103:(k3 i17)
 +
              104:(l3 h17)
 +
              49:(m3 g17)
 +
              6:(n3 f17)
 +
              47:(o3 e17)
 +
              59:(p3 d17)
 +
              121:(h4 l16)
 +
              72:(i4 k16)
 +
              67:(j4 j16)
 +
              81:(k4 i16)
 +
              94:(l4 h16)
 +
              138:(m4 g16)
 +
              122:(i5 k15)
 +
              108:(j5 j15)
 +
              133:(k5 i15)
 +
              69:(q2 c18)
 +
              163:(p2 d18)
 +
              96:(b17 r3)
 +
              201:(b18 r2)
 +
              77:(a2 s18)
 +
              67:(b2 r18)
 +
              56:(c2 q18)
 +
              146:(d2 p18)
 +
              100:(a3 s17)
 +
              137:(b3 r17)
 +
              157:(c3 q17)
 +
              83:(a4 s16)
 +
              73:(b4 r16)
 +
              136:(a5 s15)
 +
              93:(a6 s14)
 +
              95:(a7 s13)
 +
              131:(a8 s12)
 +
              99:(a9 s11)
 +
              41:(a10 s10)
 +
              81:(a11 s9)
 +
              115:(a12 s8)
 +
              78:(a13 s7)
 +
              56:(a14 s6)
 +
              17:(a15 s5)
 +
              57:(a16 s4)
 +
              110:(a17 s3)
 +
              174:(a18 s2)
 +
              56:(a19 s1)
 +
              382:(e10 o10)"
 
   />
 
   />
  
====b4====
+
==Random unsolved questions==
  
Under the right circumstances, Blue c2 (followed by Red tenuki) can be a good local response, though this happens less in the early opening.
+
Most of these are very difficult to answer, and I would be happy if even a few were answered in the next few years:
  
====e3====
+
* Is the obtuse corner always winning on larger board sizes? What about the b4 opening? Let P(n) be the statement that "the obtuse corner is a winning opening in n&times;n Hex without swap." There are a few possible cases; an interesting exercise is to come up with subjective probabilities of each case being true.
 +
** A. P(n) is always true. If so, can we prove this?
 +
** B. P(n) is true for infinitely many n, with finitely many counterexamples. If so, what's the smallest counterexample?
 +
** C. P(n) is true for infinitely many n, with infinitely many counterexamples. If so, does P(n) hold "almost always," "almost never," or somewhere in between?
 +
** D. P(n) is true for finitely many n. If so, what's the largest such n?
 +
* Kriegspiel Hex (Dark Hex), a variant with incomplete information
 +
** Under optimal mixed strategies, what is Red's win probability on 4&times;4?
 +
** For larger boards (say, 19&times;19), is Red's win probability close to 50%?
 +
*** If so, a swap rule might not be needed for Kriegspiel Hex, which would be neat.
 +
*** If not, imagine a variant where Red's first move is publicly announced to both players, and Blue has the option to swap it. Which initial moves are the fairest now?
  
e3 is notable because KataHex thinks it's the fairest opening with the swap rule, with KataHex assigning a 49.2% win percentage for Blue, assuming no swap, after 100k visits.
 
  
===First column openings===
+
replies by [[User:Demer|Demer]]:
  
If Red starts with a move near the middle of his first column, like a10, a good followup for Red is to play one of the hexes marked A or B, or sometimes C (or both). These moves combine very efficiently with the opening stone to split up Blue's edge. KataHex nearly always plays one of these in the early opening.
+
* https://zhuanlan.zhihu.com/p/476464087 has percentages, although it doesn't translate these into a guessed swap map and I don't know anything about the bot they came from.
 +
**​ It suggests that [on 13x13, g3 is the most balanced opening] and [on 14x14, g3 should not be swapped].
 +
** On 27x27 without swap, it likes the 4-4 obtuse corner opening slightly more than anything else nearby.
 +
* As far as I'm aware, even 3&times;4 Dark Hex has not been solved. ​ (https://content.iospress.com/articles/icga-journal/icg180057 apparently gives "some preliminary results" for that size.)
  
<hexboard size="7x5"
+
hexanna:
  coords="hide"
+
  edges="left"
+
  contents="R a4 E A:b5 B:c6 C:b2"
+
  />
+
  
If Red plays at A or C, Blue often peeps in Red's bridge, as follows. Red typically responds at one of the hexes marked (*) or elsewhere, instead of defending the bridge.
+
* Thank you, this is amazing! From the Google Translate, the bot is an adaptation of KataGo trained on 13&times;13 and smaller, using transfer learning to train larger nets on top of the 13&times;13 net for a short period of time. I may edit the [[swap rule]] article later with some insights.
 +
** The results for up to 15&times;15 look very reliable to me. This is because many of the subtle patterns suggested by other bots, like leela_bot, appear in these swap maps. For example, on [https://pic3.zhimg.com/v2-53e66f72eb7129d5ffe676ae293ad856_r.jpg 13&times;13]:
 +
*** a1&ndash;c1 are stronger than d1; a2&ndash;c2 &ge; d2 &ge; e2 in strength; and a similar relation holds for moves on the third row. See [[Openings on 11 x 11#d2]].
 +
*** b4 is weaker than all of its neighbors, because Blue can fit the ziggurat in the corner.
 +
*** j3 is surprisingly weak and i3 is surprisingly strong. Many people were surprised about this when leela_bot's swap map came out, but the result may be more than just random noise.
 +
*** a10 is the weakest of a4&ndash;a10, while a5 is the strongest.
 +
*** b10 is stronger than all of its neighbors, because Blue cannot fit the ziggurat in the obtuse corner.
 +
** That this bot picked up on all these subtleties, and assigns a win percentage close to 100% for most moves on 13&times;13, suggest to me that it is probably stronger than leela_bot and gzero_bot. I can't know for sure, though.
 +
** On the other hand, and the author seems to agree, the 37&times;37 map looks very unreliable. I see percentages as low as 37% but only as high as 54% (for a move like f1, which should almost certainly be a losing move).
 +
** The 27&times;27 map looks more reliable. I'm personally very skeptical that moves on Red's 6th row are among the most balanced moves, but there are some interesting (if somewhat noisy) insights to be had still.
  
<hexboard size="7x5"
+
==Recursive swap==
  coords="hide"
+
Not really a serious suggestion, just for fun. One advantage of "recursive swap" over multi-stone swap is that opening preparation plays a smaller role, because both players have control over the first n stones.
  edges="left"
+
  contents="R a4 1:b5 B 2:b4 E *:(b2 c6)"
+
  />
+
  
====a10&ndash;a15====
+
RECURSIVE_SWAP'[k, depth, color]:
 +
  if depth = 0:
 +
    [color] continues playing as normal.
 +
  else:
 +
    [color] plays a move. [~color] can either
 +
      swap[k], or
 +
      RECURSIVE_SWAP'[k+1, depth-1, ~color]
 +
 +
RECURSIVE_SWAP[n]:
 +
  RECURSIVE_SWAP'[1, n, Red]
  
Some of the fairer openings in this category are a10, a14, a15. Blue's best response to a10&ndash;a15 in the obtuse corner is usually 4-4, but there's no rush to play it:
+
RECURSIVE_SWAP[0]:
  
<hexboard size="7x6"
+
Red continues playing as normal.
  coords="hide"
+
  edges="bottom left"
+
  contents="R a2 B 1:d4"
+
  />
+
  
On 19&times;19, a15 is weaker than it looks, because the 4-2 obtuse corner, marked (*) below, is less potent for Red than on smaller boards:
+
RECURSIVE_SWAP[1]:
  
<hexboard size="6x5"
+
Red plays a move. Blue can either
  coords="hide"
+
* swap, or
  edges="bottom left"
+
* continue playing as normal.
  contents="R a2 E *:b3"
+
  />
+
  
====a16====
+
RECURSIVE_SWAP[2]:
  
a16 is also a relatively fair opening. Blue can play 2-2 obtuse corner like on smaller boards, but it's less clearly the best option. The 4-4 obtuse corner also works, and if Blue instead waits for Red to play 1 as follows, then Blue 2 is a strong response.
+
Red plays a move. Blue can either
 +
* swap, or
 +
* play a move, after which Red can either
 +
** swap2, or
 +
** continue playing as normal.
  
<hexboard size="7x5"
+
RECURSIVE_SWAP[3]:
  coords="hide"
+
  edges="bottom left"
+
  contents="R a4 1:b2 B 2:b5"
+
  />
+
  
===Obtuse corner openings===
+
Red plays a move. Blue can either
 +
* swap, or
 +
* play a move, after which Red can either
 +
** swap2, or
 +
** play a move, after which Blue can either
 +
*** swap3, or
 +
*** continue playing as normal.
  
There are several openings that affect play in the obtuse corner, but they are quite different from each other so we'll consider them separately.
+
===Analysis===
 +
RECURSIVE_SWAP[0] is the same as playing with no swap.
  
====a19====
+
RECURSIVE_SWAP[1] is the same as playing with the swap rule.
  
A common joseki for Red is to play at 1, which is basically the 4-4 opening shifted up one row. Blue often responds at 2, and Red has a couple good responses marked (*):
+
RECURSIVE_SWAP[2]:
 +
* Red shouldn't play a move that's too strong or it'll be swapped.
 +
* If Red plays a weak stone, Blue should try to play a move just strong enough that Red will be indifferent to swap2. (If a "fair" move is half a stone, and Red plays a weak move worth x < 0.5 stones, Blue should play a move worth x + 0.5 stones.)
 +
* Red should try to play a weak move that's also hard for Blue to equalize (so that Red gets a sizable advantage when deciding whether to swap2 or not).
  
<hexboard size="6x6"
+
RECURSIVE_SWAP[3]:
  coords="hide"
+
* If Red plays a move worth x > 0.5 stones, Blue should swap.
  edges="bottom left"
+
* If Red plays a weak stone worth x < 0.5, Blue should play a move worth less than x + 0.5 (or else Red will swap2). If Blue's move is worth y, then Red should play a move as close to (y - x) + 0.5 as possible, so that Blue's swap3 decision is difficult.
  contents="R a6 1:d2 B 2:c4 E *:(b4 c1)"
+
* Red should play a weak move that's hard for Blue to find a tricky reply to (where a "tricky" reply is one that makes it hard for Red to equalize, such that Blue has an easy time deciding whether to swap3 or not).
  />
+
  
My subjective opinion is that this is the most beginner-friendly opening:
+
Miscellaneous:
 +
* Infinite recursive swap is (under perfect play) strategically equivalent to Reverse Hex, because each player must try to play a losing move as long as possible, or else their opponent will swap and win.
 +
* On any board size, assuming the opponent has the swap option after the board is completely filled, I believe RECURSIVE_SWAP[n] is a win for Red if n is even, and a win for Blue if n is odd.
 +
** I'm bad at proving things rigorously, but I think this follows from the fact that Reverse Hex is barely a win for the winning side (in that the losing side can delay the loss until the whole board is filled).
  
* A beginner who opens with Red c2 could accidentally play b3 instead, or alternatively his opponent who wishes to swap Red c2 could implement swap-pieces incorrectly and replace it with Blue c2 instead of b3. Though a19 should technically be swapped to s1 under the swap-pieces convention, it doesn't really matter.
+
----
  
* Aesthetically, a19 retains the "most" symmetry of any fair opening. Beginners who don't want to think about the swap rule could play Hex without swap, where Red must open in an obtuse corner, and such a ruleset would be quite elegant and still balanced, even on large boards.
+
[[User:Fjan2ej57w|Fjan2ej57w]]'s question 7, "how much space of an empty board would be filled if both sides play optimally":
  
* For beginners who don't want to learn too much opening theory, "obtuse corner" is easy to remember and a good [https://en.wikipedia.org/wiki/Focal_point_(game_theory) Schelling point]. It's relatively likely that other beginners who look at the swap map and just want to try a random opening will pick a19 or s1.
+
[https://mathoverflow.net/questions/302821/length-of-optimal-play-in-hex-as-a-function-of-size Stack Overflow answer] for reference. My conjecture is that Hex without swap asymptotically requires Θ(n^2) cells, and more generally, a Demer handicap of Θ(f(n)) stones requires Θ(n^2/f(n)) cells, for all f(n) between Θ(1) and Θ(n). My intuition is that on 1000000&times;1000000 Hex, the first-player advantage is minuscule, and even a handicap of n^(1/2) = 1000 stones, say spaced out evenly across the short diagonal, would require on the order of "1000 columns and 1000000 rows", n^(3/2), to convert to a final connection. Another interesting question is to find a constructive winning strategy with an o(n) (sub-linear) handicap.
 
+
====q2====
+
 
+
If Red opens q2, the most important advice for Blue is to refrain from playing 4-4 in the nearby obtuse corner, because of Red's strong response:
+
 
+
<hexboard size="7x6"
+
  coords="hide"
+
  edges="top right"
+
  contents="R d2 B 1:c4 R 2:e3 B 3:d5 R 4:f4 B 5:e6 R 6:d6 B 7:e5 R 8:c5 B 9:d4"
+
  />
+
 
+
====b17====
+
 
+
For the adventurous, while b17 should be swapped, it is weaker than it looks and quite playable. It's not overly strong, because Blue can play b18, either immediately or later. I consider it the obtuse-corner analog of b4, which is surprisingly weak because of the threat of Blue c2.
+
 
+
<hexboard size="5x5"
+
  coords="hide"
+
  edges="bottom left"
+
  contents="R b3 B 1:b4"
+
  />
+
 
+
===Third and fourth row openings===
+
 
+
According to KataHex, the fairest openings in this category are e3 (mentioned above), n3, and p3.
+
 
+
Openings in the middle of Red's 4th row are surprisingly playable, but most people prefer not to have their opening stone swapped, and playing against a 4th row opening stone can seem daunting, so a 3rd row opening is often preferable. If you strongly prefer having the first stone, or you think your opponent is overly eager to swap, you can play a weaker opening like g3 or h3.
+
 
+
Third row openings, especially those near an obtuse corner (except p3), tend to combine well with the 4-2 obtuse corner move:
+
 
+
<hexboard size="5x7"
+
  coords="hide"
+
  edges="top right"
+
  contents="R b3 1:f4"
+
  />
+
  
[[category: Opening]]
+
reply by [[User:Demer|Demer]]: ​ ​ ​ ​ ​ ​ ​ Even one with ​ n/6 - ω(1) ​ handicap would be interesting. ​ ​ ​ (improving on ​ https://webdocs.cs.ualberta.ca/~hayward/papers/handicap.pdf )
[[category: Advanced Strategy]]
+

Latest revision as of 17:25, 8 June 2024

Openings on 19 x 19

Strategic advice from KataHex

I started learning Hex mid-July of 2021, about 2 weeks before I created my LittleGolem account.

katahex/general strategy part 2 (rough draft)

This is not very organized, and some bullet points won't make sense without further context. I also need to decide which ideas are worth keeping. (I have outlines and rough drafts of even more stuff, but I'm worried about making the article too long and diluting it with only rarely-applicable advice.)

  • If you can't find a good move, avoid a bad one by playing "skew" relative to existing stones.
    • That is, play a move that interacts with existing stones as little as possible (at least distance 3 from all other stones).
    • The difference between a good move and a blunder is >5x the difference between a great move and a good move.
  • Stone "arithmetic": not an exact science, use your intuition; play the move that maximizes the sum of local and global efficiency. I am not actually calculating values when playing, just making mental adjustments.
    • The best move locally is rarely the best move globally. Hex is a game of concessions and tradeoffs. There is no "free lunch," unless you count concepts like inferiority/domination.
    • Conversely, if it looks like your opponent is beating you on one side of the board, there are two possibilities:
      • You played suboptimal moves in that region.
      • Your opponent played too strong in that area, which necessarily means they made concessions elsewhere (usually the opposite side of the board).
    • If the first option is true, you are probably losing anyways, so assume (or hope) the second is true. That means you should tend to tenuki and play the opposite side of the board, if you think your opponent overplayed one side. Indeed, if you continue playing on the same side, your opponent might be able to get out of their mistake by minimaxing, such that they go from being overconnected to being merely connected.
  • For brevity, some notation for up-weighting and down-weighting particular moves:
    • chess notation: ??/?/?!/!?/!
    • one way to think about it: you are a machine who has to assign a score (or a prior policy probability) to each move. !? means slightly upweight, ! means upweight, ?? means strongly downweight, and so on.
    • asymmetric scale, one blunder can take multiple "great" moves to recover from; also, brilliancies (!!) are rare and don't come from easily described rules like the ones in this article
  •  !? bridge moves, either from your own stone or your opponent's
    • an additional !? if it's part of a bridge ladder that you'll win (you're playing 5-4 acute corner), ?! if your opponent will win
  •  ? moves adjacent to your own stone, unless you are minimaxing and know that it's the best move. Be careful of bad minimaxing, where you connect too weakly to one side, allowing your opponent to intrude for territory. More often than not, the concession you make here isn't worth the extra strength.

a3 opening

Nowadays, strong players rarely play a3 on the first move because it's similar to c2 (which is already on the losing side on most board sizes), but a bit weaker. There are some subtle differences between a3 and c2, however, and most strategy advice on the a3 opening is outdated.

If Red plays a3, some older strategy guides recommend that Blue respond d6 or e7 if she wants to play in the acute corner. However, KataHex considers this an inaccuracy; even though d6 and e7 are attacking stones in the sense that Blue would win a bridge ladder towards the acute corner, they don't do a good job blocking Red's edge the way e4 does in an empty corner.

If you want to play the acute corner, 5-5, or 4-4 on smaller boards, is a good choice. (There are other options further away from the corner on larger boards.) KataHex and other bots consistently prefer these moves:

One reason may be the efficiency of templates IV2e and V2d, both of which have a "hole"; the template can be rotated so that the hole coincides with Red's a3 stone. This is explored in more detail below.

It can be useful to realize that a3 is primarily a blocking move (blocking Blue on the left rather than helping Red connect to top), whereas c2 is half blocking and half connecting. To illustrate the point, it's a bad idea for Red to play both c2 and 4-4 obtuse corner on the top edge (in the absence of Blue's blocking stones), because that's too much strength near the top. However, Red could feasibly play both a3 and 4-4 on the top edge.

a3 can combine well with c5. Red's goal is to leave b4/c5 open as options (these are the same hexes used in the a3 escape trick, but of course, a3+c5 can also connect upwards). Blue should also keep an eye on b4 - not to play immediately because it's too close to her own edge - but as the most efficient option for connecting to the left side near the top. Blue would much prefer to connect using b4 (which is a locally efficient move that neutralizes a3's switchback and upwards connecting potential) than b5 (which only slightly weakens a3's potential, forcing Red to play d5 instead of c5), or a 2nd row ladder with b3 (which removes Red's weakness at b1).

a3 is one of my favorite openings to analyze (I only wish it were more fair as an opening move). Unlike c2 where Blue's best move is typically to tenuki, a3 gives Blue the option to fight in the same acute corner. There is essentially a separate theory of a3 corner joseki.

I find a3 lines particularly educational because a3 changes the corner just enough to make different moves more efficient. You can learn a lot about how an existing stone influences neighboring stones.

Second row ladder vs. connecting directly

Pretty contrived, but holding your opponent to a (one-sided) second row ladder instead of letting them connect directly is worth more than getting a second-row escape yourself.

I came across this intuition a few times when studying various sequences on large boards, and it seemed surprisingly self-evident (almost like it "has" to be true). I wasn't sure why, so I thought it was a fun exercise to convince myself that it actually makes sense from first principles. Here is an informal argument:

  • Let x = "holding your opponent to a second row ladder instead of letting them connect directly"
  • Let y = "getting a second-row escape yourself"
  • To show that x > y, decompose x = m - n, where
  • m = "your opponent has a second row ladder"
  • n = "your opponent connects directly"
  • Also, -y is "your opponent has a second-row escape". Then, x > y is equivalent to m + (-y) > n.
  • That is, all else equal, you'd rather allow your opponent a second-row ladder with a second-row escape, than allow your opponent a direct connection. Why is this true? In the first situation (m + (-y)), you have the ability to jump as the defender, and gain territory in exchange for allowing your opponent to connect. On the other hand, if the opponent is connected directly without the need for a ladder escape, you have no such option.

Some potential applications of this rule (it's a stretch to say that these are direct implications of the rule, but the rule can help with building intuition):

Insights and tidbits from KataHex (hzy's bot)

  • katahex_model_20220618.bin.gz (I'll call this the "strong" net) appears significantly stronger than the "default" net.
  • Swap map for 19×19 generated with the strong net, with around 15k visits for most moves. For the red hexes, the number corresponds to Blue's Elo advantage if she swaps Red's move; for the blue hexes, the number corresponds to Blue's Elo advantage if she does not swap Red's move. Smaller numbers correspond to fairer openings. Includes all fair openings as well as a few selected unfair openings, including the strongest move without swap (e10). I used more visits for the fairest moves: 1000k for e3 (49.5% win rate), 500k for n3 (49.2%), 100k for a15 (52.5%).
    • Key takeaways: The swap map at Swap rule#Size 19 uses data that is almost certainly from the "weak" net. Compared to the weak net, the strong net notably thinks a19, n3—p3, and k4—l4 are stronger. I personally trust the strong net's evaluations more; I think it's dubious that the weak net thought l4 was a very fair opening. The nets disagree on whether e3 is winning or losing, though it's so close to 50% that the difference isn't meaningful.
abcdefghijklmnopqrs123456789101112131415161718195677675614616369201174100137157653737673849010310449647599611083731217267819413857136122108133179356957813111599814138238241819911513178955693171331081221365713894816772121738311096594764910410390847376733651571371001742016916314656677756

Random unsolved questions

Most of these are very difficult to answer, and I would be happy if even a few were answered in the next few years:

  • Is the obtuse corner always winning on larger board sizes? What about the b4 opening? Let P(n) be the statement that "the obtuse corner is a winning opening in n×n Hex without swap." There are a few possible cases; an interesting exercise is to come up with subjective probabilities of each case being true.
    • A. P(n) is always true. If so, can we prove this?
    • B. P(n) is true for infinitely many n, with finitely many counterexamples. If so, what's the smallest counterexample?
    • C. P(n) is true for infinitely many n, with infinitely many counterexamples. If so, does P(n) hold "almost always," "almost never," or somewhere in between?
    • D. P(n) is true for finitely many n. If so, what's the largest such n?
  • Kriegspiel Hex (Dark Hex), a variant with incomplete information
    • Under optimal mixed strategies, what is Red's win probability on 4×4?
    • For larger boards (say, 19×19), is Red's win probability close to 50%?
      • If so, a swap rule might not be needed for Kriegspiel Hex, which would be neat.
      • If not, imagine a variant where Red's first move is publicly announced to both players, and Blue has the option to swap it. Which initial moves are the fairest now?


replies by Demer:

  • https://zhuanlan.zhihu.com/p/476464087 has percentages, although it doesn't translate these into a guessed swap map and I don't know anything about the bot they came from.
    • ​ It suggests that [on 13x13, g3 is the most balanced opening] and [on 14x14, g3 should not be swapped].
    • On 27x27 without swap, it likes the 4-4 obtuse corner opening slightly more than anything else nearby.
  • As far as I'm aware, even 3×4 Dark Hex has not been solved. ​ (https://content.iospress.com/articles/icga-journal/icg180057 apparently gives "some preliminary results" for that size.)

hexanna:

  • Thank you, this is amazing! From the Google Translate, the bot is an adaptation of KataGo trained on 13×13 and smaller, using transfer learning to train larger nets on top of the 13×13 net for a short period of time. I may edit the swap rule article later with some insights.
    • The results for up to 15×15 look very reliable to me. This is because many of the subtle patterns suggested by other bots, like leela_bot, appear in these swap maps. For example, on 13×13:
      • a1–c1 are stronger than d1; a2–c2 ≥ d2 ≥ e2 in strength; and a similar relation holds for moves on the third row. See Openings on 11 x 11#d2.
      • b4 is weaker than all of its neighbors, because Blue can fit the ziggurat in the corner.
      • j3 is surprisingly weak and i3 is surprisingly strong. Many people were surprised about this when leela_bot's swap map came out, but the result may be more than just random noise.
      • a10 is the weakest of a4–a10, while a5 is the strongest.
      • b10 is stronger than all of its neighbors, because Blue cannot fit the ziggurat in the obtuse corner.
    • That this bot picked up on all these subtleties, and assigns a win percentage close to 100% for most moves on 13×13, suggest to me that it is probably stronger than leela_bot and gzero_bot. I can't know for sure, though.
    • On the other hand, and the author seems to agree, the 37×37 map looks very unreliable. I see percentages as low as 37% but only as high as 54% (for a move like f1, which should almost certainly be a losing move).
    • The 27×27 map looks more reliable. I'm personally very skeptical that moves on Red's 6th row are among the most balanced moves, but there are some interesting (if somewhat noisy) insights to be had still.

Recursive swap

Not really a serious suggestion, just for fun. One advantage of "recursive swap" over multi-stone swap is that opening preparation plays a smaller role, because both players have control over the first n stones.

RECURSIVE_SWAP'[k, depth, color]:
  if depth = 0:
    [color] continues playing as normal.
  else:
    [color] plays a move. [~color] can either
      swap[k], or
      RECURSIVE_SWAP'[k+1, depth-1, ~color]

RECURSIVE_SWAP[n]:
  RECURSIVE_SWAP'[1, n, Red]

RECURSIVE_SWAP[0]:

Red continues playing as normal.

RECURSIVE_SWAP[1]:

Red plays a move. Blue can either

  • swap, or
  • continue playing as normal.

RECURSIVE_SWAP[2]:

Red plays a move. Blue can either

  • swap, or
  • play a move, after which Red can either
    • swap2, or
    • continue playing as normal.

RECURSIVE_SWAP[3]:

Red plays a move. Blue can either

  • swap, or
  • play a move, after which Red can either
    • swap2, or
    • play a move, after which Blue can either
      • swap3, or
      • continue playing as normal.

Analysis

RECURSIVE_SWAP[0] is the same as playing with no swap.

RECURSIVE_SWAP[1] is the same as playing with the swap rule.

RECURSIVE_SWAP[2]:

  • Red shouldn't play a move that's too strong or it'll be swapped.
  • If Red plays a weak stone, Blue should try to play a move just strong enough that Red will be indifferent to swap2. (If a "fair" move is half a stone, and Red plays a weak move worth x < 0.5 stones, Blue should play a move worth x + 0.5 stones.)
  • Red should try to play a weak move that's also hard for Blue to equalize (so that Red gets a sizable advantage when deciding whether to swap2 or not).

RECURSIVE_SWAP[3]:

  • If Red plays a move worth x > 0.5 stones, Blue should swap.
  • If Red plays a weak stone worth x < 0.5, Blue should play a move worth less than x + 0.5 (or else Red will swap2). If Blue's move is worth y, then Red should play a move as close to (y - x) + 0.5 as possible, so that Blue's swap3 decision is difficult.
  • Red should play a weak move that's hard for Blue to find a tricky reply to (where a "tricky" reply is one that makes it hard for Red to equalize, such that Blue has an easy time deciding whether to swap3 or not).

Miscellaneous:

  • Infinite recursive swap is (under perfect play) strategically equivalent to Reverse Hex, because each player must try to play a losing move as long as possible, or else their opponent will swap and win.
  • On any board size, assuming the opponent has the swap option after the board is completely filled, I believe RECURSIVE_SWAP[n] is a win for Red if n is even, and a win for Blue if n is odd.
    • I'm bad at proving things rigorously, but I think this follows from the fact that Reverse Hex is barely a win for the winning side (in that the losing side can delay the loss until the whole board is filled).

Fjan2ej57w's question 7, "how much space of an empty board would be filled if both sides play optimally":

Stack Overflow answer for reference. My conjecture is that Hex without swap asymptotically requires Θ(n^2) cells, and more generally, a Demer handicap of Θ(f(n)) stones requires Θ(n^2/f(n)) cells, for all f(n) between Θ(1) and Θ(n). My intuition is that on 1000000×1000000 Hex, the first-player advantage is minuscule, and even a handicap of n^(1/2) = 1000 stones, say spaced out evenly across the short diagonal, would require on the order of "1000 columns and 1000000 rows", n^(3/2), to convert to a final connection. Another interesting question is to find a constructive winning strategy with an o(n) (sub-linear) handicap.

reply by Demer: ​ ​ ​ ​ ​ ​ ​ Even one with ​ n/6 - ω(1) ​ handicap would be interesting. ​ ​ ​ (improving on ​ https://webdocs.cs.ualberta.ca/~hayward/papers/handicap.pdf )