A new update? It's true, so let's take a look at what's new.
Hello there, it's been a while since the last update. So let's look at what's new.
When you see an interactive board or a miniboard anywhere on Lishogi, the library responsible for displaying that board is called shogiground.
Let's look at the most visible changes.
Previously the board background was just an image. This had two main issues. First, when the board was scaled down some lines would become blurry and secondly square highlights weren't properly aligned with the background. Now squares and the background are each on their own separate layer.
This also made it possible to add another nice feature - Custom board themes.
In Board themes at the bottom you can see a new button - Custom theme, clicking that will allow you to set board background color, background image, grid color and grid line thickness and also hands background. Transparency and gifs are also supported. Default is transparent board, so when changing color make sure to move the transparency slider to see the new color. Here are some examples:
Some not that popular themes, that can be easily recreated with custom themes were removed.
Unfortunately for the image backgrounds there are some limitations - the url needs to start with https, and you either have to use chrome version 96 or higher, or the response has to include Cross-Origin-Resource-Policy: cross-origin. You can read more about this here - https://developer.chrome.com/blog/coep-credentialless-origin-trial/. In the future we might host the images ourselves to make sure it works on all browsers.
Hands (captured pieces)
Hands used to be completely separate from shogiground, but now hands are a part of shogiground, this makes some nice features possible.
- Pieces in hand behave the same as on the board when it comes to selecting, unselecting and moving the pieces, respecting the user's preferences.
- Previously when replaying a drop or dropping a piece by click-click (rather than dragging), the piece would just appear on the board. Now you can actually see the piece move from the hand to the board.
- Arrows and circles now also work on the hand - works the same way as it does on the board, you can have arrows from hand to board, from board to hand or from hand to hand. Previous behavior of selecting a piece in hand and drawing it on the board is preserved by middle clicking the piece in hand.
- Hands now also have the same background as the board.
Similarly to hands, promotions are now not handled separately, but directly by shogiground.
- Design change - promotions happen often in shogi, and the previous design was very distracting and the animation caused the pieces to be blurry. Therefore a simpler design was chosen.
- Animations are preserved when promoting and unpromoting.
- Promotion dialog doesn't appear when a piece has to be promoted (ex. pawn last rank).
- Support for square boards was dropped. Proper shogi board should have a ratio of 11:12. The change is small, so I hope it's easy to get used to. Supporting two board sizes proved to be difficult and probably also unnecessary since the difference is rather small.
- For phone users, when dragging a piece you can now see a circle indicating where the piece is going to be dropped, the piece is also placed a bit higher so you can see it over your finger. This can be disabled in preferences.
- Coordinates on the edge of the board, standard shogi boards have an edge between the inner board and the whole board table. The standard size of the edge is used relative to the size of the board.
For standard and handicap shogi positions we now use NNUE YaneuraOu wasm engine from https://github.com/mizar/YaneuraOu.wasm. YaneuraOu NNUE should be much stronger for shogi than Fairy Stockfish without NNUE.
Fairy Stockfish will still be used for minishogi, non-standard shogi positions or if your browser doesn't support NNUE YaneuraOu. You can easily see what engine is in use next to the evaluation value.
As you can see also some other new features from upstream were added. If you hover over a move a preview board will be displayed.
If your browser doesn't support YaneuraOu nor Fairy Stockfish you will still have access to cloud cached evaluation.
CtripleA rewritten and added tens of new levels to the previously rather bare learn section. Learn section now teaches also about captures, drops, piece protection, checks, escaping checks, mates, board setup, repetition and piece value.
Your previous progress in learn section was reset.
Under the hood Lishogi previously used a mix of SAN notation meant for chess, UCI notation meant for chess and USI notation meant for shogi. You can imagine that this caused a lot of issues.
But I had enough and decided to migrate everything to USI only. Besides making everything simpler, this had another benefit of reducing the average space it takes to store a game or a study node.
If you use any API endpoint that previously provided SAN or UCI notation, you will have to update your code to reflect this change. This also affects shoginet - distributed analysis for Lishogi, that requires an update (more on this below) and BOTs, if you used the code from https://github.com/TheYoBots/Lishogi-Bot, everything should work for now, because that code accepted both UCI and USI, but the move sent back to the server is in UCI notation. The server is going to accept that for now, but once chuushogi comes out UCI support is going to be dropped.
- It's now possible to play variants from custom positions (currently this affects only minishogi), therefore the lobby setup screen was tweaked a bit to reflect this change
- Editor now supports minishogi
- Hands in editor were redesigned, they now work as normal hands and adding/deleting pieces is done by clicking +/- above and below the piece.
- Shoginet was rewritten - now it supports both YaneuraOu and Fairy Stockfish, meaning minishogi analysis will now work. The cause for minishogi and 'from position' games against AI not working was not found, but hopefully it will be easier to discover now that everyone can generate moves for these games.
- Speech to text now respects the user's selected notation, if using Japanese notation and Japanese language reads in Japanese. All this assumes that your browser supports speech synthesis and has a necessary language speaker installed.
- Some sound themes were renamed, Piano theme was deleted.
- Green clock progress bar was removed - it caused pieces to be blurry.
- For Japanese notation '同' is now correctly added when destination is repeated, similarly destination is omitted in Kitao-Kawasaki notation.
- The value of missing pieces in handicap games is now added towards the uwate impasse total - only for games Lishogi recognizes as handicaps.
- ScalaShogi was rewritten and then moved to its own repository, you can also find it in maven repository.
- Miniboard hand design was tweaked.
- Last move/drop highlight and check highlight are now separated in preferences.
- Best move suggestion by engine in analysis now respects user's notation preference, you can also use this in study comments by typing [usi:7g7f] - replace 7g7f with your move.
- New piece sets - Engraved_cz thanks to ddeo604 and Intl_Portella thanks to CouchTomato.
- Some incorrect analysis were deleted and also some study analysis, you can request a new one.
- Move numbers in some studies were broken, this is fixed now. [edit: Studies from Gote POV are now shiften by 1, will be fixed]
- Lishogi gif generation now also uses 11:12 ratio.
- Moves in analysed games and moves with glyphs in studies are now colored.
- Too many bug fixes to list them all.
- Too many new bugs to list them all.
What's Next for Lishogi
There are few things I plan to work on, if you have a preference as to what you would like to see first, let me know in the comments.
- Fully automate puzzle generation from games, add several thousands of new puzzles and enable Puzzle Storm once we have enough puzzles
- More variants - next in line is chuushogi, other variants are easier to implement, therefore after chuushogi updates with new variants could be released more often
- Shared analysis board - issue
- Mobile app based on lichobile
- Non visual user interface
Of course smaller updates, quality of life improvements and bug fixes would be sprinkled in there.
And that's the gist of it, I tried to find as many bugs before release as possible, but I'm sure I missed as many bugs as I managed to find, so please if you find a bug or something you think is a bug or even someone finding a bug, please report it on github. This update has probably more code changes than the initial Lishogi release, there are gonna be bugs, lots of them, I will try my best to fix them quickly, but it might still take some time.
I want to thank everyone for their support and patience, Lishogi wouldn't be here without you! I know this update took longer than usual, but I took an approach of doing things properly rather than quickly this time to make things easier in the long term.
Thank you for supporting Lishogi.