Comments by ChessShogi
These diagrams are a wonderful thing. They can easily describe various moves that Game Courier can't handle without using complicated code. However, I have a few suggestions that, in my opinion, would make the diagram even better.
- Tame pieces - The modifier t on a final (or only) leg of a move means that move cannot capture royal pieces in XBoard. In other words, it is the opposite of the modifier k on a final (or only) leg of a move, which means that move can only be used to capture royal pieces. This modifier should be relatively easy to implement.
- Custom definition of royal pieces - Currently, the only piece that is specified as royal by the diagram is the last piece on the diagram. Some variants may have more than one kind of royal piece (i.e. Chu Shogi), which makes this a useful extension, especially if the royal pieces must stay out of check.
- Triple Captures - This is without a doubtthe hardest extension to implement. Adding this would, in theory, require adding a lot more code to handle the second locust capture. However, this extension would be necessary for the Lion Dog, which can capture three pieces in a straight line, and other pieces that can capture three pieces at once. There might be a way to do this with the WierdChain function. However, that function hasn't been used in your diagrams other than in the Paco Shako diagram.
The BadZone function is indeed very useful. For example, if you wanted forbidden moves of royal pieces into check (which are highlighted dark gray) to not show up at all, all you need to do is use this function in your script, which works with both moves that move directly into check and castling moves that land on or pass through check:
function BadZone() { return blockFlag; }
However, this function isn't elaborated on very well. It has four parameters - x, y, piece, and color. The parameters x and y can be used to track the destination square of a piece (i.e. typ = board[y][x]) but piece and color are shrouded in mystery.
You said that you used this function to "confine pieces to their zones in Xiangqi," which is very interesting and could be very useful, as I am reasonably certain that you all four parameters there, though I could be wrong. Perhaps you can show me the function that you wrote to do this?
The rule for deciding who moves first is no longer a part of this game, but I forgot to remove it from the Rules section. It has now been removed from both this page and the corresponding Game Courier presets.
Is there any way to make the applet recognize hopping pieces like Cannons (mRcpR) and Vaos (mBcpB)?
Interestingly, the diagram doesn't grey out the squares that would result in moving into check when the royal piece is a Universal Leaper (XBetza notation: U), like the Emperor in Maka dai dai Shogi.
I have beeen assigned to the second round games, but none of them are showing up on My Games on Game Courier. I eventually found them using search filters, but when I tried to move, I got a error message saying that the file for the game could not be found on the website. This happened to me for all three games. Any help I can get would be appreciated.
I also noticed another thing about the diagram that I thought was very weird. When the diagram has at least 73 different pieces it starts combining the IDs of the first 6 pieces and replacing the actual ID of the piece with those. Specifically, it does this for the first group of 6, and then it skips two pieces. This process repeats until all 6 IDs have been used (So if the first 6 IDs are 1, 2, 3, 4, 5, and 6, the overwritten IDs would be 11, 12, 13, 14, 15, 16, 21, 22, 23, and so on all the way to 66). For example, the diagram in you page on Maka Dai Dai Shogi replaces the IDs of the Furious Fiend (+Ln), Buddhist Spirit (+DS), Teaching King (+Dv), Crown Prince (+DE), and Emperor (+K) with PP, PGB, PE, PSt, and PT, respectively. This is probably due to a bug in the source code, as I can't see any reason to think that it was intentional. However, this is only a guess. Do you have any suggestions as to what might be causing this?
Interestingly, I answered my own question. When looking at the source code, I found this line of code that was responsible for the pieces IDs being overwritten:
for(i=1; i<7; i++) for(j=1; j<7; j++) ids[64+8*i+j] = ids[i] + ids[j]; // combis
When I removed it from the source code, the problem disappeared. Honestly though, I have no idea why this line of code was in there. Logically speaking, wouldn't you want every piece to have the correct ID on it, instead of having the IDs of some pieces overwritten with something else?
I wonder if there is a way to make a piece capture everything in its path? For example, in Taikyoku Shogi there are range-capturing pieces that destroy everything in their path (including friendly pieces). In Betza 2.0 this behavior could be indicated using cd0. Perhaps the WeirdChain function holds the answer?
After a period of experimentation and looking at the How to Program Multi-Move Variants for Game Courier documentation, I managed to create a preset for my game Suzumu Shogi that can enforce rules for piece movement, display legal moves, and correctly handle both single moves and double moves. I am quite proud of it, actually.
However, no matter how hard I try, I cannot get the preset to correctly handle all promotions. The systems I came up with could handle promotions after a single move, but when the preset used the askpromote command to determine a promotion after a double move, the code would exit with an error message where the last move made had the first move in the sequence repeated. Any advice on how I should handle this would be greatly appreciated.
The preset for the game can be found here (Note that it does not support promotions): https://www.chessvariants.com/play/pbm/play.php?game%3DSuzumu+Shogi%26settings%3Ddefault
Here is an example of the error that comes up. Note that this only happens after I complete a double move with the mouse and the askpromote command is used after.
ILLEGAL: se 3f-4e; se 3f-4e; se 4e-5d; se$-dest on turn 3:
There was no se on 3f. It is an empty space.
Go back with your browser's BACK button, reload the page, and try again.
For diagnostic purposes, here is the full movelist:
1. se 5m-3k 1... SE 12d-14f 2. se 3k-3f 2... SE 14f-14k 3. se 3f-4e; se 3f-4e; se 4e-5d; se$-dest
In case there is a bug in the code, the settings file can be edited at play.php?game=Suzumu+Shogi&settings=promotest&submit=Edit
As you can see, the first part of the move somehow got repeated during evaluation, which, of course, shouldn't happen. I think it might have something to to with something in the Post-Move sections, but I could be wrong.
The repeated move is most definitely the problem, but it's the code that is doing this, not me. Other than this bug, the code works perfectly fine. For example, when I type in the move se 3f-4e; se 4e-5d; se$-dest or a similar move, the error doesn't pop up.
These are some very good questions. Here are my answers:
- When I said that the moves of the Fire Demons and the range-jumping generals were unplayable, I was talking about when I was still experimenting with piece moves. This was before I had even joined the Chess Variant Pages. Back then, the range-jumping pieces could only jump a single piece, and I was still experimenting with moves for the Fire Demon. I'll be honest with you - some of them got very crazy. At one time I gave it the move whose XBetza notation was the incredibly long
BsRvW5KaKaaKmabKcaibQ5cafKcafafKcafafafKcafafafafKafcabKafcafKafcafafKafcafafafKafafcabafKafafcabK
afafcafKafafcafafKafafafcabafafKafafafcabafKafafafcabKafafafcafKafafafafcabafafafKafafafafcabafafK
afafafafcabafKafafafafcabK.
I know. It basically defies description.- I prefer the promotion rule from standard Shogi because not only is it much simpler to understand, it is also easier to program in Game Courier. By using the standard prommotion rule all I have to do is keep track of where the piece started and where the piece ended. If I would have used the Chu Shogi promotion rule, it would have made programming the Game Courier preset much more difficult, to say the least.
- The reason the Fire Demon cannot jump is because allowing it to jump wouldn't fit well with the theme of the game being based on Tenjiku Shogi. Furthermore, this would potentially make the game of Mitsugumi Shogi (Suzumu Shogi's smaller counterpart) too fast-paced, even though there is only one Fire Demon in that game. Nonetheless, I have to admit that giving it the move you suggested, at least in Suzumu Shogi, could make for an interesting twist. Though I didn't really plan on giving the Fire Demon jumping moves, it's a good idea to think about.
- Now that I think about it, I think you're right on this one. I'd say it's slightly more valuable than a single Great General or Vice General, and I definitely think it's more valuable than a Rook General or Bishop General. Make no mistake though - even though it is not as powerful as it is in Tenjiku Shogi, the Fire Demon is still a force to be reckoned with. As for the values of the Lion Hawk and the Queen, sure, the Queen can slide in all directions, but the Lion Hawk has a fully-fledged Lion move, plus the move of the Bishop. Because of this, I would, in many cases, find it hard to believe that the Lion Hawk is less valuable than the Queen in Suzumu Shogi. The only reason it would be less valuable in Tenjiku Shogi would be because you are using the TSA rules (Bishop + 2 square area move, rather than Bishop + Lion).
Fergus, I decided to try out your Extra Move Chess Preset, and when I did a pawn promotion with the extra move, the same error that occured when I tried to promote a Soaring Eagle after completing a double move with the mouse popped up, albeit in a different form.
BANNED INPUT: k d7-e8; k d7-e8; p a2-a1; q-dest on turn 27:
MOVE: k d7-e8 and other moves to occupied spaces are banned here.
Now I have a very important question to ask: do commands like ask and askpromote only append one move to the list of past moves, or do they append something different? If the latter is the case, then that is the source of the problem. I think the askpromote command might be changing the move immediately preceding the promotion move to a list of all moves in the sequence, including the promotion move, and appending that after the choice is selected instead of just the single promotion move. This effect isn't noticeable with single move promotions because the move before the promotion move is the very first move, and because there is nothing before the first move, the sequence would remain in a legal format after the change.
Here they are. Nothing like serious play, just me making random moves.
1. P e2-e4
1... n b8-c6; p e7-e5
2. N g1-f3; B f1-b5
2... b f8-c5; q d8-h4
3. K e1-g1; Q d1-e2
3... n g8-f6; p d7-d5
4. P d2-d3; N b1-d2
4... n f6-g4; b c8-f5
5. P e4-f5; P c2-c4
5... q h4-h2; b c5-e3 // - Check! -
6. N f3-h2; Q e2-f3
6... b e3-f2; p e5-e4 // - Check! -
7. R f1-f2; Q f3-f4
7... p a7-a6; p f7-f6
8. Q f4-c7; R f2-f4
8... p e4-d3; k e8-g8
9. R f4-g4; N d2-f3
9... r f8-f7; n c6-d8
10. B c1-h6; Q c7-f4
10... p d3-d2; p d5-d4
11. R a1-d1; B b5-e8
11... n d8-e6; p d4-d3
12. R g4-g7; Q f4-g3 // - Check! -
12... n e6-g7; r f7-e7
13. Q g3-g7; N f3-g5 // - Check! -
13... r e7-g7; r a8-d8
14. R d1-d2; N h2-g4
14... r d8-e8; r g7-g6
15. N g4-f6; pass // - Check! -
15... r g6-f6; p a6-a5
16. R d2-d3; P b2-b3
16... r f6-h6; r e8-e1 // - Check! -
17. K g1-f2; R d3-d8 // - Check! -
17... k g8-g7; r e1-c1
18. R d8-d7; N g5-e6 // - Check! -
18... k g7-f6; r c1-c2 // - Check! -
19. K f2-e3; R d7-g7
19... r c2-c3; p b7-b6 // - Check! -
20. K e3-d4; P g2-g4
20... r c3-g3; p b6-b5
21. P g4-g5; P c4-c5 // - Check! -
21... r g3-g5; r h6-g6
22. R g7-g6; P c5-c6 // - Check! -
22... r g5-g6; k f6-e7
23. P f5-g6; P c6-c7
23... p h7-g6; k e7-d7
24. K d4-d5; P a2-a4
24... p b5-a4; p g6-g5
25. N e6-g5; K d5-c5
25... k d7-c7; p a4-a3
26. P b3-b4; N g5-e6 // - Check! -
26... k c7-d7; p a3-a2
27. P b4-a5; N e6-f8 // - Check! -
After this, I moved the black King to e8, and then I moved the black a-Pawn to a1. From there, the askpromote command activated, and I chose the obvious Queen promotion. And then the error occured.
27... k d7-e8; k d7-e8; p a2-a1; q-dest
BANNED INPUT: k d7-e8; k d7-e8; p a2-a1; q-dest on turn 27:
MOVE: k d7-e8 and other moves to occupied spaces are banned here.
I think this error could also be occuring in the Marseillais Chess preset when given similar situations.
I do not see any of the tournament games assigned to me. Make sure you used chessshogi instead of ChessShogi, otherwise I will not see the game. I'll put that in my about page for future reference.
I managed to find my games using an advanced search with my userID as ChessShogi and the tournament as GameCourier2019. For anyone that can't find their games, try using an advanced search, putting your ID exactly as it is (not all-lowercase) in the userID field and GameCourier2019 in the Tournament field. If any results pop up, make a move in each. After you have made your moves, the games will appear on your My Games on Game Courier page as normal.
If you were to capture both a Deva/Teaching King and a Dark Spirit/Buddhist Spirit with a multi-capturing piece such as a Lion or Lion Dog, which piece would you promote it to? The rules state that the promotions of these pieces are contagious, but do not elaborate on which promotion has priority when a multi-capturing piece captures a Deva/Teaching King and a Dark Spirit/Buddhist Spirit in a single move. See the promotion rules in Taishin Shogi for some possibilities.
When I try to promote a Dragon King, it promotes to a Tokin instead of a Soaring Eagle. However, this can be easily fixed by making the King the last piece and changing the parameters accordingly.
When I try to promote a Dragon King, it promotes to a Tokin instead of a Soaring Eagle. However, this can be easily fixed by making the King the last piece and changing the parameters accordingly.
When I try to promote a Flying Falcon, it promotes to a Tokin instead of a Tenacious Falcon. However, this can be easily fixed by making the King the last piece and changing the parameters accordingly.
About your idea of including piece descriptions in the piece table:
Overall, including piece descriptions in the piece table is a good idea that I think should be implemented. Here are my thoughts on it:
First and foremost, including piece descriptions for a piece in this way should be optional, so you don't have to do it for every single piece in the table, which would be quite tedious, especially for larger games like Hook Shogi and Taishin Shogi. Of course, you can put in default descriptions for predefined pieces, but the programmer should also have the ability to override these. For null descriptions you could simply replace the empty string with a hyphen.
Regarding implementation, I recommend putting all the piece descriptions in an array so you can use JavaScript variables to hold piece descriptions if need be. And when setting piece descriptions in the diagram script, I would suggest putting the descriptions after everything else in the colon-separated list, like so:
name:id:move:image:startingHand:description
This way already existing diagrams won't get screwed up by this new implementation.
If you do implement this, make sure to update this page to include information about it.
I managed to make rule-enforcing preset for this game. It enforces almost every rule in this article, from the piece moves down to the Fire Demon's burns. The only rule I could not implement was the rule regarding repeated board positions since it is very complex. So it is up to the players to abide by these.
You can find it here: https://www.chessvariants.com/play/pbm/play.php?game%3DTenjiku+Shogi%26settings%3Dtenjiku
25 comments displayed
Permalink to the exact comments currently displayed.
I would love to be a part of this event. My favorite variants that are currently on the list are (in no particular order) Sac Chess, Colossus, Opulent Chess, Gross Chess, and Hectochess. Also, on a side note, I tend to not favor games that are not much like chess, escpecially if their rules are complicated like they are in Decima or if their presets don't contain full rule enforcement.