Josekle Development

The five I mentioned are those with 27 moves and more.

2 Likes

interesting, itā€™s working for me in Firefox on Mac.
I looked into emoji detection earlier, will push a change to swaps them out for something else.

Same as me (just my first try was different).

This last one displays well

If useful:

Firefox 96.0.3
MacOS 10.13.6

Yeah, maybe thatā€™s not a good idea. Browser incompatibility can be tough sometimes.

I donā€™t think Kogoā€™s dictionary is good enough. Itā€™s lacking basic modern joseki sequences and has rotation issues too (which would be not too hard to fix, but still).

3 Likes

Iā€™ve pushed a change which will try to detect emoji support and fall back in case of lack. The copy and paste for share is still emojis since pasting them (here or other places with ā€œsmartā€ emoji support like Discord) should still work

edit: also pushed a change to integrate the share button, and copy and paste is in the Discourse format for spoilers, since folks are using it anyway

1 Like

thatā€™s good to know. it might still be useful as part of the collection of josekisā€¦ are there other freely available easily accessible collections somewhere?

I didnā€™t see OJE in the OGS API docs, not sure if itā€™s easy to get data out of there.

2 Likes

I donā€™t know any (but I did also not know about Kogoā€™s) and senseiā€™s library only mentions Kogoā€™s.

@GreenAsJade, would you mind giving us some hints about how it would be possible to get some data from OJE? We need a dictionary of josekis to limit the possible inputs. Otherwise players can just put stones everywhere to find out which places are part of the joseki.

3 Likes

The OJE provides these statistics starting from the root node.

image

Apparently there are 17200 positions within the tree, but only 925 paths are marked as joseki.

3 Likes

Are you wanting to ask OJE on the fly for a joseki path?

Or are you planning to scrape all the joseki out and store them?

For the former, Iā€™d have to add an API (can be done).

For the latter, you can copy what OJE client does.

  • Ask OJE for the tags
  • Ask OJE for the root node
  • Ask OJE for each next-node filtered by Joseki tag, till you get to one marked Joseki.
  • If there are still next-nodes filtered by Joseki tag, keep going on that path.

I still kinda wish this was getting built into the OJE client :pensive: What a good feature for OGS to haveā€¦

2 Likes

I think loading that 17200 positions at once could be feasible. And then the game could be played offline. Loading on the fly would be possible too.

Well, it wouldnā€™t have to be part of the OJE to be part of OGS, but it would fit there thematically.
Is all the back end code for the OJE on GitHub godojo-server?

No, the API of that implementation is basically correct, but the recent ā€œupgradeā€ pulled the back-end in under OGS backend.

(The background is that the godojo-server was done as a learn-Java project for me, and an experiment with Neo4j. The conclusion of the experiment was that ā€œthis sucks for data that is basically a treeā€ and also that ā€œthis would be a lot easier for anoek to maintain if it were in compatible technology, and would also go fasterā€. Henceā€¦ rewrite-upgrade).

Okay, I see, thanks for the explanation.

Speaking only for myself, I donā€™t think anything we have done this week precludes this eventually being part of OJE. The amount of code involved has been fairly small thanks to yebellzā€™ Besogo and his knowledge of the code base. I saw this prototype as a chance to see if the puzzle was fun at all

4 Likes

I try to avoid them by having front end and back end at the same origin. :smile:

Thatā€™s possible, did you try requesting stuff from other origins?

2 Likes

not sure I understand, requesting from Github pages app to another API not OGS? isnā€™t the CORS settings on the backend so itā€™s specific to OGS?

I think there are cors settings for client (when creating the request) and back end (when handling the request).

1 Like

Ok after reading some more about CORS, Iā€™m pretty sure that OJE API does not support cross origin requests. After a couple of false starts, this is the error I get:

Cross-Origin Request Blocked:
The Same Origin Policy disallows reading the remote resource at https://online-go.com/godojo/positions?id=root&mode=0.
(Reason: CORS header ā€˜Access-Control-Allow-Originā€™ missing). Status code: 403.

I think the OGS backend would need to add a header.

So in the meantime Iā€™m looking into adding something scrappy to just check Kogoā€™s SGF into the Besogo prototype for now

1 Like