Difference between revisions of "User:Hexanna"

From HexWiki
Jump to: navigation, search
(reorganize)
(finish up 2-stone discussion)
 
(79 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==
+
[[PlayHex]] > Settings > Shading pattern > Custom > <code>t = (2*row + 3*col) % 7; (t==0 ? 0 : (3^t % 7))/6</code>
  
* 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&times;18 and larger.
+
[https://github.com/hexanna1/hex-scripts Hex scripts]
  
*  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].
+
==draft of more strategy stuff==
  
* 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.
+
There's a fair amount of stuff for [[Strategic advice from KataHex]] that I've either been too lazy to write up / polish, or haven't thought of a good way to explain. I also haven't properly conveyed which things are important; some things come up rarely and should either be mentioned briefly or cut for the article. There's also a tradeoff in generality/specificity and concreteness/abstractness.
  
* 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&times;19, there is room to start a local fight near the middle of the board, relatively far away from existing stones.
+
I need a lot more concrete examples, but it's hard to come by truly instructive examples (or know what people find useful)
  
==Common human mistakes==
+
* terminology: inaccuracy < mistake < blunder
 +
* evals are noisy, taking the highest one in non-tactical situations can be biased
 +
* much later, talk about strength on an edge and how it behaves with existing stones
  
* 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.
+
===Local patterns===
  
==General principles==
+
[''prerequisites: cuts, maybe "pattern 1" and other patterns in that section &mdash; consider reordering'']
  
* Corner and edge moves: In the absence of other stones nearby, Red would do well to play in one of the following spots:
+
It's a good idea to first study patterns in a '''vacuum''', meaning in the absence of nearby stones. This provides a useful baseline when evaluating a move. A few points worth mentioning first:
 +
* We'll sometimes use quantitative language, such as "fractions" of a stone. That doesn't mean you need to memorize the numbers or do a bunch of math while playing Hex. Numbers are just less ambiguous than words.
 +
* Hex strategy is largely about making the right tradeoffs and avoiding blunders, not finding "the best move." Real games are messy. There's local/global considerations and the possibility of overlapping patterns or regions. For each pattern, try to learn not only the "optimal" move(s), but also roughly how bad the suboptimal moves are, so you can properly weigh moves that look strong in one dimension but weak in another.
 +
* You won't remember everything here, and this guide isn't exhaustive. Your goal is to build a parsimonious mental model of Hex: what good/bad Hex looks like, and ''why'', so that your intuition generalizes well to new positions.
 +
** One mental model we'll use: you can quantify how much a position/pattern/move favors one side in terms of ''fractions of a stone''. The basic idea is that [[passing]] is like giving up "1 stone" (and so it's worth 0 stones), the best move is worth 1 stone, a fair swap move is worth 0.5 stones, and moves can also be worth >0.5 or <0.5 stones. The same idea can be extended to patterns. The crux of the mental model is that empirically, the [https://en.wikipedia.org/wiki/Superposition_principle superposition principle] ''approximately'' applies, especially when multiple patterns are sufficiently far apart and independent. That is, if Red made a 0.2-stone mistake somewhere and Blue made a 0.1-stone mistake elsewhere, in some sense, your best guess is that Blue is ahead by 0.1 stones.
 +
*** This is a heuristic mental model &mdash; while I think it's ''very'' useful, it's not the ground truth. (Of course, every position is theoretically either winning or losing, but that's not a useful lens strategically.) In general, Hex is "nonlinear", and nearby patterns can absolutely interact. However, empirically it behaves well and is ''locally'' linear, which is usually what matters strategically. Of course, if you subscribe to this model, part of Hex strategy is also thinking about the nonlinearities.
 +
*** For the mathematically inclined: to evaluate a move or pattern, we consider KataHex win rates in logistic Elo space, and then we apply linear interpolation of the candidate move compared to the "optimal" and pass moves. (Technically, many KataHex versions don't work well with pass moves, so instead, we estimate the value of the worst move on an empty board &mdash; it's pretty close to zero &mdash; and use that instead.) Logistic Elo is the correct space to use because it's proportional to log odds, and adding Elo numbers is like multiplying odds, which is the correct way to apply updates in a Bayesian sense.
  
<hexboard size="19x19"
+
Local patterns can occur in "open" areas (areas far away from corners/edges, whether in a vacuum or not) as well as near corners/edges. Let's start with open patterns.
  coords="show"
+
* The simplest open patterns are a single stone of your color, and a single stone of the opponent's color. They aren't as interesting as other patterns, but we'll discuss them for completeness.
  contents="R d5 e6 *:f7 g8 f9 *:e10 *:e11 *:d16 p15 o14 *:n13 m12 n11 *:o10 *:o9 *:p4"
+
** Given a stone S of your own color in a vacuum, where should you play relative to it? Most choices, like playing a bridge or a "classic block" or much further away from S, are nearly equally good. One major exception is playing adjacent to S, which is a mistake (intuitively, it's wasteful to play too many of your own stones close together). Playing two adjacent steps or two bridge-moves away is an inaccuracy, because those moves are near and long bridge allow-cuts, respectively. [''Author's note:'' Using Δ-notation makes this much cleaner, but I'm not sure whether to introduce it in the actual article. If we apply some averaging and heuristic "noise reduction" methods to KataHex evals, playing Δ1 from S is a roughly 0.35-stone mistake in a vacuum, playing Δ4 or Δ12 from S is a 0.1-stone mistake because of the allow-cuts, and everything else, like Δ3/Δ7/Δ9/Δ13/Δ16 or tenuki, is close to optimal.]
  />
+
*** ''Caution:'' It's easy to draw incorrect conclusions from this if you're not careful. Keep in mind this is the strength of a stone relative to S ''without any nearby stones'', not even the edges/corners (which can be thought of as virtual stones). This never happens on small boards, and must be balanced with many other factors on larger boards.
 +
** Given a stone S of the opponent's color in a vacuum, where should you play relative to it? Playing adjacent or a bridge away from S is a slight inaccuracy because your opponent can respond adjacent or a bridge away (respectively) from both stones, as we'll cover soon. All other moves are almost equally good. [Playing Δ1 from S is a 0.05-stone mistake, playing Δ3 away is a 0.1-stone mistake, and everything else is close to optimal.]
 +
* Let's move on to some important two-stone patterns. Consider a stone of your color and an adjacent opposing stone, like in the diagram below. Suppose it's Red's turn. Locally, how far from optimal is each marked Red response (a)&ndash;(g) (where some responses have the same letter due to symmetry)? How far from optimal is it to tenuki?
 +
: <hexboard size="5x5" float="inline" edges="none" coords="none" contents="R c3 B d3 E a:(d2 c4) b:(e2 d4) c:(c2 b4) d:b3 e:(e1 c5) f:e3 g:(b2 a4)" />
 +
:* Red is already "ahead" by 0.05 stones because Blue played adjacent to Red (which was a 0.05-stone mistake). This is our baseline for evaluating Red's move.
 +
:* Red's optimal local response is (a), preserving the 0.05-stone advantage. This is a very important local pattern! (It's also our first nonlinearity. While playing adjacent to your own stone ''in a vacuum'' is a mistake since you're overplaying that region &mdash; the second stone is partially redundant with the first &mdash; the presence of the opposing stone makes that no longer true. As we'll see later, an important topic is learning how opposing stones influence your own.)
 +
:*: <hexboard size="2x2" float="inline" edges="none" coords="none" visible="-a1" contents="R a2 B b2 R b1" />
 +
:* ''Pop quiz:'' how much worse than (a) is each of the other marked moves (including tenuki), in fractions of a stone, assuming no other major nonlinearities? This is a tricky exercise, but if you understand the mental model well and know about cuts, you already know enough to make reasonable predictions. Analyzing real games often involves similar kinds of guessing.
 +
:* ''Answers:''
 +
:** Tenuki: The simplest response to analyze. If Red tenukis instead of playing (a), then by symmetry Blue could play (a) herself! That flips a 0.05-stone advantage into a 0.05-stone disadvantage, implying that tenuki is a 0.1-stone mistake. Indeed, KataHex agrees when you check the evals. In a way, the strength of (a) is why Blue's earlier choice to play adjacent to the Red stone is locally slightly inaccurate. And because tenuki is suboptimal, the local pattern is slightly tactical; this contributes to Hex games feeling like lots of local fights rather than a "cold" game.
 +
:** (b): This is an adjacent allow-cut. We haven't quantified these precisely, but you should expect (b) to be a blunder. KataHex says it's a 0.5-stone mistake, and Blue's best reply is cutting through at the adjacent (a).
 +
:** (c): This is a mistake because Blue can respond at the non-adjacent (a), rendering (-) below relatively useless. KataHex quantifies (c) as a 0.4-stone mistake.
 +
:**: <hexboard size="3x2" float="inline" edges="none" coords="none" visible="-(b1 b3)" contents="R -:a2 B b2 R a1 B a3" />
 +
:** (d): Blue can respond at either (a) and create a pattern congruent to the one when Red plays (c), so this is also a 0.4-stone mistake.
 +
:** (e): The start of a [[bottleneck]], but more importantly, it's a near allow-cut. Applying our mental model: a near allow-cut is a 0.1-stone mistake, but given that Red didn't play (a), we should think of this on top of a tenuki baseline, which adds another 0.1 (total 0.2). KataHex actually says it's a 0.25-stone mistake. This kind of deviation is unsurprising and doesn't invalidate the mental model &mdash; our reasoning was a bit handwavy, Blue has alternatives to the near-cut, KataHex evals are inherently noisy, and we probably didn't account for all nonlinearities.
 +
:** (f): This is a retroactive near allow-cut. Similar to (e), it's a 0.25-stone mistake.
 +
:** (g): This and similar Red moves further away from the blue stone are harder to reason about. KataHex thinks these moves are generally 0.15- to 0.2-stone mistakes; working backwards, you could decompose that into a 0.1 tenuki baseline, and attribute the remaining portion to the "non-tactical" component of the move's strength. Also, it should be intuitive that the further away the Red move, the more it "looks like" tenuki, where the non-tactical component tends to zero in the limit. (Again: while this is handwavy, the general approach of "fuzzy reasoning" we used here &mdash; taking the heuristics you know to imply conclusions that aren't necessarily "correct" in some theoretical sense, but that are much better than blind guessing &mdash; is a powerful tool when thinking about real games.)
 +
:* If you understand the above, you only have to memorize that (a) is the optimal reply, because you can reconstruct nearly all of the rest from first principles and fuzzy reasoning.
 +
* Let's consider the other important two-stone pattern, a stone of your color and an opposing stone a bridge away. Suppose it's Red's turn. We can do a similar exercise and evaluate (a)&ndash;(e) and tenuki.
 +
: <hexboard size="4x6" float="inline" edges="none" coords="none" contents="R b3 B d2 E a:(c1 c4) b:(d1 d3) c:(c2 c3) d:(b2 b4) e:(a3 a4) f:f1 g:e3" />
 +
:* Red is already ahead by 0.1 stones because Blue played a bridge away from Red.
 +
:* Red's optimal local response is (a), preserving the 0.1-stone advantage. This is an important pattern, and we will say much more about it later. [''Reminder to self:'' Talk about this pattern but extended, the bridge intrusion, the retroactive bridge allow-cut and its role in pruning relative to the bridge intrusion.]
 +
:*: <hexboard size="3x3" float="inline" edges="none" coords="none" visible="-(a1 a2 b3 c3)" contents="R a3 B c2 B b1 S c1 b2" />
 +
:* ''Quiz:'' how much worse than (a) is each of the other marked moves (including tenuki)?
 +
:* ''Answers:''
 +
:** Tenuki: By symmetry, if Red tenukis, Blue can play at (a), turning a 0.1-stone advantage into a 0.1-stone disadvantage, so tenuki is a 0.2-stone mistake. KataHex agrees, and just like in the adjacent case, this pattern is tactical.
 +
:** (b): This is a near allow-cut, and after Blue responds at the adjacent (c), the resulting pattern is congruent to case (e) in the previous discussion of the adjacent 2-stone pattern (where KataHex said it was a 0.25-stone mistake). However, unlike the previous case, our baseline is higher: Red is ahead by 0.1 with the optimal response, not 0.05. It's worse (by 0.05) to start from a 0.05-stone higher baseline and reach the same result, so this is actually a 0.3-stone mistake.
 +
:** (c): This is congruent to case (c) in the adjacent 2-stone pattern (which was a 0.4-stone mistake), but we're starting from a 0.05 higher baseline, so this is a 0.45-stone mistake.
 +
:** (d) and (e): Most simply, these Red replies are weak because they're adjacent to Red's existing stone, and Blue's existing stone isn't sufficiently close enough to make the second red stone useful. KataHex says this is a 0.45-stone mistake.
 +
:** (f): This is a long bridge allow-cut. According to our mental model, this should be 0.3-stone mistake &mdash; 0.2 from the tenuki baseline, and 0.1 from the allow-cut. KataHex agrees.
 +
:** (g): This is a (short) bridge allow-cut. KataHex says it's roughly a 0.6-stone blunder.
 +
* ...
  
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.
 
  
* 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:
+
<hexboard size="3x3" float="inline" edges="none" coords="none" contents="R b1 c1 B -:b2 a3 E *:c2" />
<hexboard size="7x7"
+
<hexboard size="3x4" float="inline" edges="none" coords="none" contents="R a2 c1 d2 B b3 S b1 b2 c2 d1" />
  coords="hide"
+
<hexboard size="3x4" float="inline" edges="none" coords="none" contents="R a3 c2 B d1 S b2 b3 E *:(c1 d2)" />
  edges="left"
+
<hexboard size="3x4" float="inline" edges="none" coords="none" contents="R a2 b3 B b1 S b2 a3 E *:(a1 d2)" />
  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:
+
In these patterns, the shaded cells are expected to be empty.
<hexboard size="7x8"
+
* Pattern 1 is strong for Red (and weak for Blue), because Red threatens to play at (*) to kill the blue stone at (-). Even if Red hasn't played (*), the pattern is still weak for Blue, because the effectiveness of (-) is hindered by the other blue stone.
  coords="hide"
+
** This pattern frequently happens near the obtuse corner, as a result of bad minimaxing. In the first example below, Blue 3 is a common, but misguided, attempt at minimaxing. However, it's a mistake, and Red 4 (which creates the pattern) is the best reply. This position is weak for Blue ''even though Red does not plan to play (*)'' (as it is too close to his own edge) &mdash; Blue 3 hinders Blue 1, and the damage has already been done. In the second example, Blue 5 is a bad minimaxing move that creates the pattern, and Red 6 kills the blue stone.
  edges="left"
+
*: <hexboard size="5x5" float="inline" edges="bottom left" coords="none" contents="B 1:d2 R 2:c3 B 3:e1 R 4:c2 E *:d3"
  contents="B e4 E A:g3 B:f4 C:f5 D:d6 E:c5 F:d3 *:f2"
+
/> <hexboard size="6x6" float="inline" edges="bottom left" coords="none" contents="B 1:f1 R 2:d2 B 3:d3 R 4:e2 B 5:d4 R 6:c3" />
  />
+
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:
+
===Ladders===
<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.
+
* Ladders are tricky. Here's a first-order approximation &mdash; there are many exceptions, but this is still a useful baseline:
 +
** As the defender of the ladder, you have two main options: push, or let your opponent connect in exchange for territory. Look ahead to see whether pushing seems good for you.
 +
*** Generally, yield if and only if pushing would allow your opponent to adjacent-cut through two of your stones (which happens if you have a stone above the ladder).
 +
*** If the attacker fails to push, you should either bridge or play adjacently on the attacker's row to cut in front of the ladder. In other words, Blue should play at (*) or (+) below:
 +
***: <hexboard size="4x5" float="inline" edges="bottom" coords="none" contents="R arrow(12):a2 B a3 R b2 B b3 E *:d2 +:c2" />
 +
** As the attacker of the ladder, your main options are to push or pivot. If you're close to an acute corner, you can either pivot, or if the corner is empty, play a cornering move.
 +
*** Most of the time, pushing is good until you reach a corner.
 +
*** If you have stones above the ladder, try to make use of them, mostly by jumping and pivoting early enough so that the stones aren't "wasted".
  
* 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).
+
===Advanced strategy: Leaving the question open===
  
* 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.
+
An important skill is learning when to tenuki. One class of examples is when you have a choice between two moves (or two sets of moves A and B), and playing one prevents you from playing the other one later. Your opponent is asking a [[question]]: do you want to play set A or set B? It can be advantageous to leave both possibilities open, so that if your opponent plays a move near the region, you can respond with the more advantageous reply of A and B. (The "dual" viewpoint: It can be a mistake to answer the question immediately &mdash; that gives your opponent a better idea of what to play in that region, both practically and theoretically. Answering it relieves your opponent of the obligation to play a move that counters ''both'' A and B.)
  
* 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.
+
Here's an instructive example. Consider this 6-5 acute corner joseki ([https://hexworld.org/board/#19nc1,o14o15n15m17p16n17q14q15p15p17o17p14r12 HexWorld link]):
 +
<hexboard size="8x8" float="inline" edges="bottom right" coords="none" contents="R 1:d3 B 2:d4 R 3:c4 B 4:b6 R 5:e5 B 6:c6 R 7:f3 B 8:f4 R 9:e4 B 10:e6 R 11:d6 B 12:e3 R 13:g1 S c5 d5 E A:(f2 c7) B:(g2 c8) *:a5 -:d7" />
 +
* There is a lot to unpack. First, some general commentary before we talk about the "question".
 +
** Blue 6 captures the two shaded hexes and should be an automatic reply to Red 5 for a strong player.
 +
** Blue 10 is not the only possible reply after Red 9. (*) is another strong option. (-) looks locally tempting (it lets Red connect in exchange for a 2nd-row ladder escape) but it's a mistake, because it's redundant with Blue 8 which already provides a 2nd-row ladder escape.
 +
** Red yields the soon-to-be ladder on move 13 to prevent an adjacent allow-cut with Red 1.
 +
* After Red 13, it's now Blue to move. Blue has some reasonable-looking options in the hexes marked A or B. Which of these moves should Blue play, if any?
 +
** Blue's plan is to either play both moves marked A or both moves marked B, but ''not'' one of each. Why?
 +
** Ideally, if it worked, Blue would independently like to play A at the top (it's the more useful intrusion) and B at the bottom (it's better to defend a ladder than to let your opponent connect outright). But unfortunately for Blue, the top and bottom aren't independent. Blue can't do both, because if Blue plays A at the top (and Red defends the bridge at B, creating a capped flank), the ladder escapes at the bottom right corner are not strong enough for Blue to play B at the bottom; since Red will connect bottom-right regardless in this situation, Blue has to make the most of it by gaining some territory (at the bottom A) while letting Red connect, which Red was going to do regardless.
 +
** In essence, Red has created a question for Blue: do you want to play the A set or the B set? There are cases where each option is better, but importantly, Blue has the deciding power here &mdash; Red cannot meaningfully force Blue to "settle" the question without otherwise making a concession. This "dual threat" means Red has to plan for the ''worst'' of A and B when making moves in the region. ''[A concrete example here would be nice.]''
 +
** If Blue were to commit to one of the sets now, she would give up this dual threat for free. So, Blue should actually tenuki rather than playing either the A or B sets. (Indeed, KataHex thinks playing either set is an inaccuracy. In this particular example, Blue can also play at (*) instead of playing in a totally separate region.)
 +
** Taking a step back, Red played move 13 (the locally optimal move) knowing that Blue would get the deciding power. The lesson is ''not'' that giving your opponent the deciding power is a huge disadvantage (such that you should make lots of concessions to avoid doing so); rather, it's important to be aware when a question exists and realize that settling it prematurely could be a mistake.
  
==Acute corner theory==
+
There are a couple other 6-5 acute corner joseki worth discussing, as they both come up frequently in real games. They are cases where move order matters, and the correct move order allows a player to neutralize the opponent's deciding power. Here is the first example:
 +
<hexboard size="8x8" float="inline" edges="bottom right" coords="none" contents="R 1:d3 B 2:d5 R 3:e5 B 4:d6 R 5:e6 B 6:e4 E *:c5 +:f2 A:b7 B:c7" />
 +
<hexboard size="8x8" float="inline" edges="bottom right" coords="none" contents="R d3 B d5 R e5 B d6 R e6 B e4 R 7:f2 B 8:c7 R 9:f4 B 10:f3 R 11:g2 B 12:g3" />
 +
<hexboard size="8x8" float="inline" edges="bottom right" coords="none" contents="R d3 B d5 R e5 B d6 R e6 B e4 R 7:c5 B 8:b7 R 9:f2 B 10:f4 E a:c7 b:g3" />
 +
* In the first diagram, Red would like to play both (*) and (+). Both moves bridge efficiently from Red 1 while blocking Blue's stones.
 +
** However, Blue has two possible ways to extend her group at the bottom, by playing either A or B. This is a question for Blue.
 +
** Moving at (+) first would be a mistake because Blue has a strong minimaxing reply at B (see the second diagram). The best Red can do now is let Blue connect in the corner in exchange for territory at Red 11.
 +
** Instead, Red should play at (*) first. Blue could reasonably respond at B, but A is slightly better (see the third diagram). However, this leaves a bridge intrusion at (a), and Red now has the ladder escape that he needs for Red 9 to threaten to connect (via (b)). Blue 10 still connects in the corner, but the position here is more favorable for Red than in the second diagram.
  
Corner joseki on 19&times;19 can be quite involved. Here's a sampler for inspiration.
+
Here is the other joseki, where the question is more subtle (and less important):
 +
<hexboard size="7x6" float="inline" edges="bottom right" coords="none" contents="R 1:b2 B 2:b4 R 3:c4 B 4:b5 R 5:d5 B 6:c6 R 7:d6 E *:c3 +:c5" />
 +
<hexboard size="7x6" float="inline" edges="bottom right" coords="none" contents="R b2 B b4 R c4 B b5 R d5 B c6 R d6 B 8:c5 R 9:d4 B 10:c3 E A:d1 B:d2" />
 +
<hexboard size="7x6" float="inline" edges="bottom right" coords="none" contents="R b2 B b4 R c4 B b5 R d5 B c6 R d6 B 8:c3 R 9:d1 B 10:c5" />
 +
* In the first diagram, Blue would like to play both (*) and (+).
 +
** If Blue plays (+) first (see the second diagram), after Blue 10, Red now has the deciding power to play either A or B. The tradeoff is that A lets Blue connect outright in exchange for slightly more useful territory (since it's a bridge away from Red 1), while B holds Blue to a 2-4 parallel ladder.
 +
** Blue achieves a better outcome by playing (*) first (see the third diagram). Red must play A now, since if Red were to play B, then Blue would simply cut through and connect anyways. By playing in the correct move order, Blue practically strips Red of the deciding power between A and B. In some cases, this hardly matters and Red was going to play A regardless, but in general (*) is the safer move for Blue.
  
('''TODO''' elaborate, add diagrams)
+
Finally, [https://playhex.org/games/bc0bf856-fe69-4088-a11b-1a700089866a here] is a game where Blue used this concept to make sense of the board and prune out some bad moves.
 +
* The first relevant position is [https://hexworld.org/board/#14nc1,g12:sd11c12d5d12e11e12f11f12g11g12i11h11i9i10k9,j9k8j8k7j5j6g3e6h4b6f2e3c2f3g2g4h3e2g6d8f8i6i4:rb after Red 17]. Blue would ideally like to convert the 4-6-8-10-12 group into a third-row ladder escape by playing g13, creating a capped flank, but Red can respond with the minimaxing m8 which deprives Blue 2 (the swap stone) of its 3rd-row ladder escape. Red asks Blue the question: "Do you want the third-row escape on the left edge and the second-row escape on the right edge, or vice versa?"
 +
* As a further complication, [https://hexworld.org/board/#14nc1,g12:sd11c12d5d12e11e12f11f12g11g12i11h11i9i10k9j9k8j8k7j5j6,g3e6h4b6f2e3c2f3g2g4h3e2g6d8f8i6i4:rb after Red 23], Red asks Blue another question: "How do you eventually want to intrude in my 21-23 bridge? Do you want to play k6, which works well with Blue 22 and the swap stone to form a '6th row' ladder escape, or j7 to connect with your main group?" This question is not independent of the first one &mdash; if Blue gives up the third-row escape on the swap stone, then k6 no longer works well, and conversely, if Blue insists on keeping the third-row escape on the swap stone, then j7 makes Blue 22 a bit of a waste.
 +
* With these two questions top of mind, Blue decided to tenuki on move 24 (and later). KataHex thinks this was a good decision, and settling any of the questions prematurely would've been a blunder. Furthermore, Blue attempted to tenuki in such a way that the decision power of the two questions was preserved (with debatable success), while hoping Red would make it easy for Blue to decide how to answer the questions. (Despite the game ending in a win for Blue, that hope never really materialized.)
  
===5-4 acute corner===
+
==bullet hex strategy?==
  
* High intrusion is by far the most common: [https://hexworld.org/board/#19nc1,p15p16o16p14 here]
+
I have not thought about this much, but you can model bullet Hex (i.e., Hex with very fast time controls) as Hex where some fraction of your moves must be premoves. Practically speaking, what does this mean? You should occasionally play premove tricks (moves that give you a large advantage assuming your opponent premoves the "expected" move or otherwise doesn't react to your move), and you should play in a way that's resilient to premove tricks, even if the moves are suboptimal in regular Hex. The frequency of premove tricks should increase significantly as players get into time pressure.
  
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.
+
It would be interesting to study "bullet Hex strategy". Here's a starting example. Suppose you're Red and pushing the ladder below, but it's Blue's turn. Both players are under time pressure, and you have a split second to play a premove (or hover your mouse) if you wish. You ''expect'' Blue to continue pushing the ladder by playing at P. Where do you play?
  
* An extended version: [https://hexworld.org/board/#19nc1,p15p16o16p14q14o17n17 here]
+
<hexboard size="5x8"
 
+
===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"
 
   coords="hide"
 
   edges="bottom left"
 
   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"
+
   contents="R b3 c3 d3 B b4 c4 E *:e3 +:f2 -:g3 P:d4 Q:e4 Y:d5 Z:f4"
 
   />
 
   />
  
'''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]].
+
I think it depends:
 +
* Case 1: The rest of the board is settled, Red has a forced win (for example, a ladder escape), and he simply needs to carry out that win without running out of time.
 +
** Naively, Red just keeps pushing the ladder by premoving or hovering over (*). However, the risk here is that Blue can play a premove trick&mdash;she can yield by playing at Y instead of the expected P, and if Red premoves the push at (*) (or doesn't premove, but fails to react that Blue played an unexpected move and plays (*) nonetheless), then Blue plays at Z.
 +
** A better idea for Red is to ''premove'' at P. Then, if Blue plays "as expected" by pushing the ladder at P (instead of yielding), the premove doesn't go through and Red plays at (*). However, if Blue does yield at Y, Red's premove goes through and is a good move.
 +
* Case 2: There is play remaining elsewhere, so Red could conceivably let Blue connect in exchange for territory. Or, Red has a forced win but is behind on time, and the ladder is really long and he'll lose on time if he simply tries the strategy from Case 1.
 +
** Most of the time, Red can still play the "premove P, click (*)" strategy from Case 1. However, with a small probability, Red waits for Blue to play at P, then he plays at (+) instead, hoping Blue will premove her ''next'' move. This is a premove ''trick'', and unlike the strategy from Case 1, it's important that Red doesn't play it 100% of the time&mdash;he needs to play it as part of a mixed strategy. If Blue notices, the downside is that the ladder has just been pushed up one row. But if Blue premoves and pushes the ladder again at Q, then Red plays at (-) and immediately wins.
 +
** Blue might not like the fact that Red has this premove trick. One possible resource for her is to "premove (*), click Q" while defending the ladder; this probably works quite well in bullet.
  
<hexboard size="7x7"
+
==katahex/general strategy (draft material)==
  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.
+
Some miscellaneous topics &mdash; I've written rough drafts/outlines of a few but they aren't ready to be published. If you have KataHex, you might consider these "select topics" as an advanced study guide for large boards, to explore on your own.
 +
* Common mistake: playing two adjacent stones (of the same color), either in a vacuum or in certain inefficient configurations.
 +
** Closely related to "bad minimaxing". Chances are, if you want to play an adjacent stone and it's not (i) provably optimal, (ii) part of a joseki, or (iii) part of a forcing sequence, you're better off with a bridge move.
 +
* Isosceles triangle pattern - this appears in lots of different josekis. The basic pattern is Red 5/7/9 in https://hexworld.org/board/#19nc1,c2d16b17e17c15b18e14e18d12, where the base of the "isosceles triangle" is perpendicular to your opponent's edge.
 +
** As with all patterns, try to learn/intuit not only when it's efficient to play the pattern, but when it's inefficient to do so. (For instance, in a vacuum, it's inefficient to play two red stones perpendicular and close to the blue edge; you should play at a 30 degree angle instead. This pattern needs neighboring stones to be efficient.)
 +
* Tom's move is useful for connecting, but it leaves several weaknesses and intrusion points if you don't absolutely have to connect.
 +
** Useful starter position with a 2-4 parallel ladder for analysis: https://hexworld.org/board/#19nc1,e6e4d4e3c3d5c7d2f4f5e5g3f3g1f2f1e2e1d3c2b3b2g4h3g2h1
 +
** Obtuse corner opening joseki with a 2-4 parallel ladder: https://hexworld.org/board/#19c1,a19j5d15c17c14c15b17b18a18d14a16d13
 +
* Acute corner joseki continuations. Red 7 is an inaccuracy but this is a common joseki: https://hexworld.org/board/#19nc1,e6e4d4e3d3d5c7f2b7c5b10i2. Study the "continuation" moves Red 11 and Blue 12, and study similar moves in related joseki.
 +
** For example, gain intuition for why Red 13 is the best move in https://hexworld.org/board/#19nc1,d5d4c5c3b4b3e4f2c4d3g3:pb8 (a5/b5 are captured by Red; see [[Theorems_about_templates#The_shape_of_templates]]), why Red 17 is the best move in https://hexworld.org/board/#19nc1,e6e5d6d4c5c4f5g3d5e4h4i2b5b4j3:pc9, and why other moves are weak.
  
<hexboard size="7x7"
+
===a3 opening===
  coords="hide"
+
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.
  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:
+
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.
  
<hexboard size="7x19"
+
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:
  coords="hide"
+
* https://www.littlegolem.net/jsp/game/game.jsp?gid=2175191&nmove=4
  edges="bottom left right"
+
* https://www.littlegolem.net/jsp/game/game.jsp?gid=2033243&nmove=2
  contents="R d4 B 1:c5 R 2:d5 B 3:c6 R 4:p3 B 5:m5 R 6:q4"
+
* https://www.littlegolem.net/jsp/game/game.jsp?gid=2018841&nmove=8
  />
+
* https://www.littlegolem.net/jsp/game/game.jsp?gid=1950209&nmove=20
  
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.
+
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.
  
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.
+
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.
  
'''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 (*):
+
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"
+
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.
  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 (+):
+
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="8x7"
+
* d4: https://hexworld.org/board/#14c1,a3d4e4e3
  coords="hide"
+
** 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.
  edges="bottom left"
+
** 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).
  contents="R d5 B 1:e4 E *:d4 +:(c3 e2)"
+
*** 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,a3e5c5c4d4c6d6e6d5d7b8c7a7b6a6b5a5a4b4c2c3f3d2 Red peeps the bridge with 7. d6; Blue 8. e6 may be a stronger reply than connecting directly. While this variation represents strong play by both sides, and Red is doing just fine, Blue 20 and the sequence leading up to it is a good illustration of how Blue can play efficiently around Red's a3 stone.
 +
** 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
  
'''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:
+
==Notation for distances==
 
+
When analyzing patterns, it's useful to have a way to express various distances concisely. There are terms like adjacent, bridge, "classic block," but larger distances are hard to describe. Distances like "two hexes away" are ambiguous, does it mean a distance of 2 (like a1 and c1) or two hexes in between (like a1 and d1)? Everyone has their own way of thinking about it. Here's the one I use:
<hexboard size="7x7"
+
* Pretend that the hex grid consists of regular hexagons, and adjacent hexagons' centers have distance 1. (Equivalently, the centers of the hexes form a triangular lattice; pretend these triangles are equilateral with side length 1.)
 +
* It's not hard to show that a "bridge" (like a1 and b2) has length sqrt(3) if you connect the centers, and a "classic block" (like a1 and c2) has length sqrt(7). A fun exercise is to show that the distances between the centers of two hexes is always the square root of an integer. Which integers are possible as squared distances? Answer: [https://oeis.org/A003136 Löschian numbers.]
 +
* The fact that squared distances are integers is notationally convenient. Let Δn denote a ''squared'' distance of n (I like this because it looks nicer than a square root symbol, and a letter like "d" can be confused with a coordinate).
 +
* "Adjacent" is Δ1; "bridge" is Δ3; "classic block" is Δ7; the distance between a1 and c1 is Δ4; "two bridges away" is Δ12.
 +
* Are there collisions? [https://oeis.org/A118886 Yes,] but the first collision is Δ49 (a distance of 7), which is both the distance between a1 and h1, and between a1 and f4. This is large enough that for practical purposes, the notation is unique. (An interesting fact: the first number with a 4-way collision is, coincidentally, [https://oeis.org/A198775 1729] of [https://en.wikipedia.org/wiki/1729_(number)#As_a_Ramanujan_number Ramanujan fame.])
 +
* Here is a mapping of squared distances from the hex marked (*). Most of the time, you only need distances up to Δ16.
 +
: <hexboard size="5x9"  
 
   coords="hide"
 
   coords="hide"
   edges="bottom left"
+
   edges="hide"
   contents="R d4 B 1:e2 2:f3"
+
  visible="area(a1,e5,i1)"
 +
   contents="S a1
 +
            E *:a1 1:b1 3:b2 4:c1 7:c2 9:d1 12:c3 13:d2 16:e1 19:d3 21:e2 25:f1
 +
              27:d4 28:e3 31:f2 36:g1 37:e4 39:f3 43:g2 49:h1
 +
              48:e5 49:f4 52:g3 57:h2 64:i1"
 
   />
 
   />
  
Indeed, Red usually responds to the threat, and the following sequence is a common joseki on 13&times;13:
+
==Why I like the swap rule==
 
+
<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.
+
# The standard reason: It makes the game much more fair.
 +
# Every Hex player knows "Hex without swap is a first-player win." Add the swap rule, and you get another elegant result for free: "Hex with swap is a second-player win."
 +
# It provides much-needed asymmetry to the opening. The Hex board has two-fold rotational symmetry, and on odd-sized boards without swap, most players will open in the center. The symmetry isn't broken until the second turn!
 +
# The opening stone is especially influential in determining the character of the game. On 19x19, games that open with c2 look quite different from those that open with a10. A lot of cool tactics, like the a3 and a4 switchbacks, only really appear when you add the swap rule. The swap rule greatly expands the variety of plausible positions, and who doesn't like more variety?
 +
# While the second player has a theoretical advantage, the first player has a practical advantage: she can choose what opening to play. Because the opening stone is much more influential than later stones, the first player can pick an opening that she's especially familiar with, or one that her opponent is weak at. It would not be surprising if the first and second player's advantages cancel out among strong humans (on 19x19), and each player wins almost exactly 50% of games.
 +
# Since the swap rule is nonconstructive, it scales up beautifully to larger boards. Even if players have no idea which opening stones are fair, it's virtually certain that fair stones exist, and there should be no qualms about fairness. Contrast this with komi in Go: a fair komi has to be empirically determined for each board size, and there could be disagreements about the komi for various board sizes. (This concern is alleviated with auction komi, but that adds another rule to the game.)
 +
# It's resistant to partial solutions. Let's say that someone miraculously comes up with a constructive proof that the obtuse corner is winning on 19x19. No problem, players will just stop playing obtuse corner and play other opening moves instead.
 +
# It's fun to try to trick players into swapping a weak move or not swapping a deceptively strong move. :)
  
====c2====
+
==Insights and tidbits from KataHex (hzy's bot)==
  
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:
+
* Swap map for 19&times;19 generated with net 20220618, 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%).
  
<hexboard size="9x6"
+
: <hexboard size="19x19"
 
   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.
<hexboard size="6x6"
+
* 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.)
  coords="hide"
+
* 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).
  edges="bottom left"
+
  contents="R a6 1:d2 B 2:c4 E *:(b4 c1)"
+
  />
+
 
+
My subjective opinion is that this is the most beginner-friendly opening:
+
 
+
* 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.
+
 
+
* 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.
+
 
+
====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]]
+
RECURSIVE_SWAP[3]:
[[category: Advanced Strategy]]
+
* 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).

Latest revision as of 22:09, 14 December 2025

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.

PlayHex > Settings > Shading pattern > Custom > t = (2*row + 3*col) % 7; (t==0 ? 0 : (3^t % 7))/6

Hex scripts

draft of more strategy stuff

There's a fair amount of stuff for Strategic advice from KataHex that I've either been too lazy to write up / polish, or haven't thought of a good way to explain. I also haven't properly conveyed which things are important; some things come up rarely and should either be mentioned briefly or cut for the article. There's also a tradeoff in generality/specificity and concreteness/abstractness.

I need a lot more concrete examples, but it's hard to come by truly instructive examples (or know what people find useful)

  • terminology: inaccuracy < mistake < blunder
  • evals are noisy, taking the highest one in non-tactical situations can be biased
  • much later, talk about strength on an edge and how it behaves with existing stones

Local patterns

[prerequisites: cuts, maybe "pattern 1" and other patterns in that section — consider reordering]

It's a good idea to first study patterns in a vacuum, meaning in the absence of nearby stones. This provides a useful baseline when evaluating a move. A few points worth mentioning first:

  • We'll sometimes use quantitative language, such as "fractions" of a stone. That doesn't mean you need to memorize the numbers or do a bunch of math while playing Hex. Numbers are just less ambiguous than words.
  • Hex strategy is largely about making the right tradeoffs and avoiding blunders, not finding "the best move." Real games are messy. There's local/global considerations and the possibility of overlapping patterns or regions. For each pattern, try to learn not only the "optimal" move(s), but also roughly how bad the suboptimal moves are, so you can properly weigh moves that look strong in one dimension but weak in another.
  • You won't remember everything here, and this guide isn't exhaustive. Your goal is to build a parsimonious mental model of Hex: what good/bad Hex looks like, and why, so that your intuition generalizes well to new positions.
    • One mental model we'll use: you can quantify how much a position/pattern/move favors one side in terms of fractions of a stone. The basic idea is that passing is like giving up "1 stone" (and so it's worth 0 stones), the best move is worth 1 stone, a fair swap move is worth 0.5 stones, and moves can also be worth >0.5 or <0.5 stones. The same idea can be extended to patterns. The crux of the mental model is that empirically, the superposition principle approximately applies, especially when multiple patterns are sufficiently far apart and independent. That is, if Red made a 0.2-stone mistake somewhere and Blue made a 0.1-stone mistake elsewhere, in some sense, your best guess is that Blue is ahead by 0.1 stones.
      • This is a heuristic mental model — while I think it's very useful, it's not the ground truth. (Of course, every position is theoretically either winning or losing, but that's not a useful lens strategically.) In general, Hex is "nonlinear", and nearby patterns can absolutely interact. However, empirically it behaves well and is locally linear, which is usually what matters strategically. Of course, if you subscribe to this model, part of Hex strategy is also thinking about the nonlinearities.
      • For the mathematically inclined: to evaluate a move or pattern, we consider KataHex win rates in logistic Elo space, and then we apply linear interpolation of the candidate move compared to the "optimal" and pass moves. (Technically, many KataHex versions don't work well with pass moves, so instead, we estimate the value of the worst move on an empty board — it's pretty close to zero — and use that instead.) Logistic Elo is the correct space to use because it's proportional to log odds, and adding Elo numbers is like multiplying odds, which is the correct way to apply updates in a Bayesian sense.

Local patterns can occur in "open" areas (areas far away from corners/edges, whether in a vacuum or not) as well as near corners/edges. Let's start with open patterns.

  • The simplest open patterns are a single stone of your color, and a single stone of the opponent's color. They aren't as interesting as other patterns, but we'll discuss them for completeness.
    • Given a stone S of your own color in a vacuum, where should you play relative to it? Most choices, like playing a bridge or a "classic block" or much further away from S, are nearly equally good. One major exception is playing adjacent to S, which is a mistake (intuitively, it's wasteful to play too many of your own stones close together). Playing two adjacent steps or two bridge-moves away is an inaccuracy, because those moves are near and long bridge allow-cuts, respectively. [Author's note: Using Δ-notation makes this much cleaner, but I'm not sure whether to introduce it in the actual article. If we apply some averaging and heuristic "noise reduction" methods to KataHex evals, playing Δ1 from S is a roughly 0.35-stone mistake in a vacuum, playing Δ4 or Δ12 from S is a 0.1-stone mistake because of the allow-cuts, and everything else, like Δ3/Δ7/Δ9/Δ13/Δ16 or tenuki, is close to optimal.]
      • Caution: It's easy to draw incorrect conclusions from this if you're not careful. Keep in mind this is the strength of a stone relative to S without any nearby stones, not even the edges/corners (which can be thought of as virtual stones). This never happens on small boards, and must be balanced with many other factors on larger boards.
    • Given a stone S of the opponent's color in a vacuum, where should you play relative to it? Playing adjacent or a bridge away from S is a slight inaccuracy because your opponent can respond adjacent or a bridge away (respectively) from both stones, as we'll cover soon. All other moves are almost equally good. [Playing Δ1 from S is a 0.05-stone mistake, playing Δ3 away is a 0.1-stone mistake, and everything else is close to optimal.]
  • Let's move on to some important two-stone patterns. Consider a stone of your color and an adjacent opposing stone, like in the diagram below. Suppose it's Red's turn. Locally, how far from optimal is each marked Red response (a)–(g) (where some responses have the same letter due to symmetry)? How far from optimal is it to tenuki?
egcabdfgcabe
  • Red is already "ahead" by 0.05 stones because Blue played adjacent to Red (which was a 0.05-stone mistake). This is our baseline for evaluating Red's move.
  • Red's optimal local response is (a), preserving the 0.05-stone advantage. This is a very important local pattern! (It's also our first nonlinearity. While playing adjacent to your own stone in a vacuum is a mistake since you're overplaying that region — the second stone is partially redundant with the first — the presence of the opposing stone makes that no longer true. As we'll see later, an important topic is learning how opposing stones influence your own.)
  • Pop quiz: how much worse than (a) is each of the other marked moves (including tenuki), in fractions of a stone, assuming no other major nonlinearities? This is a tricky exercise, but if you understand the mental model well and know about cuts, you already know enough to make reasonable predictions. Analyzing real games often involves similar kinds of guessing.
  • Answers:
    • Tenuki: The simplest response to analyze. If Red tenukis instead of playing (a), then by symmetry Blue could play (a) herself! That flips a 0.05-stone advantage into a 0.05-stone disadvantage, implying that tenuki is a 0.1-stone mistake. Indeed, KataHex agrees when you check the evals. In a way, the strength of (a) is why Blue's earlier choice to play adjacent to the Red stone is locally slightly inaccurate. And because tenuki is suboptimal, the local pattern is slightly tactical; this contributes to Hex games feeling like lots of local fights rather than a "cold" game.
    • (b): This is an adjacent allow-cut. We haven't quantified these precisely, but you should expect (b) to be a blunder. KataHex says it's a 0.5-stone mistake, and Blue's best reply is cutting through at the adjacent (a).
    • (c): This is a mistake because Blue can respond at the non-adjacent (a), rendering (-) below relatively useless. KataHex quantifies (c) as a 0.4-stone mistake.
    • (d): Blue can respond at either (a) and create a pattern congruent to the one when Red plays (c), so this is also a 0.4-stone mistake.
    • (e): The start of a bottleneck, but more importantly, it's a near allow-cut. Applying our mental model: a near allow-cut is a 0.1-stone mistake, but given that Red didn't play (a), we should think of this on top of a tenuki baseline, which adds another 0.1 (total 0.2). KataHex actually says it's a 0.25-stone mistake. This kind of deviation is unsurprising and doesn't invalidate the mental model — our reasoning was a bit handwavy, Blue has alternatives to the near-cut, KataHex evals are inherently noisy, and we probably didn't account for all nonlinearities.
    • (f): This is a retroactive near allow-cut. Similar to (e), it's a 0.25-stone mistake.
    • (g): This and similar Red moves further away from the blue stone are harder to reason about. KataHex thinks these moves are generally 0.15- to 0.2-stone mistakes; working backwards, you could decompose that into a 0.1 tenuki baseline, and attribute the remaining portion to the "non-tactical" component of the move's strength. Also, it should be intuitive that the further away the Red move, the more it "looks like" tenuki, where the non-tactical component tends to zero in the limit. (Again: while this is handwavy, the general approach of "fuzzy reasoning" we used here — taking the heuristics you know to imply conclusions that aren't necessarily "correct" in some theoretical sense, but that are much better than blind guessing — is a powerful tool when thinking about real games.)
  • If you understand the above, you only have to memorize that (a) is the optimal reply, because you can reconstruct nearly all of the rest from first principles and fuzzy reasoning.
  • Let's consider the other important two-stone pattern, a stone of your color and an opposing stone a bridge away. Suppose it's Red's turn. We can do a similar exercise and evaluate (a)–(e) and tenuki.
abfdcecbgeda
  • Red is already ahead by 0.1 stones because Blue played a bridge away from Red.
  • Red's optimal local response is (a), preserving the 0.1-stone advantage. This is an important pattern, and we will say much more about it later. [Reminder to self: Talk about this pattern but extended, the bridge intrusion, the retroactive bridge allow-cut and its role in pruning relative to the bridge intrusion.]
  • Quiz: how much worse than (a) is each of the other marked moves (including tenuki)?
  • Answers:
    • Tenuki: By symmetry, if Red tenukis, Blue can play at (a), turning a 0.1-stone advantage into a 0.1-stone disadvantage, so tenuki is a 0.2-stone mistake. KataHex agrees, and just like in the adjacent case, this pattern is tactical.
    • (b): This is a near allow-cut, and after Blue responds at the adjacent (c), the resulting pattern is congruent to case (e) in the previous discussion of the adjacent 2-stone pattern (where KataHex said it was a 0.25-stone mistake). However, unlike the previous case, our baseline is higher: Red is ahead by 0.1 with the optimal response, not 0.05. It's worse (by 0.05) to start from a 0.05-stone higher baseline and reach the same result, so this is actually a 0.3-stone mistake.
    • (c): This is congruent to case (c) in the adjacent 2-stone pattern (which was a 0.4-stone mistake), but we're starting from a 0.05 higher baseline, so this is a 0.45-stone mistake.
    • (d) and (e): Most simply, these Red replies are weak because they're adjacent to Red's existing stone, and Blue's existing stone isn't sufficiently close enough to make the second red stone useful. KataHex says this is a 0.45-stone mistake.
    • (f): This is a long bridge allow-cut. According to our mental model, this should be 0.3-stone mistake — 0.2 from the tenuki baseline, and 0.1 from the allow-cut. KataHex agrees.
    • (g): This is a (short) bridge allow-cut. KataHex says it's roughly a 0.6-stone blunder.
  • ...


In these patterns, the shaded cells are expected to be empty.

  • Pattern 1 is strong for Red (and weak for Blue), because Red threatens to play at (*) to kill the blue stone at (-). Even if Red hasn't played (*), the pattern is still weak for Blue, because the effectiveness of (-) is hindered by the other blue stone.
    • This pattern frequently happens near the obtuse corner, as a result of bad minimaxing. In the first example below, Blue 3 is a common, but misguided, attempt at minimaxing. However, it's a mistake, and Red 4 (which creates the pattern) is the best reply. This position is weak for Blue even though Red does not plan to play (*) (as it is too close to his own edge) — Blue 3 hinders Blue 1, and the damage has already been done. In the second example, Blue 5 is a bad minimaxing move that creates the pattern, and Red 6 kills the blue stone.
    3412
    124635

Ladders

  • Ladders are tricky. Here's a first-order approximation — there are many exceptions, but this is still a useful baseline:
    • As the defender of the ladder, you have two main options: push, or let your opponent connect in exchange for territory. Look ahead to see whether pushing seems good for you.
      • Generally, yield if and only if pushing would allow your opponent to adjacent-cut through two of your stones (which happens if you have a stone above the ladder).
      • If the attacker fails to push, you should either bridge or play adjacently on the attacker's row to cut in front of the ladder. In other words, Blue should play at (*) or (+) below:
    • As the attacker of the ladder, your main options are to push or pivot. If you're close to an acute corner, you can either pivot, or if the corner is empty, play a cornering move.
      • Most of the time, pushing is good until you reach a corner.
      • If you have stones above the ladder, try to make use of them, mostly by jumping and pivoting early enough so that the stones aren't "wasted".

Advanced strategy: Leaving the question open

An important skill is learning when to tenuki. One class of examples is when you have a choice between two moves (or two sets of moves A and B), and playing one prevents you from playing the other one later. Your opponent is asking a question: do you want to play set A or set B? It can be advantageous to leave both possibilities open, so that if your opponent plays a move near the region, you can respond with the more advantageous reply of A and B. (The "dual" viewpoint: It can be a mistake to answer the question immediately — that gives your opponent a better idea of what to play in that region, both practically and theoretically. Answering it relieves your opponent of the obligation to play a move that counters both A and B.)

Here's an instructive example. Consider this 6-5 acute corner joseki (HexWorld link):

13AB112732985461110AB
  • There is a lot to unpack. First, some general commentary before we talk about the "question".
    • Blue 6 captures the two shaded hexes and should be an automatic reply to Red 5 for a strong player.
    • Blue 10 is not the only possible reply after Red 9. (*) is another strong option. (-) looks locally tempting (it lets Red connect in exchange for a 2nd-row ladder escape) but it's a mistake, because it's redundant with Blue 8 which already provides a 2nd-row ladder escape.
    • Red yields the soon-to-be ladder on move 13 to prevent an adjacent allow-cut with Red 1.
  • After Red 13, it's now Blue to move. Blue has some reasonable-looking options in the hexes marked A or B. Which of these moves should Blue play, if any?
    • Blue's plan is to either play both moves marked A or both moves marked B, but not one of each. Why?
    • Ideally, if it worked, Blue would independently like to play A at the top (it's the more useful intrusion) and B at the bottom (it's better to defend a ladder than to let your opponent connect outright). But unfortunately for Blue, the top and bottom aren't independent. Blue can't do both, because if Blue plays A at the top (and Red defends the bridge at B, creating a capped flank), the ladder escapes at the bottom right corner are not strong enough for Blue to play B at the bottom; since Red will connect bottom-right regardless in this situation, Blue has to make the most of it by gaining some territory (at the bottom A) while letting Red connect, which Red was going to do regardless.
    • In essence, Red has created a question for Blue: do you want to play the A set or the B set? There are cases where each option is better, but importantly, Blue has the deciding power here — Red cannot meaningfully force Blue to "settle" the question without otherwise making a concession. This "dual threat" means Red has to plan for the worst of A and B when making moves in the region. [A concrete example here would be nice.]
    • If Blue were to commit to one of the sets now, she would give up this dual threat for free. So, Blue should actually tenuki rather than playing either the A or B sets. (Indeed, KataHex thinks playing either set is an inaccuracy. In this particular example, Blue can also play at (*) instead of playing in a totally separate region.)
    • Taking a step back, Red played move 13 (the locally optimal move) knowing that Blue would get the deciding power. The lesson is not that giving your opponent the deciding power is a huge disadvantage (such that you should make lots of concessions to avoid doing so); rather, it's important to be aware when a question exists and realize that settling it prematurely could be a mistake.

There are a couple other 6-5 acute corner joseki worth discussing, as they both come up frequently in real games. They are cases where move order matters, and the correct move order allows a player to neutralize the opponent's deciding power. Here is the first example:

162345AB
711101298
9b1078a
  • In the first diagram, Red would like to play both (*) and (+). Both moves bridge efficiently from Red 1 while blocking Blue's stones.
    • However, Blue has two possible ways to extend her group at the bottom, by playing either A or B. This is a question for Blue.
    • Moving at (+) first would be a mistake because Blue has a strong minimaxing reply at B (see the second diagram). The best Red can do now is let Blue connect in the corner in exchange for territory at Red 11.
    • Instead, Red should play at (*) first. Blue could reasonably respond at B, but A is slightly better (see the third diagram). However, this leaves a bridge intrusion at (a), and Red now has the ladder escape that he needs for Red 9 to threaten to connect (via (b)). Blue 10 still connects in the corner, but the position here is more favorable for Red than in the second diagram.

Here is the other joseki, where the question is more subtle (and less important):

1234567
AB1098
9810
  • In the first diagram, Blue would like to play both (*) and (+).
    • If Blue plays (+) first (see the second diagram), after Blue 10, Red now has the deciding power to play either A or B. The tradeoff is that A lets Blue connect outright in exchange for slightly more useful territory (since it's a bridge away from Red 1), while B holds Blue to a 2-4 parallel ladder.
    • Blue achieves a better outcome by playing (*) first (see the third diagram). Red must play A now, since if Red were to play B, then Blue would simply cut through and connect anyways. By playing in the correct move order, Blue practically strips Red of the deciding power between A and B. In some cases, this hardly matters and Red was going to play A regardless, but in general (*) is the safer move for Blue.

Finally, here is a game where Blue used this concept to make sense of the board and prune out some bad moves.

  • The first relevant position is after Red 17. Blue would ideally like to convert the 4-6-8-10-12 group into a third-row ladder escape by playing g13, creating a capped flank, but Red can respond with the minimaxing m8 which deprives Blue 2 (the swap stone) of its 3rd-row ladder escape. Red asks Blue the question: "Do you want the third-row escape on the left edge and the second-row escape on the right edge, or vice versa?"
  • As a further complication, after Red 23, Red asks Blue another question: "How do you eventually want to intrude in my 21-23 bridge? Do you want to play k6, which works well with Blue 22 and the swap stone to form a '6th row' ladder escape, or j7 to connect with your main group?" This question is not independent of the first one — if Blue gives up the third-row escape on the swap stone, then k6 no longer works well, and conversely, if Blue insists on keeping the third-row escape on the swap stone, then j7 makes Blue 22 a bit of a waste.
  • With these two questions top of mind, Blue decided to tenuki on move 24 (and later). KataHex thinks this was a good decision, and settling any of the questions prematurely would've been a blunder. Furthermore, Blue attempted to tenuki in such a way that the decision power of the two questions was preserved (with debatable success), while hoping Red would make it easy for Blue to decide how to answer the questions. (Despite the game ending in a win for Blue, that hope never really materialized.)

bullet hex strategy?

I have not thought about this much, but you can model bullet Hex (i.e., Hex with very fast time controls) as Hex where some fraction of your moves must be premoves. Practically speaking, what does this mean? You should occasionally play premove tricks (moves that give you a large advantage assuming your opponent premoves the "expected" move or otherwise doesn't react to your move), and you should play in a way that's resilient to premove tricks, even if the moves are suboptimal in regular Hex. The frequency of premove tricks should increase significantly as players get into time pressure.

It would be interesting to study "bullet Hex strategy". Here's a starting example. Suppose you're Red and pushing the ladder below, but it's Blue's turn. Both players are under time pressure, and you have a split second to play a premove (or hover your mouse) if you wish. You expect Blue to continue pushing the ladder by playing at P. Where do you play?

PQZY

I think it depends:

  • Case 1: The rest of the board is settled, Red has a forced win (for example, a ladder escape), and he simply needs to carry out that win without running out of time.
    • Naively, Red just keeps pushing the ladder by premoving or hovering over (*). However, the risk here is that Blue can play a premove trick—she can yield by playing at Y instead of the expected P, and if Red premoves the push at (*) (or doesn't premove, but fails to react that Blue played an unexpected move and plays (*) nonetheless), then Blue plays at Z.
    • A better idea for Red is to premove at P. Then, if Blue plays "as expected" by pushing the ladder at P (instead of yielding), the premove doesn't go through and Red plays at (*). However, if Blue does yield at Y, Red's premove goes through and is a good move.
  • Case 2: There is play remaining elsewhere, so Red could conceivably let Blue connect in exchange for territory. Or, Red has a forced win but is behind on time, and the ladder is really long and he'll lose on time if he simply tries the strategy from Case 1.
    • Most of the time, Red can still play the "premove P, click (*)" strategy from Case 1. However, with a small probability, Red waits for Blue to play at P, then he plays at (+) instead, hoping Blue will premove her next move. This is a premove trick, and unlike the strategy from Case 1, it's important that Red doesn't play it 100% of the time—he needs to play it as part of a mixed strategy. If Blue notices, the downside is that the ladder has just been pushed up one row. But if Blue premoves and pushes the ladder again at Q, then Red plays at (-) and immediately wins.
    • Blue might not like the fact that Red has this premove trick. One possible resource for her is to "premove (*), click Q" while defending the ladder; this probably works quite well in bullet.

katahex/general strategy (draft material)

Some miscellaneous topics — I've written rough drafts/outlines of a few but they aren't ready to be published. If you have KataHex, you might consider these "select topics" as an advanced study guide for large boards, to explore on your own.

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.

Notation for distances

When analyzing patterns, it's useful to have a way to express various distances concisely. There are terms like adjacent, bridge, "classic block," but larger distances are hard to describe. Distances like "two hexes away" are ambiguous, does it mean a distance of 2 (like a1 and c1) or two hexes in between (like a1 and d1)? Everyone has their own way of thinking about it. Here's the one I use:

  • Pretend that the hex grid consists of regular hexagons, and adjacent hexagons' centers have distance 1. (Equivalently, the centers of the hexes form a triangular lattice; pretend these triangles are equilateral with side length 1.)
  • It's not hard to show that a "bridge" (like a1 and b2) has length sqrt(3) if you connect the centers, and a "classic block" (like a1 and c2) has length sqrt(7). A fun exercise is to show that the distances between the centers of two hexes is always the square root of an integer. Which integers are possible as squared distances? Answer: Löschian numbers.
  • The fact that squared distances are integers is notationally convenient. Let Δn denote a squared distance of n (I like this because it looks nicer than a square root symbol, and a letter like "d" can be confused with a coordinate).
  • "Adjacent" is Δ1; "bridge" is Δ3; "classic block" is Δ7; the distance between a1 and c1 is Δ4; "two bridges away" is Δ12.
  • Are there collisions? Yes, but the first collision is Δ49 (a distance of 7), which is both the distance between a1 and h1, and between a1 and f4. This is large enough that for practical purposes, the notation is unique. (An interesting fact: the first number with a 4-way collision is, coincidentally, 1729 of Ramanujan fame.)
  • Here is a mapping of squared distances from the hex marked (*). Most of the time, you only need distances up to Δ16.
1491625364964371321314357121928395227374948

Why I like the swap rule

  1. The standard reason: It makes the game much more fair.
  2. Every Hex player knows "Hex without swap is a first-player win." Add the swap rule, and you get another elegant result for free: "Hex with swap is a second-player win."
  3. It provides much-needed asymmetry to the opening. The Hex board has two-fold rotational symmetry, and on odd-sized boards without swap, most players will open in the center. The symmetry isn't broken until the second turn!
  4. The opening stone is especially influential in determining the character of the game. On 19x19, games that open with c2 look quite different from those that open with a10. A lot of cool tactics, like the a3 and a4 switchbacks, only really appear when you add the swap rule. The swap rule greatly expands the variety of plausible positions, and who doesn't like more variety?
  5. While the second player has a theoretical advantage, the first player has a practical advantage: she can choose what opening to play. Because the opening stone is much more influential than later stones, the first player can pick an opening that she's especially familiar with, or one that her opponent is weak at. It would not be surprising if the first and second player's advantages cancel out among strong humans (on 19x19), and each player wins almost exactly 50% of games.
  6. Since the swap rule is nonconstructive, it scales up beautifully to larger boards. Even if players have no idea which opening stones are fair, it's virtually certain that fair stones exist, and there should be no qualms about fairness. Contrast this with komi in Go: a fair komi has to be empirically determined for each board size, and there could be disagreements about the komi for various board sizes. (This concern is alleviated with auction komi, but that adds another rule to the game.)
  7. It's resistant to partial solutions. Let's say that someone miraculously comes up with a constructive proof that the obtuse corner is winning on 19x19. No problem, players will just stop playing obtuse corner and play other opening moves instead.
  8. It's fun to try to trick players into swapping a weak move or not swapping a deceptively strong move. :)

Insights and tidbits from KataHex (hzy's bot)

  • Swap map for 19×19 generated with net 20220618, 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%).
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).