OGS Joseki Dictionary update 2019-06-07

Hey all,

An update has been deployed on Beta.

Changes include:

  • Numeric labelling of variations
    • Variations take the next number, when added
  • Marking of the board with alpha labels (contrived example)
  • Support for “Pass” in sequences
  • Descriptive tags for outcome result of joseki
    • Filter by outcome result
    • Summation of continuations by outcome result
  • Phone layout somewhat improved
  • Throbbers all over the place.

Known issues:

  • The icon for the continuation summary pane is misplaced Ooo! @anoek deployed the fix as a typed this!
  • The summation pane entries are not in the “right” order (in fact, they are randomly placed at the moment) Fixed, for next release
  • “Reset” button hot area too close to backstep button Fixed, for next release
  • Back on empty board then place stone arrives at empty board, not “explore” Fixed, for next release
  • Pass + back doesn’t work properly Fixed, for next release
  • Back leaves old variation colour Fixed, for next release
  • Pass + Play mode doesn’t work properly Fixed, for next relese

Improvements for later:

  • Variation numbers should arrange themselves better when you change one
  • You should be able to filter for more than one tag at a time
  • Safari on a phone display gets messed up with continuations and description overlapping (shunuito)

As always, testing and feedback welcome.


The updates look greats so far!

Just to show what it looks like on mobile for me - safari

It seems fine when there isn’t extra text describing the position or sources etc.

It’s definitely much more functional though, I can play through things :slight_smile:. I’ll check out more of the updates on my laptop browser.

1 Like

Ah - right, thanks - I need to do more phone testing obviously :slight_smile:

But… hmmm… that position looks fine on my phone (Android, Chrome).

More hmmm … I can reproduce this problem under Safari on the desktop, at the phone aspect ratio.

Safari does not extend the display “downwards” with a scrollbar for some reason, instead it tries to jam everything onto the screen.


I think I’ve found a small bug. If you press the back button when the board is already empty, it allows you to place a stone and it still thinks the board is empty.

This can obviously be reset with the reset button. I just noticed this because sometimes I press the back button a couple of times instead of the reset button.

Edit: Related to the back button bug.

New feature!

If you want white to play the 4-4 and black to invade, just pass 3 times, then press back twice and then you can have white play first and still play out the joseki :slight_smile:

Edit 2: Actually it seems like a combination of multiple passes and the back button can really break things when there’s a pass in the sequence you can break things. Play the 4-4 point, pass 3 times and press the back button and you can use a white stone as part of black’s enclosure

or you can have a black stone “approaching” its own corner


Slightly related bug. If you’re at the empty board the 2-2 point is blue because it’s a questionable move at present.

If you play the 4-4 point it becomes a trick move, which it probably is.

However if you press the back button, it stays yellow until you hover over it with the mouse, and then it returns to being blue.

Edit: That’s me using chrome anyway. Also if you play 4-4 use the back button, hover over to make it blue again and play 4-4 again you can make the trick move be blue until hovered over once again.


Ooo - that one’s weird!

Maybe another potential bug:

I’ve noticed on my phone that sometimes the board resets when I thought I’ve pressed the back button to go back one move. This seemed fine because precision on a small touch screen is sketchy anyway.

Anyway testing this on chrome if if click like a pixel or two (I didn’t count the exact number of pixels) to the left of the back button it resets the whole board. Maybe its the hit boxes for the buttons? I’m wondering if other people can reproduce this?

Edit: It’s probably more like 5-10 pixels, but it’s way closer to the back button than the reset button anyway.


Yes, I see the reset button extends right to the very edge of the one step back button.

Nice catch.


In the Play mode, if you get a joseki sequence that has more than one move eg 4-4 3-3 invasion, then if you pass it tells you it’s not in the dictionary in the usual way “you made that up” but then unlike a usual on the board but out of the joseki tree moves, it just kind of breaks.

It lets you play one more move as if you are getting another try but then it lets you play a move for white even if the black move before it wasn’t in the tree.

Edit: Also I’ve noticed sometimes it (play mode) likes to play Q19 but I’m not sure where it gets that one from. It doesn’t look like it’s in the tree but the other ones are as far as I can tell.



Not sure if this one is intentional as a secret hint button… but

In Play mode if again you get a sequence with more than one move, (eg play 3-3 point to start since that has guaranteed more than 1 move sequences ) then you can get a hint or alternatively swap and play as white if you click the moves made blue link at the bottom.


Play mode needs a lot of TLC. Actually, it needs a lot of… development :smiley:

1 Like

True fact: TLC could never have worked in a hospital.

I’m chugging through your list, nearly done.

This one is… obviously?.. what happens when it tries to play a Pass, but Play mode doesn’t know about passes. How it gets from “pass” to Q19 I’m not sure, I guess I’m about to find out :slight_smile:

Yeah … “pa” is the encoding for Q19 in “GoMath”.

So that’s fixed (ready for deployment) now too :slight_smile:


Oh you’re right, Q19 was a pass, it does let you play the enclosure. That’s interesting :slight_smile:

Edit: Oh wait never mind you could play any move after it, but it still makes sense :slight_smile:

FWIW, passed the stress test:

It takes a few minutes to load the 100,000 positions.

They are in sequences that are about 15-20 moves long starting from the bottom left corner,

When they are in place, there is no perceptible change in the speed of looking up the next move.

Looking up the 20,000 continuations for 100,000 nodes takes a few seconds.

At 50,000 nodes, 10,000 continuations, the continuation lookup <2s.

(@smurph :wink: )


By the way, while working setting this up I got some first hand insight into just how many positions there are on a go board.

I wanted to create 100,000 positions in sequences up to 20 long, so I used this simple approach:

  • Make a sequence starting at A1 and going over to H1 then up to A19 (the top)
  • At each node visited, also start here with a similar sequence that goes to H then up to the top
    ** and another identical one from the node just above it.

So I started at A1 with a stone, and gave it a continuation at B1 and A2. And because I visited B1 in this sequence, I started a sequence at B1 with a first step at C1 and started another similar at B2. And because I visited C1 in this new sequence, I started a new sequence there in the same fashion …etc.

Basically strings going right to H then up to 19.

I wrote the code to keep doing this until I’d placed 100,000 stones, or got to the top as a starting point.

I was worried that I might not actually get 100,000 stones down using this approach.

How far do you think it actually went?

When I saw it I thought “man, there are a lot of sequences on the go board!”

Which I knew, but now I really know.

Even if we only count the A1 starting point, the tree would include something in the order of 2^18 ~ 250k steps right?
(There would be some duplicate positions, but via different paths)

So I guess it’s something like 2^18 + 3x2^17 + 5x2^18…
In the order of 19x2^18 ~ 5million?

Well, for a string of length N (without duplicate elements), there are N! unique ways to arrange it. If you wanted to create a sequence of 20 moves, using the same 20 coordinates, there are ~2.4*10^18 unique ways to arrange them in sequence.

I’m not entirely sure I understand what exactly Eugene did so… yea, can’t give you an estimate there.

Just some contradictory statements. You can

  • always create a variation with 3 total moves for all horizontal A-H and vertical 1:19
    – this will result in leaves (i.e. not-a-branch) in column J and leaves in the fictitious 20th row
  • always create a variation with 3 total moves for horizontal A-G and vertical 1:18
    – this will result in 2 total moves for the entire H column up to the 18th row
  • always create 20-move variations only going up or right starting from A1

Also, I have no idea what

** and another identical one from the node just above it.

is supposed to mean.

Now I did try something based on my assumptions, and the number I get is way bigger than Razza’s. :stuck_out_tongue:

I took it as “starting at a1 and moving either right or up until you reach one of the edges of the board”, then doing that for each starting point.
First starting point is a1, with tree depth 18, then you have the 3 starting points around it, with depth 17, then the next 5 starting points etc.
Actually now I realise the number of new starting points isn’t 1,3,5,7… It might even be 1,2,3,4… actually

A1 is the only starting point we need if we go depth first to up to 20 moves.