I have set up a web page for reviewing and analyzing Hex games played on LG. It lets you play variations and maintains a tree like jhex does. It's roughly the same code I presented a demo of a while back, but this time with the ability to grab games by number from LG.
Yes maybe saving it in a cookie or something? This way it would remain purely client-side. I've asked Richard to change the link from trmph to your page because as it is now it's already better than trmph!
Thanks to all for the kind words, and thanks very much to Richard for setting up the link. I'll let you know when I have more features ready (e.g., saving analysis).
The next version will support load/store and a few other additional features. I'm still working on it and I'll release it as soon as it's ready and tested.
Yes I plan to support Havannah at some point but other improvements will come first.
@Tom, your tool is awesome and it's so awesome that I'm worried it will solve 13x13 for good when we start sharing all the analysis... I don't know if it's good or a bad thing, but I'm getting sentimental :)
Building on Arek's comment, ambitious feature request: ability to use it with engines, i.e. to send moves to an external, offline bot software and receive moves for display, along with comments. If you provide a suitable interface, we may get easily-usable superhuman bots more quickly. Which would be stupendous.
While that would be a nice feature for a hex viewer, I don't believe it should be integrated into the "official" linked analysis viewer. LG having the analysis link right by the game implies that it's ok to use that software when selecting your move. We wouldn't want to imply that it's acceptable to use computer analysis in deciding your move.
Load/store will be available within a week. I wanted to deliver it sooner but I ended up reworking the code a bit in getting it to support transposition, and in providing a means to merge trees.
A new version is available, accessible from the links on Hex games here on LG (thanks again, Richard!) or directly at https://minortriad.com/ahex.html
Today's release has bug fixes, it handles transposition, and it reads/writes files. For details, please read the documentation available via the help button in the drop-down menu.
Thanks to everyone. I appreciate all the feedback I've gotten. I plan to add more features with time, including support for more board sizes. If a suggestion you made isn't in this release, be assured that I do still have it in mind. I'm trying to make the most urgent changes first.
I'm happy to answer questions. If bugs show up, I definitely want to fix them. Please let me know if you see any problems.
Bill, I don't know of a way to replace files on write. A JavaScript program running in a browser doesn't have direct access to the computer's file system. The only way I know of for the program to write a file is to pass it to the browser as a download and at that point it's out of my hands. Browsers typically don't overwrite files but instead save with a version number appended to the filename and I don't know of a way to change that behavior.
If any JavaScript programmers here are aware of another option, please let me know.
A new version is available with Havannah support and a few new features.
Bill LeBoeuf asked if overwrite was possible on saving files. I still don't know of a way to do that when writing to your computer's filesystem but I can offer the next best thing: the option of writing to browser local storage. See the help file for details, but briefly: local storage is browser-specific (it can't be shared across several computers or browsers) but it makes saving graphs simpler (with overwrite).
I also added bookmarks. When a graph has lots of branches it can be tedious to navigate to the line(s) where the latest action is. Now you can mark one or more positions and return to them. The --> and -->br buttons are no longer grayed out when there are multiple ways forward and they choose a branch that leads to a marked position if there is one. The help file has full details.
If you're not seeing the new version, hold shift down while clicking reload. Some browsers don't download the file on a plain reload.
Large boards take up a lot of space on a screen. I plan to support multiple cell sizes but that's not ready yet. Until then, use browser zoom as needed.
I'm happy to answer questions. If there are bugs, I definitely want to fix them. Please let me know if you see any problems.
Thanks to Richard Malaschitz for maintaining LG and thanks to everyone playing here.
How do your engine know the game (Hex or Havannah) from the id? As far as I know, the game is not indicated in the SGFs found in LG.
As regards saving files, wouldn't it be adequate to have a button display a text version of the game tree and leave to the user the task of saving it as a file? Then the text obtained that way could be later pasted on your page and parsed to recreate the game it represents; if it goes as GET variable in the url of the resulting page, the game could even be shared with others.
eobllor: It recognizes Havannah games by whether there are digits in the moves. LG formats Havannah moves as A1, B14, ... and Hex moves as aa, bn, ... .
I'm not seeing what advantage cut/paste would have over the existing ability to read/write files. It's easier to make errors cutting and pasting.
Christian K: I hope trmph comes back at some point. For now, I'm not planning to add more games. Adding Havannah wasn't hard because of how much it has in common with Hex.
I have a suggestion for a little improvement: it would be nice, when opening a board via the LG link, that it automatically marks the last move too. After all, that is the starting point of the analysis, and one should be able to quickly go back to it.
In any case, I think that this really is a great tool.
I installed a new release today. It offers two zoom levels (selectable in the drop-down menu) and supports all Hex board sizes from 10×10 through 19×19. Please let me know if you encounter any problems.
Enjoying the tool! It would be great if when you open the game from its LG page, and start exploring a line of play, the current position were marked as such so that when you click "<- br" it takes you back to the current move (as one tends to hope/expect) rather than the beginning of the game.
I also would prefer that the LG link to minortriad open in a new tab in the browser, though I guess this is up to Richard.
New features: automatic marking of current position in games imported from LG (suggested by gi0cam) and winning position detection. As always, please let me know if you have questions, bug reports, ... .
Yes, correct win detection in both Hex and Havannah. Havannah wins are annotated with a description at the top on the window (Y, bridge, or ring). If anyone encounters a problem with win detection (false negative, false positive, win type improperly annotated, ...) please save the game tree to a file, send it to me, and I'll fix my code.
Because ladders are tedious to add by hand, version 2.3 has automatic ladder continuation in Hex games. Each right mouse button click (with the cursor anywhere in the board area) adds a move to a ladder. The two previous moves must be adjacent (and unambiguous, i.e. no transposition). The code to recognize ladders might not always do what you want; if not, click delete to remove the stone it played, play one more stone in the ladder and click the right button again to give the program another chance to recognize the ladder you had in mind.
Version 2.3 shows a clickable list of moves in a box to the right of the board. The move played to reach the currently-displayed position is marked with a lozenge symbol (⧫). Move numbers for bookmarked positions are displayed in red.
When there's only one line of play (no branches), it's unambiguous which list of moves to display. When there are branches in the game's graph, a line of play after the currently-displayed position that leads to a bookmarked position is preferred over one that doesn't; otherwise, it chooses the branch leading to the most recently viewed position. This is consistent with how the program chooses one of multiple branches forward when you click the —> or —>br button.
As always, please feel free to contact me with bug reports, suggestions, etc.