Ratings & Comments
H. G. and I fixed that during our discussions about the ScoreMove() function in his code. But thanks for pointing it out.
I'm not sure, but I think some of the "gameless" pieces on your list could be found in Short Sliders (and the Leapers Who Love Them).
P.S.S. If you do decide to use the Interactive Diagram, you will need to lean HTML in order to properly embed one in your pages.
That isn't really necessary.
It is the method that works best for me when embedding Interactive Diagrams on my pages, since if I use WYSIWYG (or another format for that matter) for the default format the Diagram gets mauled. Though you can just switch Source on and off for the other ones, as you said.
@Christine I guess for best results you should use HTML as the default format (the field at the top of the Edit Submission dialogue that lists the different formats), and then turn off Source for all the non-Diagram-housing sections.
Well sorry if it’s the wrong place but I received Some reply’s. It looks like all the comments go To a general page of ALL comments in any case.
I have decided to end my break from inventing Chess Variants and try to be more involved as an Editor. I probably won't be as prolific though.
I have decided not to make the stand-alone Chu Shogi App I said I would make in the previous comment, since the Chu Shogi Appliet I made already fills the role I intended it to fill quite nicely. However, I have released the SVGs I made for such an app in a graphics.dir page page.
To the other Editors: Speaking of which, the graphics.dir index page could be improved, but more on that later.
Peter Aronson allows (optional) promotion to a Silver General on your 6th, 7th and 8th ranks in his 2001 variant Gothic Isles Chess. Promotion to a more valuable piece on your 8th rank is only possible when it has been previously captured by your opponent.
"Mandatory promotion of a Pawn to a Silver General of the same color on the player's 8th rank" is the rule in my 2005 variant Shatranj Kamil (64). I am not entirely happy with my decision to keep a Ferz in my game - I sometimes think about having a stronger piece next to the King, as in the Strong Makruk army.
I do have like 3 games to put up soon, so I'll check out the the HTML format, thanks A.M.DeWitt.
Bob Greenwade, thanks, I'll super check that game, but, I have had a look at it because I remember I have referenced that game, it must be for a piece that will be in Part 3. You can't forget that name for a game lol.
There isn't too many pieces that I have given no game's for, so I can't wait to look at this super close hehe, thanks, let you know.
The "Capture is mandatory" rule was introduced after several test games. Without this rule, the game could go on forever since the usual concept of a checkmate is absent and the cycle of transformation of pieces is closed. However, nothing prevents you from playing without this rule.
Considered by who? In my eyes it is more a hybrid. It keeps the pieces from Dai that were in Chu, but the large Shogi variants all do that. The pieces that distingush Dai from Chu were all thrown out. Although one might argue that the promotion-on-capture rule is the decisive difference.
But of course there is nothing against hybrids.
Buddhist Spirit is also an interesting power piece.
Well, now that I am back to inventing Chess Variants and being more involved in general, I think using only the Dai Shogi (-like) move types would make for a more interesting challenge. Especially now that the Shock Chess rule is implemented, which makes for a much simplet trading rule without making pieces basically immortal.
P.S. I posited a question about the shock rule in relation to multi-movers, which you can find here.
The captureMatrix only looks at the pieces on the origin and destination. For multiple capture it would have to be not a matrix but a multi-dimensional object.
But I did not see that as a problem. In the example you give an adjacent Lion is captured. Under Chu-Shogi rules this would also be allowed. In the current form the rule thus gives the closest approximation to the original Chu-Shogi rules. You can even allow bridge capture, by exempting the caKcabK moves from application of the capture matrix by suffixing those moves with an apostrophy. (No way to still forbid it when bridged by P or GB, though.)
BTW, it is still possible to handle more complex cases by scripting. By defining an xxxTinker() JavaScript routine you can examine the move it is passed as argument, and set the '64' bit of the variable 'kind' to let the move trigger the forced pass (kind |= 64;). Or the '32' bit to make it a prioritized move.
There seems to be a typo in the promotion rule for Strong Makruk (Kuhn instead of Kohn).
The diagram is rather ugly cut & paste work.
I guess it should be possible to make an Interactive Diagram for this variant, though; it falls in the category of 'regular variants', which only differ from orthodox Chess by having different sliders, leapers and their compounds and board-size parameters.
I once tested the effect of limiting the promotion choice to weaker pieces, (like only Knights), and it turned out there almost wasn't any. I suppose that in practice promotions can almost always be prevented by sacrificing a minor for the Pawn that is going to promote or has just been promoted. So promotion is worth a minor. For promotion of pieces weaker than a Knight (such as Silver or Ferz) this might no longer be true, though.
The captureMatrix only looks at the pieces on the origin and destination. For multiple capture it would have to be not a matrix but a multi-dimensional object.
But I did not see that as a problem.
BTW, it is still possible to handle more complex cases by scripting. By defining an xxxTinker() JavaScript routine you can examine the move it is passed as argument, and set the '64' bit of the variable 'kind' to let the move trigger the forced pass (kind |= 64;). Or the '32' bit to make it a prioritized move.
Well, to be fair, usually it isn't. The problem I was having was that hit-and-run captures weren't triggering the forced pass. I tend to prefer consistency in my rulesets. But thanks for letting me know about the scripting option.
Since I see that in the source code Tinker() still only takes two parameters, I'm assuming by kind you are referring to the in-source variable here.
Edit: I tried your recommendation by editing the diagram to my previous comment, and it works perfectly with all capture situations. Thanks.
In the current form the rule thus gives the closest approximation to the original Chu-Shogi rules. You can even allow bridge capture, by exempting the caKcabK moves from application of the capture matrix by suffixing those moves with an apostrophy. (No way to still forbid it when bridged by P or GB, though.)
You could just use the tradeThreshold=N parameter for that, and have the forbidden bridge-captures be the first N pieces in the list.
Indeed, 'kind' is a global variable, the bits of which can be set during the tracing out of a move path by (possibly recursive) calls of NextLeg(), or the StackMove() that this results in. (Which again optionally calls xxxTinker() via AlterMove().) In the end the bit flags indicate whether the move passed through a square that was mutated in the previous two moves, and thus a discovered attack, recapture or pin enforcement. And thus now also whether it is prioritized or triggers a forced pass.
The problem is that the capture matrix also specifies what should happen for moves to an empty square. Hit-and-run captures make a capture, but end on an empty square. It is not obvious that an occupant should dominate the empty square here.
I don't think it would be wise to make the very general function of the apostrophe of exempting from capture matrix and morph board subject to restrictions that depend on the kind of move it is applied to. The trade threshold only makes sense for double captures.
ATTENTION EDITORS: the applet wants to play the illegal move 17... e7-e5 in the game below, ignoring the White Rook on e6. I wonder if two-step initial pawn moves were coded as leaps here. EDIT [10/22/2024] Thanks for all your work on these applets. The game now correctly ends with *** stalemate ***
1. h4 d6 2. Nf3 Bh3 3. Rxh3 Nc6 4. g4 Nd4 5. Nxd4 Kd7 6. Nf5 Ke6 7. Rc3 Kf6 8. Rxc7 Kg6 9. Rxb7 h6 10. Rxa7 Kh7 11. Rxa8 Nf6 12. Rxd8 Kg8 13. g5 Rh7 14. h5 Kh8 15. g6 Ng8 16. Rxd6 f6 17. Re6
At first glance, the final position arrived at might appear impossible, so I decided to provide a complete game, which can be copypasted into the chess applet here. Such "blockade stalemates" are highly unusual, but need to be kept in mind whenever you are writing brand new rules for a chess variant.
My bad. I wrecked the betza.js script in the attempt to also make the n modifiers work for larger orthogonal or diagonal leaps than 4 squares. In betzaNew.js I did it correctly. Now it should work in both (after browser-cache refresh).
The j modifier might not work as desired on larger leaps, though: it would require all intermediate squares to be occupied. I assume it would be more useful to require that only a single intermediate square is occupied.
Alfilrider{AA} appeared in Skip Chess, Universal Chess, UC-170-13, UC-170-17. Alfilrider-Fers{FAA} appeared in Major Star, Major Star-rider. Alibaba{S} appeared in 4 Kings Quasi-Shatranj, Alibaba Chess, Fantasy Grand Chess: Giant Army, Interdependent Chess, Leap Chess, Modern Courier Chess, The Pattern Game, Shatranj al-Sultan, Pocket Polypiece Chess 43, Universal Chess, UC-170-13, UC-170-17, Dealer's Chess, Convoi exceptionnel II, Convoi exceptionnel III, Play against Popo, Trifecta. Alibabarider{SS} appeared in Skip Chess. Auroch{NFX} appeared in Dealer's Chess, Zwangkrieg. Barc{fsbN} appeared in UC-170-13, UC-170-17, Crab Chess. Carpenter{DN} appeared in Augmented Chess, Augmented Knight, Asymmetric Augmented Knight, Bakery Bombers, Rose Chess XII, Knavish Chess, Avon, Diamond Ring Fusion, Kyoomagi, Arena Cheturshogqi, Beautiful Beasts, Platonic Chess, Uneven pieces chess, Short Sliders. Champion{WS} appeared in Omega Chess Advanced, Apothecary Chess-Modern, Grand Apothecary Chess-Modern, Gross Chess, Parity Chess, SOHO Chess, TenCubed Chess, WAD Chess, Wide Nightrider Chess, Wide SOHO Chess, Wormhole Chess, Mĕirìqí, Yangsi, Hectochess, Omega Chess Extended, Omega Chess Semi-Advanced, Omega Chess Extreme. Crab{fbsN) appeared in Amazon Army II, DemiChess, Half Chess, Halfgi, UC-170-13, UC-170-17, Shatranj With Different Armies, Aquachess, Crab Chess. Dabbaba-Wazir-Fers{DK} appeared in Chess++, Cobwebs, Kjempe Chess (before the revision). Dabbabarider{DD} appeared in Skip Chess, Universal Chess, UC-170-13, UC-170-17, XChess. Problems with Dabbabarider: -Nils Adrian Bakke 153 feenschach 36, p. 374, 11-12/1976 -Theodor Steudel 63 feenschach 162, p. 217, 12/2005 Dabbabarider-Wazir{WDD} appeared in Golden Age Chess On a Really Big Board, Traffic Calmed Borders. Duck{FDD} appeared in Scheherazade, Colorbound Chess, Major Star, Major Star-rider. Duke{FD} appeared in Sai Squad, Grand Betza, Short Sliders, Zwangkrieg, Uneven pieces chess, Patchanka, Constabulary Chess, Constable-Spiel, Med Chess, Accelerated Constable-Spiel, Accelerated Constabulary Chess, Futashikana Shogi, Ryugi, Mosaic Chess, Chu Seireigi, Minjiku Shogi, Tengu Dai Shogi, Chu Kagamigi, 4 Kings Quasi-Shatranj, Dai Seireigi, Nutty Shogi, Macadamia Shogi, Kirin-Spiel, Mitsugumi Shogi, Kuuzen Dai Shogi, Cashew Shogi, Bureau-Spiel, Silly Sliders, Universal Chess, UC-170-13, UC-170-17, Dealer's Chess, Weirweb, Crow chess cheap copy. Ferfil{FA} appeared in 3D Great Shatranj, 4 Kings Quasi-Shatranj, Champagne Chess, Courier Chess (modified), Enhanced Courier Chess, Fearful Fairies, Hannibal Chess, HyperModern Shatranj, Maasai Chess, Metamachy, Mir Chess, Teramachy, Universal Chess, UC-170-13, UC-170-17, Constabulary Chess, Constable-Spiel, Bureau-Spiel, Simi Grove, Simi River, Wukong. General{LK} appeared in UC-170-13, UC-170-17. Giraffe{FX} appeared in UC-170-13, UC-170-17, GraTiA, WILDEURASIAN BESTIARY. Griffon{FyafsF} appeared in Apothecary Chess-Modern, Europan Chess, Ganymede Chess, Grand Apothecary Chess-Classic, Grand Apothecary Chess-Modern, IO Chess, Mosaic Chess, Tigrey, Gryphon Aanca Chess, Frog/Hannibal/Waffle chess with Gryphon, 4 Linepiece Fusion, Expanded Chess, Royal Lion Chess, Abecedarian Big Chess, Universal Chess, UC-170-13, UC-170-17, Dealer's Chess, 15 Random Bent Riders Chess. Impala{NYN} appeared in Dealer's Chess. Christopher John Feather 7 Fairings 14 01/2011 features Impala. Knight-Alfil-Wazir{NAW} appeared in Scheherazade, Strategists' nightmare. Knight-Dabbaba-Fers{NDF} appeared in Strategists' nightmare. Mao-Bishop{BafsW} appeared in Paradigm Chess30. Squirrel{SN} appeared in ArchCourier Chess, Archchess, Carrousel Chess, Courier Chess (modified), Fantasy Grand Chess: Giant Army, Grand Ducal Chess, Renniassance Chess, Samarcanda, Trophy Hunt, Alibaba Chess, Timurid, Fantastic XIII, Obento Chess, Cincinnati 4-way Chess, Heavy Shako, Bigorra, Archabbott Chess, Timurid Babur, Chess Empire, UC-170-13, UC-170-17, Dealer's Chess, Strategists' nightmare. Toad{DH} appeared in Chaturanga with minor changes. Zurafa{afsafyafF} appeared in CCChess Final Fight, CCC - The Clash of Civilizations Chess, Chinese Army vs Tamerlane Army.
Well, as you said, custom scripting is always an option. I am having trouble though when it comes to custom scripting compatibility for the AI though, probably because I set the kind variable in the Tinker() function itself. Here's the code for Raichu Shogi I use, when allowing hit-and-run captures of Lions to trigger the forced pass.
function raichuTinker(m, d) { dest = board[m[3]][m[2]] & 511; midpoint = m[-2] > 2 ? (board[m[5]][m[4]] & 511) : 0; if(IsLion(dest) || IsLion(midpoint)) kind |= 64; // problem line, will be replaced with: return 5; return 0; } function IsLion(pieceType) { // Returns true if pieceType is a Lion return pieceType == 20 || pieceType == 31; }
Let's say that instead of setting it in the function, I want to return a value of 5 to indicate the forced pass, and set kind |= 64 elsewhere. Where should I set it?
When I tried in AlterMove(), and the Console gave the following error (this is in a local file),
Raichu Shogi.html:17 Uncaught RangeError: Maximum call stack size exceeded
at AlterMove (Raichu Shogi.html:17:19)
at StackMove (sourcecode.js:3068:10)
at NextLeg (sourcecode.js:3325:22)
at NextLeg (sourcecode.js:3328:9)
at NewInner (sourcecode.js:3357:7)
at NewGen (sourcecode.js:3368:3)
at GenAll (sourcecode.js:3404:41)
at AlphaBeta (sourcecode.js:3647:3)
at AlphaBeta (sourcecode.js:3678:19)
at AlphaBeta (sourcecode.js:3678:19)
, after I added an if statement telling AlterMove() to set kind |= 64 and return 0 for the normal move in the section with the Tinker() call.
if(alter & 16) { var tinker = CustomScript(m, piece & 1024 ? m[3] : ranks - 1 - m[3]); if(tinker > 0) { if(tinker == 5) { if(!(kind & 64)) { kind |= 64; } return 0; } else return tinker; } }
If the call stack overflows you must have many more layers of calling. Probably a long sequence of AlphaBeta. So the line gets too long because it awards extra turns all the time. (The forced pass and following move are not counted towards the depth.)
AlterMove calls Tinker (= CustomScript), and doesn't touch 'kind'. So it should not matter which of the two sets the 64 bit in kind.
I would have to test this myself, but might not have time before tomorrow evening.
Well, I tried a Diagram for orthodox Chess together with the script
function extraTinker(m) { var v = board[m[3]][m[2]]; if((v & 511) == 5) kind |= 64; return 0; }
and it seems to work fine: capturing the Queen forces the turn pass. So it must be something specific to your Diagram, which might use other features that somehow interfere with the calling of Tinker.
It might have something to do with the locust captures, especially hit-and-run captures, since Chess has no multi-moves (except for castling and en passant, which do not affect Queens at all). Hit-and-run captures of a Lion would move it to either an empty square or a square with a non-Lion piece, so that might mess up the call stack a bit. However, since this works just fine in games that only have single captures affecting the target piece for forced turn passes, I'm currently stumped.
I do have a theory though. If AlphaBeta() repeatedly calls itself, it would also call Tinker() repeatedly. This would mean that when kind |= 64 is set, it is never unset if AlphaBeta() decides to do a move that doesn't capture a Lion. That might have something to do with it.
I do have a theory though. If AlphaBeta() repeatedly calls itself, it would also call Tinker() repeatedly. This would mean that when kind |= 64 is set, it is never unset if AlphaBeta() decides to do a move that doesn't capture a Lion. That might have something to do with it.
This can be excluded. Moves for each piece are generated by NewInner, which then calls NextLeg (recursively for multi-leg moves), which finally calls StackMove (possibly a number of times if there are sliding legs). NewInner loops over the move-descriptors in the move table for the piece, and clears kind before every entry it passes to NextLeg. So the effect of altering kind could at most extend to all moves generated from the same move descriptor. Which is moves with longer sliding leg.
This was intentional: some bits in kind indicate whether you have passed over a square mutated by the previous two ply, in order to recognize discovered attacks and hopper activations. Lions do not have any sliding legs, though. So each move descriptor would only result in a single move.
If you post a Diagram for which it does not work, I can debug that.
[Edit] For hook movers (which have a sliding non-final leg) this is broken, as the sticky bits remain from one continuation to a different, non-overlapping continuation. The routine NextLeg should save the value of kind before calling itself recursively for the next leg, and restore it afterwards. I will make it do so.
Since this comment is for a page that has not been published yet, you must be signed in to read it.
Since this comment is for a page that has not been published yet, you must be signed in to read it.
Since this comment is for a page that has not been published yet, you must be signed in to read it.
25 comments displayed
Permalink to the exact comments currently displayed.
Hello Well thanks for the reply. I will be away for 5 weeks now so I will Add more details of my ideas in December 2024. The site needs to stay "alive" forever do not get me wrong. But it should be updated and more user friendly. Ttyl Edwin J Wilhelm