Comments by HGMuller
So, I'm thinking that having varying alpha values is available only in true color images, and that provides a reason for keeping these as true color images.
I am not really into these graphics formats, but I can imagine that the palette for historic reasons contains only up to 256 24-bit colors (i.e. RGB without alpha). I guess that with an alpha channel the number of different RGBA combinations in a typical image becomes so large that 256 would almost never be enough, so that no one bothered to define a standard for palette with alpha channel.
I have now done that too. But betzaNewer.js is experimental, and sooner or later will replace betzaNew.js and disappear itself (because it is fully compatible).
It's trying to get caib[qN] to work that would be the challenge.
Well, now that generalized burning is been written with the aid of legs behind a semicolon, another punctuation (say comma), could be used for generalized rifle capture. Burning and rifle capture are related: there is a set of captures, burning automatically does all of those that are possible, rifle capture has to select one of those. Pure rifle capture is a null move followed by the capture option. Suppose O without range would mean null move, then [O,cqN] would be a rifle-capturing Rose. There still is the issue of whether the rifle part can be optional. I would say no, as the entire moves in a Betza description are already optional. So by making it mandatory to do at least one of the rifle captures, you can still allow the move without capture by specifying it separately. Like for Odin's Forest Ox: N[N,cK].
And while hexagonal boards may be in scope for the ID, I imagine 3D and hyperbolic boards are far from it ;)
Representation of 3D and 4D 'boards' is mostly problematic for the human player. One often resorts to displaying 2D slices of the board next to each other, which basically maps it to a larger 2D board. Chess programs in fact use the very same technique to map 2D boards to their 1D memory, storing them row by row. In all these cases separators between the slices would be needed to prevent 'wrapping' from one slice to the other. Usually this is done by separating the slices by enough inaccessible cells of the 2D representation that the leaper with the longest range cannot jump over it.
E.g. for a 5x5x5 variant with range-2 leapers ('Knights') you would map it to a 33x5 (or 5x33) board, with five 5x5 playing areas separated by four 2x5 'guard bands'. On this board an orthogonal step perpendicular to the slices would be a (7,0) leap, and is representable in XBetza as WXX. So the Raumschach Rook would be RWXX4, a Raumschach Bishop BHX4DXX4FXX4.
I tried something similar, and it does work as expected using betzaNew.js. But not with betza.js. Which does surprise me, as I had not expected it to be different in this respect, so I will look into that.
And make sure to set maxPromote=0 to disable the normal promotion by zone rather than by morph.
[Edit] It appears that multiple promotion sets were never implemented in betza.js.
The promotion zone the article mentions makes no sense to me: Pawns can be moved such that they never could reach the zone. It would make more sense to have white Pawns promote where the black (non-Pawn) pieces start. So the far end of level D and E, not of A and B.
'In chess analysis, computer tools like Stockfish, Komodo, and AlphaZero help us know the importance of each chess piece during the game. They use calculations to assign a value to each piece based on factors like mobility, king safety, and board position...'(12 Sep 2023, Tato Shervashidze, Chess Coach...)
It is not only false, but it sounds like total nonsense to me. For one, AlphaZero is not comparable in any respect to Komodo or Stockfish; everything is different, and naming them in one breath already exposes the one who says this as completely ignorant on the subject of computer chess. (Which of course doesn't exclude he is a good Chess coach or has a high rating.)
In the past few years there has been a revolution in chess programming, after it had been converging to a method thought to be optimal for several decades. Initially programs were scoring positions at the leaves of a look-ahead search tree by a static (= not playing out any moves) heuristic that is now called a Hand-Crafted Evaluation. Piece values were a major part of that, often interpolated between 'opening' and 'end-game' values depending on the strength of the material still on board. The positional terms were Piece-Square Tables (accounting for mild general position dependence of piece values, without taking note of the location of other pieces, such as that Knights are poor at edges, and even poorer in corners), mobility (the actual number of moves a piece has in the current position), King safety (the number of squares around the King attacked by opponent pieces, and the value and number of these pieces), Pawn structure (passer advance, isolated / backward and doubled Pawns)
These parameters were never calculated (for orthodox Chess engines), but often were tuned. This was done by taking a large data set (like 500,000) of quiet positions from games with known result, and then tweeking all the bonuses and penalties (including piece values) that were used in the HCE until the calcuated evaluation score correlated best with the game result.
Than came AlphaZero out of nowhere, with everything completely different. It used a neural network for evaluation of positions as well as for guiding the search. This network simulates a brain with millions of cells, in some 40 layers, with tens of millions of connections between them. And they tuned the strength of those connections by having the thing play chess against itself. No one knows what each connection represents, but the result is that it eventually it could very accurately predict the winning probability for a position, apparently paying attention even to subtle strategic condiderations.
After that a hybrid form was invented: NNUE (for Easily Updatable Neural Network; no idea why they spelled it backwards...). This uses a conventional (unguided by any NN) search to calculate ahead, but at the end of each line evaluates by a NN of a peculiar design. It does not use explicit piece values, but calculates something very similar to Piece-Square Tables (which can be seen as a sort of piece values specified by location of the piece, and can simulate a plain piece value by specifying that same value on every square). Except that it does have such a PST for each location of the King. So the value of a piece cannot be dependent only on its absolute location, but also on how it is positioned relative to the King. (Well, this was invented for Shogi, and there proximity to the King is often more important than the intinsic strength of the piece type...). And it doesn't have one such a 64x64 table for each piece type, but 256 of them. And all these 256 values of each piece (on its current location, for the current King location) are than fed into a NN of 5 layers with 32 cells per layer, to combine them, until finally a single number appears at the output. This NN is then trained by tuning all the 256x64x64x6 values in the KPST, and the strength of the 4000 connections in the NN to reproduce the win probability of a huge data set of quiet positions, as good as it can.
This works, but after this no one knows what exactly the NN does. None of the values in the KPST in the optimally trained NN have the slightest resemblance to piece values as we know them. We cannot identify a King-Safety part, or a Pawn-Structure part, or a mobility part. It is just one totally integrated complete mess of totally meaningless multiplier parameters, that magically manage to conspire to give a very accurate prediction for who has the better winning chances in a given position. Stockfish and other strong engines now all use NNUE evaluation, (because they typically gain ~80 Elo compared to their original HCE), and the main development towards higher Elo comes from finding better sets for training it, or playing a little bit with the size of the NN. (Large NN can predict more accurately, but slow doen the engine, so that it cannot look as far ahead.)
I don't keep close tabs on the development of Stockfish. But there are always many forks around, and sooner or later the best of each will be adopted into the official main branch. 2020 as the start of the NNUE mania sounds about right. And there might be hybrid versions around, which still relied in part on hand-crafted terms, added to the NN output to get the total score. I would expect this to have some advantages for terms like Pawn structure; it will be hard for a NN to extract Pawn-Structure info from King-Piece-Square tables. But it seems the latest Stockfish relies entirely on the NN.
It would be funny to test it on positions that it has certainly not seen in its training set, like 3Q vs 7N. It might be at a total loss for what to do. (Not thet the HCE did such a good job on that...)
The Alfils are placed such that two of the same color are bound to the same 8 squares. With as a consequence that half the squares cannot be reached by any Alfil of this color. And what is worse, these are the squares where all Alfils of the opponent are bound to. Two Alfils can never capture each other!
That seems pretty bad to me, and could make the game very drawish. By withdrawing the King to a square where no opponent Alfils can get the defender has an advantage of two Alfils, and the attacker only has 1 Dabbaba, 1 Ferz and 1 Wazir that could attack it (which the Defender also has). Trade an Alfil for the attacking Wazir, and then move to a square of another 'meta color' where you have two Alfils, and the attacker doesn't even have the Wazir anymore.
It would be better to swap the Dabbabas with the Alfils in the c- and f-files. Then each square can be reached by a single Alfil of either color.
Could you add the missing bnespearman to alfaeriePNG?
OK, done.
I don't think there is any need to show a separate image of an empty board. It is easy enough to recognize the board in the image where it has pieces on it.
The remark that "the black queen swaps places with the black king" is confusing rather than illuminating, because one could think this is an allowed move in the game. Presumably it intends to say that the initial setup is rotation symmetric rather than reflection symmetric, but the formulation doesn't make sense, because this is not an 8x8 board, there is no more commonly used start position on this board that has the black Queen and King in swapped locations, and to get from 8x8 FIDE to the given position you have to do a whole lot more than swap black King and Queen.
What does it mean that "a King cannot be checkmated"? A player is only allowed to deliver check when the opponent is left with at least one move that resolves this check? (A rule somewhat similar to the Shogi rule that you cannot checkmate by dropping a Pawn. It could also be formulated by saying checkmate is a win for the checkmated player.) [Edit] OK, I see that you answered that below. But it should be clarified in the article, not in the Comments.
'Columns' of a chess board are usually called 'files'. It would be clearer to write an explicit "(i-file for white, h-file for black)" rather than saying "(from each player's perspective)". And similar for 8th and 9th rank.
What if a normal Pawn ends up outside the central 8x8 area? Would it also promote on 12th or 5th rank, would it promote on 16th/1st rank, or can it no longer promote at all?
This is the case also in the original shatranj.
Indeed. But in original Shatranj you don't have both your Alfils on the same color, and not so many pieces are Alfils.
The piece colors don't look very aquatic to me; polution of the oceans isn't that bad yet... I would more expect something like #C0E0FF and #40D09C.
With pieces that capture as locusts it will be very difficult to checkmate a bare King, and consequently, the game will be very drawish. If my King can reach a corner (and I don't see how you could prevent me from doing that already in the opening) it has become impossible for you to win. None of the pieces can attack the corner, so my King is absolutely safe there. I can abandon all my other pieces, and it would still be draw. You can attack all squares around it, but that would stalemate me if I am in the corner, and just make me step back into the corner otherwise. (Compare the KBPK end-game with Rook Pawn and wrong Bishop.)
Variants with pieces that capture like this usually have an extra rim around the board where you are able to land after such a capture, but cannot otherwise move to (e.g. Roccoco). Of course you could declare stalemate a win. That would solve the safe-corner problem, so that you might be able to force stalemate with two Tritons. Note that Prawns, Seahorses and Nereids can never attack any edge square.
You could also make pieces check the same way as they move without capture, rather than as they capture. But that would make all checkmating of a bare King just normal Chess, which probably is less fun.
You don't have to attack your own King for forcing checkmate with a Rook, do you?
It is not completely clear what "being in check by your own pieces" means. In FIDE rules the checking rule is formulated as that you cannot expose your King to (pseudo-legal) capture. But my own move would never do that for my own pieces, as after that it is not my turn to move anymore. And it is conceivable that the opponent is forced to resolve the self-check before it becomes your turn again, or that this turn will never come. E.g.
When white plays Qe2 here black is checkmated, and if that terminates the game there is no danger that the white King would be captured by its own Queen. Also, if black is on move here, can he play Ke2, because the Queen is not allowed to capture him, as this would also attack her own King? In FIDE rules capturing a King trumps the checking rule, and is allowed by any pseudo-legal move. But in Atomic Chess the rule that you cannot blow up your own King trumps capturing/blowing up the enemy King, and Ke2 would indeed be allowed in the given position.
So it is important to specify the priority of the rules, in particular what would happen in a position where you can both capture your own King and the enemy King. The opponent could put you in a discovered check from your own piece. Can he do that while exposing his own King to capture elsewhere, because you must save your own King from self-capture first? Would you already have lost, because you must capture your own King even when you can also capture the opponent's?
'Japanese Rook' here means 'Lance'? Better say 'Shogi Lance' then, as people that do not know Shogi would certainly have no clue what 'Japanese Rook' means. Or better yet, say 'forward Rook', so that everyone knows what it means.
I wonder about the balance. Zebra is significantly weaker than Knight on 8x8, but that is because it is so clumsy, and gets easily trapped because most of its move fall off-board. But as a compound with stepping moves I am not so sure. The steps restore good manouevrability, and the Zebra moves can be very dangerous because of their long reach, which allows them to attack behind Pawns without getting in their reach. The Charging Knight (fhNbsWbF) is significantly stronger than a Knight, and the Charging Zebra might be similar or even better.
I cannot even imagine how it could happen in principle. You can only be stalemated if it is your turn.
I don't see the use of having separate tables for the pieces of the north and south player. These are almost completely the same. And I doubt that one of the differences would be correct: Although it is Japanes custom to have one of the players use 玉将 (Jade General) for royal piece, (not necessarily the north player, btw), Google translate doesn't know any translation for 玉妃. The few differences can easily be mentioned in an extra column, or even both in the same table cell.
And they still don't supply the most important information: which name belongs to which image. You are not showing kanji pieces here, so the Japanese name gives no indication which piece is which.
There doesn't seem any need to list different abbreviations for the two players; in western Shogi notation (PSN) one uses capitals for both players.
You also give no description of the moves. Although many articles here write "pieces ... move as in orthodox Chess", I don't think that we can assume every reader here knows Shogi.
The article is very repetitive anyway; you mention in two places that the difference is the addition of the Princess, even before you start a section "differences with Shogi". Much of that is redundant.
In a preliminary test with Fairy-Max (using the piece values of the Nutty Knights army) the Zen Zebras lost 61.5-38.5 from FIDE. While most of the armies beat FIDE by such an amount. I am now running some matches with 2-for-2 substitutions of the individual piece types, to see which piece is the weakling.
I would suspect an unsupported or incorrectly implemented html feature in the browser, rather than a javascript error. If I include buggy javascript on a page the page displays as it was loaded (i.e. as you would expect from the Page Source), but the scrpt just stops working (no longer modifying the page) at the point of the bug (or did not do anything at all, if it contained a syntax error), and the page won't react to mouse clicks. In the console (popping up by hitting the F12 key in FireFox, in the console tab) I can then see the error message, and the point in the javascript source code where the error occurred.
The browser message that a page crashed I only saw when I intentionally terminate the corresponding firefox.exe process with the Windows task manager. (Sometimes I have to do that, when pages try to grab more memory than is physically available, and cause my entire PC to practically grind to a halt.)
I have no Apple devices, so I don't know how to do the corresponding things in Apple browsers.
I now ran some matches with the individual Zen-Zebra pieces against their FIDE counter-parts, in a FIDE context. Only the Charging Zebra was able to beat the Bishop pair, with a moderate 54.5% score over 199 games (where the statistical error should be 2.8%). Such a score corresponds to a quarter of a Pawn, and that for a pair of pieces.
The other Zen pieces lost, sometimes badly. The FIDE Rooks won with a 66% score, about the same as Pawn odds, suggesting they are each 0.5 Pawn better than their replacements. The Knights won by 56.5% over 100 games (4% error), which translates to a 0.15 Pawn superiority of a single Knight. Perhaps somewhat surprisingly the Queen replacement did very bad: the FIDE Queen won with a 59% score, slightly over half a Pawn, and that for only a single replacement.
This is all very tentative, as I only run the tests with white suffering the replacements (which normally should have given them the advantage), and I did run all games from the same initial position, and did not check for duplicat games. But is seems especially the Rook and Queen replacements fall short of their target.
So it seems the Zebra moves, despite their large leap, are not dangerous enough to compensate for the fact that they more often fall off board. It could also be that the asymmetry of the Z moves in the Zen pieces disadvantages them. It enables them to raid deeply into enemy territory, but they then cannot get out the way they came, and might be trapped there. This desrves an investigation, e.g. by testing FffsbZ (asymmetric) against FvZ and FsZ (symmetric).
A browser is a multi-threaded program; If I run FireFox on my PC with many tabs open, I see many firefox.exe processes in the task manager. (This is on Windows 7, I think in later Windows you need the Resource Manager to see that.) It seems that each is dedicated to one tab: if I kill it through the task manager, the page that was shown in the corresponding tab disappears, and is replaced by white page with a message like "Sorry, it seems this page crashed", and a blue button that offers you to reload it. Other tabs are not affected. I suppose the same message would be shown if the process terminated through some internal bug.
Browsers nowadays use their address bar not only for entering web-page addresses, but also for using search terms that should be passed to a search engine. Many years ago you first had to type the address of the search engine's website (like www.google.com) into the address bar, to get to a page where you could then type your search terms on that page. Such pages still exist, but seem to automatically transfer anything you type on them to the browser's address bar, like you were typing there.
Anyway, which search engine would be used to find things you type in the address bar that are not web addresses is usually a browser setting. On FireFox you can specify what your default search engine is. The default setting for this is google.com, which is probably why it displays the Google icon next to the address bar. But you can alter that in the FireFox settings menu.
I hit the back arrow and brave said it had a '500 Internal Error', whatever that means.
The message probably was '500 Internal Server Error'. When you get such an error it is not your browser's fault; the website you were viewing did produce the page with this error message (which your browser then correctly displays) because something went wrong on that server. In this case that doesn't tell us very much, because we cannot be sure which website we were accessing after using the back button. It could have been the website of the search machine.
Since the errors already occur when you directly type chessvariant.com addresses in the address bar, it is best not to involve any search machines.
Just out of curiosity:
I made a copy of the page souce of the CVP home page, and put that back on the site as http://chessvariants.com/home.html . Can you access that page with your iPhone?
I made an inventory of the Alfaerie PNG pieces we currently have, in particulare what is the difference between the set in the alfaeriePNG directory (which are mostly 48x48) and that in the alfaeriePNG50 directory (which is the entire alfaerieSVG directory rendered as 50x50 PNG). By first redirecting the output of an 'ls' command to a file in each of these directories, then letting the 'diff -u' command compare them, and finally extract the omisisons and additions by using 'grep' for lines starting with + or -, I created the following table. The + refers to files that are in alfaeriePNG50, but not in alfaeriePNG, the - means the opposit.
-bbishopinv.png -bcamelknightferz.png -bcardinalinv.png -bchancellorinv.png -bcircle2.png -bcircle.png -bcobra.png -bcoordinator2.png -belephantknight.png -belephantrook.png -belephantwazirbishop.png -belephantwazircamel.png -belephantwazirknight.png -belephantwazirrook.png -bfiredragon.png -bgnu.png -bkinginv.png -bknightdabbabah.png -bknightferzdabbabahrider.png -bknightinv.png -bpawninv.png -bqueeninv.png -brookinv.png -bvao2.png -bviper.png -bwarmachineriderferzcamel.png -bwarmachineriderferzrook.png -bwarmachinerider... ...generalelephant.png -bzebrawazir.png -gcircle2.png -gcircle.png -rcircle2.png -rcircle.png |
-wbishopinv.png -wcamelknightferz.png -wcardinalinv.png -wchancellorinv.png -wcircle2.png -wcircle.png -wcobra.png -wcoordinator2.png -wcrooked.png -welephantknight.png -welephantrook.png -welephantwazirbishop.png -welephantwazircamel.png -welephantwazirknight.png -welephantwazirrook.png -wfiredragon.png -wgnu.png -wkinginv.png -wknightdabbabah.png -wknightferzdabbabahrider.png -wknightinv.png -wpawninv.png -wpegasus.svg -wqueeninv.png -wrookinv.png -wvao2.png -wviper.png -wwarmachineriderferzcamel.png -wwarmachineriderferzrook.png -wwarmachinerider... ...generalelephant.png -wzebrawazir.png |
+bcamelbishopwazir.png +bcamelgeneral.png +bcamelriderferz.png +bcamelridergeneral.png +bcamelriderguard.png +bcamelriderwazir.png +bcamelrookferz.png +bcamelzebra.png +bchancellor_test.png +belephantferzhero.png +belephantgeneral.png +belephantridergeneral.png +belephantwazirwarmachine.png +bgeneral2.png +bgreatwarmachinegeneral.png +bknightgeneraldabbabah.png +bknightgeneral.png +blemurianelephantferz.png +blemurianwarmachinewazir.png +bnarrowknightgeneral.png +bnarrowknightwarmachine.png +bnarrowknightwazir.png +bnightriderferz.png +bnightridergeneral.png +bnightriderguard.png +bnightriderwazir.png +bsquirrelferz.png +bsquirrelwazir.png +btank.png +bwarmachinegeneral.png +bwarmachineridergeneral.png +bwideknightferz.png +bwideknightgeneral.png +bwideknightwarmachine.png +bwideknightwazir.png +bzebrageneral.png +bzebraguard.png +bzebrarook.png |
+wcamelbishopwazir.png +wcamelgeneral.png +wcamelriderferz.png +wcamelridergeneral.png +wcamelriderguard.png +wcamelriderwazir.png +wcamelrookferz.png +wcamelzebra.png +wchancellor_test.png +wcrookedbishop.png +welephantferzhero.png +welephantgeneral.png +welephantridergeneral.png +welephantwazirwarmachine.png +wgeneral2.png +wgreatwarmachinegeneral.png +wknightgeneraldabbabah.png +wlemurianelephantferz.png +wlemurianwarmachinewazir.png +wnarrowknightgeneral.png +wnarrowknightwarmachine.png +wnarrowknightwazir.png +wnightriderferz.png +wnightridergeneral.png +wnightriderguard.png +wnightriderwazir.png +wsquirrelferz.png +wsquirrelwazir.png +wtank.png +wwarmachinegeneral.png +wwarmachineridergeneral.png +wwideknightferz.png +wwideknightgeneral.png +wwideknightwarmachine.png +wwideknightwazir.png +wzebrageneral.png +wzebraguard.png +wzebrarook.png |
There are quite some more differences than I would have expected. Apparently there are a lot of SVG images that have not been incorporated in the PNG set. Mostly 'ferzed' or 'wazired' versions of existing mimages, by drawing a cross on those.
The PNG set has a number of inverted images, which were no doubt made by rendering the normal SVG upside-down with the aid of fen2.php. It has also a gnu, as a knight-camel composit, and many elephant composits. These were probably all made with the aid of fen2.php's ability to combine two images.
The white crookedbishop was wrongly named in the PNG set. The bknightgeneral is missing from the PNG set, which has a wknightgeneral. There is a wpegasus.svg file in the PNG directory, which doesn't belong there.
The best approach is probably to just copy all the PNG50 files to the PNG directory, which will make all the files in the rightmost two columns available, and replace every image not in the left two columns by their 50x50 equivalent. Then only the images in the left two columns might have to be reconstructed at 50x50 through a more dedicated action than just rendering an SVG. Although some of these already are 50x50.
[Edit] I remade all the remaining images, so all alfaeriePNG are now 50x50.
25 comments displayed
Permalink to the exact comments currently displayed.
OK, I now implemented this both in betza.js and betzaNew.js. (Every click in the holdings was treated as a first click, to prevent you could move pieces into the holdings, or between holdings squares. But a click on the already selected piece there indeed deserves to be an exception.)
@Fergus: I can no longer upload these .js scripts through the File Manager page of the Interactive Diagrams article. I get this error message:
Upload through WinSCP still works.