Check out Glinski's Hexagonal Chess, our featured variant for May, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments by ChessShogi

EarliestEarlier Reverse Order LaterLatest
Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Nov 20, 2022 01:57 AM UTC:

I am having problems with my new preset for Suzumu Shogi. For some reason, it just keeps echoing "Please report any bugs or errors to Adam DeWitt" over and over again instead of showing the preset like it should. Any help would be greatly appreciated.


Suzumu Shogi. 16x16 variant based on Tenjiku Shogi. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Sun, Nov 20, 2022 04:39 AM UTC in reply to H. G. Muller from Sat Nov 19 06:01 AM:

I was thinking banning burning Fire Demons and Heavenly Tetrarches (possibly allowing it if something else is burned first), but allowing these pieces to be captured directly or via igui (the latter which is a locust capture). I tried doing it with the BadZone function used in the last version, and most of the time it worked perfectly, but for some reason the part testing for the evic parameter value would cause the area move (and sometimes non-capture moves) to disappear if two burning pieces were within burning distance of their orthogonal ranging moves. Right now, I am happy with the current version. Fire Demons can still be traded, but at least now it is easier for the moving Fire Demon to grab an additional piece without risking recapture thanks to the strengthened burning ability.


Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Nov 20, 2022 01:01 PM UTC in reply to Fergus Duniho from 06:53 AM:

I guess I didn't make the link clear enough (Edit: Suzumu Shogi on the Chess Variants Game Courier). What I have should work. I don't see any typos in the code. But of course I'm probably overlooking something.

Edit: I found it. Turns out the remind messages in the Post-Game sections had typos in them.


A. M. DeWitt wrote on Sun, Nov 20, 2022 03:12 PM UTC in reply to Fergus Duniho from 01:32 PM:

I fixed most of the issues. Now the only problem that I can see is that the Heavenly Tetrarch's first burn is being rejected when it shouldn't be when the distance between the origin and destination of the first part of the move is at least 2. The problem is likely in the HT subroutine, since it controls the function definition for the second and third parts of the Tetrarch's move, but I could be wrong.

Here is the link for the preset's Edit form: Edit: Suzumu Shogi on the Chess Variants Game Courier

And here's the list of moves for which the error occured:

1. d 8k-8j 
1... D 9f-9g 
2. p 7l-7k 
2... P 10e-10f 
3. bg 6m-8k 
3... BG 11d-9f 
4. fd 7n-6k 
4... FD 10c-11f 
5. fd 6k-8i 
5... FD 11f-9h; pass 
6. fd 8i-5f; fd 5f-5e; fd 5e-4e 
6... FD 9h-12k; FD 12k-12l; FD 12l-13l 
7. fd 5f-7f; pass 
7... FD 12k-10k; pass 
8. fd 7f-7e; fd 7e-7f; fd 7f-8f 
8... FD 10k-10l; FD 10l-10k; FD 10k-9k 
9. bg 8k-15d; +bg-dest 
9... BG 9f-2m; +BG-dest 
10. dk 5n-5o 
10... DK 12c-12b 
11. cs 4o-14e; +cs-dest 
11... CS 13b-3l; +CS-dest 
12. +cs 14e-14d; +cs 14d-14e; +cs 14e-13d 
12... +CS 3l-3m; +CS 3m-3l; +CS 3l-4m 
13. +cs 14e-11b; +cs 11b-10a // <- ERROR: You may not move a +cs from 11b to 10a

A. M. DeWitt wrote on Sun, Nov 20, 2022 04:55 PM UTC in reply to Fergus Duniho from 04:41 PM:

That was what I was thinking as well, and given that the rest of the code is fine, we are probably right. Unfortunately, simply getting rid of that clause won't really solve the issue. The Heavenly Tetrarch has a unique mechanic that causes it to jump over the first square it travels over, so the preset needs to take that into account. It might be possible to get rid of it with clever use of the cond statemenet though.

Edit: Turns out I was using the wrong variables to account for the distance of the first part of the move. The values of origin and dest were updated before the move was evaluated, so the distance would always be 1 and the move would thus get rejected. I fixed this by using ori and dst instead, which stay the same for all parts of the move.


Suzumu Shogi. 16x16 variant based on Tenjiku Shogi. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Mon, Nov 21, 2022 01:06 AM UTC in reply to H. G. Muller from Sun Nov 20 04:45 PM:

Yes, (though this extends to burning pieces in general) and the BadZone code from the last version mostly worked (if you include "in addition to burning another piece"), but like I said earlier, the section testing the evic value (the intermedate square) caused parts of the Demon's area move to disappear when they were within one rank of each other, so I decided to just remove the restriction altogether so I didn't have to worry about it. I think I'll wait until the new function that combines BadZone, WeirdPromotion, etc. is finished.


💡📝A. M. DeWitt wrote on Mon, Nov 21, 2022 08:58 PM UTC in reply to H. G. Muller from Sun Nov 20 04:45 PM:

I can make a revision with the BadZone code in it if you want.


💡📝A. M. DeWitt wrote on Tue, Nov 22, 2022 12:23 AM UTC in reply to H. G. Muller from Mon Nov 21 09:14 PM:

Here is the BadZone function's code:

function badzoneZone(x2, y2, piece, color, x1, y1, ex, ey) {
  if(touched) return 0; // not during ShowMoves()
  if(piece == 35 || piece == 65 || piece == 66) // Fire Demons and Heavenly Tetrarches
  {
    evic = (ex >= 0) ? board[ey][ex] & 511:-1;  // intermediate square
    if(evic == 35 || evic == 65 || evic == 66) { // Problem area
      if((x1 == x2 && y1 == y2) || (ex == x2 && ey == y2)) return 0; // Allow direct capture or igui
        else return 1; // else reject
      }
    }
    return 0;
  }
}

Eventually I hope to make it so that burning pieces cannot burn each other at all.

You can view a diagram with this function implemented here.


💡📝A. M. DeWitt wrote on Fri, Dec 9, 2022 12:00 AM UTC:

Suzumu Shogi is ready


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Dec 9, 2022 11:03 PM UTC:

The part of the wizard where you add pieces to the board is still broken. The board shows up, but nothing else.


Tenjiku Shogi. Fire Demons burn surrounding enemies, Generals capture jumping many pieces. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Thu, Dec 15, 2022 12:03 AM UTC:

I wonder how the game would be different if the jumping Generals instead had range capturing moves like their Taikyoku Shogi cousins?


Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sat, Dec 17, 2022 01:28 AM UTC:

There seems to be a bug with the checkahop operator, in that it seems to allow both the hop in the intended direction and the hop in the opposite direction, at least on the second part of a multi-move. This can be demonstrated in this game of Suzumu Shogi (the experimental version w/ triple capturing versions of the jumping Generals)

1. rg 7m-7d; +rg-dest 
1... RG 10d-10m; +RG-dest 
2. wb 11n-12o // begin setup for bug demo
2... WB 6c-5b 
3. +rg 7d-6c 
3... +RG 10m-11n 
4. fe 8m-10m 
4... FE 9d-7d 
5. lh 9m-8k 
5... LH 8d-9f 
6. d 12k-12j 
6... D 5f-5g 
7. d 12j-11k 
7... D 5g-6f 
8. p 14l-14k 
8... P 3e-3f // end setup for bug demo
// in this position, when +rg 7c is clicked after 9. +rg 6c-7c, it shows the two intended hops plus another (unintended) hop on 4c which jumps over the first piece in the opposite direction, which is incorrectly accepted by the rule enforcement code.

I'm pretty sure this is a server-side bug and not a bug involving my code. Any help would be much appreciated.


A. M. DeWitt wrote on Sun, Dec 18, 2022 01:49 AM UTC in reply to Fergus Duniho from Sat Dec 17 10:12 PM:

Thanks for fixing checkahop.

As for the rest of the RANGECAPTURE code, the not so compact cx and cy assignments were me trying to fix the bug before realizing it was a server-side issue. I can just use cmp there since the jumping Generals can only jump along the eight cardinal directions. Since they use #ori and #dst (the variables that store origin and dest), and the jumping Generals cannot change direction mid-move, there is no need to compare directions, as using cx and cy with checkaride and checkhop returns the same direction as that of the first part of the move. The if statement with the checkaride clause is there to enforce the two jump limit for these pieces. If that checkaride clause fails but the ismultimove subroutine succeeds, the moving pieces has jumped over a piece (and another piece which it just captured) already, and thus cannot jump any more pieces.


A. M. DeWitt wrote on Sun, Dec 18, 2022 03:06 PM UTC in reply to Fergus Duniho from 03:04 AM:

Fair enough.


A. M. DeWitt wrote on Mon, Dec 19, 2022 02:25 PM UTC in reply to Fergus Duniho from 02:01 AM:

It seems I had an extra parameter in the israngecapture subroutine from when I was trying to use a subroutine to determine whether a range capturing piece had any legal moves left mid-move. It is fixed now. The responsibility of determining whether a piece has any moves left mid-move has been moved to the Post-Game sections, making use of the legalmoves2 subroutine's return value. I also fixed Mitsugumi Shogi's GC preset, which had the same problem.

Edit: I also got rid of the from parameter in the israngecapture subroutine and the statements that call it. Since it wasn't being used within the subroutine itself, there was no need to include it in the parameter list.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Wed, Dec 21, 2022 03:23 AM UTC:

It seems there is a bug affecting certain XBetza moves enclosed in parentheses that prevents their highlights from displaying properly. For example, this bug will show up after executing the following moves in Suzumu Shogi's interactive diagram:

1. HFmm11 HFxm12xm13+

After promoting the Falcon to Bishop General (XBetza (cmpaf)2cBmcB), click on it and then click on the Lance in the corner. If done right, the highlights for the second part of the move will not show up at all.

The bug seems to be coming from this line in the NewClick function:

        var h = hlights[k], victim = board[h[1]][h[0]], col = ((h[3] & 3) == 1 ? h[3] & 64 ? '#00C000': '#00FF00' : h[3] & 64 ? '#C0C000' : '#FFFF00');

Any help fixing this would be greatly appreciated, as I could potentially reduce the length of the most complicated Suzumu piece's Betza strings significantly.


Variants playable against the diagram's AI. (Updated!) Index of variants that can be played against the interactive diagram.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Thu, Dec 22, 2022 03:45 AM UTC:

Suzumu Shogi and Mitsugumi Shogi have been moved to different pages. There is no longer a hyphen separating the words "suzumu/mitsugumi" and "shogi," so if those could be updated that would be greatly appreciated.

Also, Hanten Shogi and Gyaku-sama Shogi no longer exist, so they can be removed from the list.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Thu, Dec 22, 2022 08:23 PM UTC in reply to H. G. Muller from 12:43 PM:

Yes, using cpaf instead of cmpaf does work, but only if it used once. (cpaf)2cB only covers a subset of the moves that (cmpaf)2cB covers. Remember, the p and a modifiers exclude the m modality if only c and/or d are specified in the modifiers immediately before it, per their definitions. Thankfully, this problem can easily be solved by writing the missing legs separately, yielding B(cpaf)2cBcafpafcBpafcafcB. Longer for sure, but it won't have the same search explosion problem, at least for the (cpaf)2 part. The other two multi-leg parts may have search explosions since paf is (usually) equivalent to mpaf (which can lead to the same problem as before), but they will be much more subtle explosions since paf is only used once.

I will update the diagram at the page I used to demonstrate the Suzumu Shogi BadZone bug (which can be found here) to include this bug, for future reference.


Betza notation (extended). The powerful XBetza extension to Betza's funny notation.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Dec 23, 2022 03:37 AM UTC in reply to H. G. Muller from Thu Nov 17 09:55 AM:

I have implemented k now such that in combination with c it disables capture of royals. (A combination that before was not different from plain c.)

Actually this means that k now can do what the t modifier (for 'tame') does in XBoard. Without using an extra letter!

That's fantastic. Brings Tenjiku Shogi one step closer to being implementable in an interactive diagram. The range jumping piece's moves (in this case the Bishop General) can now be written as B(paf)0ckB, where ck takes care of the restriction against capturing royals by jumping. The current BadZone function could easily handle the rest of  the rankings for the jumping Generals. Now just to figure out what to do for the burn...and how to specify options to accomodate how the burning move behaves. Once I have a way to do this, I can take care of the rest.


A. M. DeWitt wrote on Fri, Dec 23, 2022 04:46 PM UTC in reply to H. G. Muller from 07:16 AM:

BTW, I have played Tenjiku at high level according to 'modern' rules, where the King can be jump-captured. To my surprise this was very playable, and not too unbalanced. If you know the correct opening lines. Which my Tenjiku engine was able to determine.

In addition I came to realize that the King has highest rank does not necessarily have to refer to capture. Originally I thought that outlawing jumping over a King only would be pointless, as you would never be interested in doing that when you could also capture it. But it could also refer to your own King. So the evidence that historic rules did not allow King capture is starting to get flimsy.

Jumping Generals are not allowed to jump over a King or Prince (or other higher-ranking pieces) of either side, regardless of which ruleset you use, so the fact that the rankings could refer to friendly pieces is a rather dubious piece of evidence for allowing jump-captures of royals. Besides, even if the evidence for forbidding jump-captures of royals is indeed flimsy, it still improves the gameplay, as allowing jump-capturing of the King creates a critical weaknesses in the opening after 1. 7k (2. VG 2g#) which is only solvable via 1... SE3f. Furthermore, this weakness persists throughout much of the game, as the King remains boxed in throughout the opening and (early) middlegame, the Soaring Eagle on 3f (and other pieces defending 2g and 1h) can easily be threatened with capture, and one wrong move can result in a smothered mate. The point is, you should not need to use an AI to find a good opening.

Unfortunately this is not so easy, because BadZone only gets the locust squares passed. Not the pieces jumped over. The non-destructive intermediate squares are not part of the internal move representation. But I suppose BadZone could be made such that it scans the board for high-rank blockers along the path from origin to destination itself.

You can just use board[y][x] & 511 for the piece type, and a call to a recursive function that scans the in-between squares to handle the rest.


A. M. DeWitt wrote on Fri, Dec 23, 2022 06:58 PM UTC in reply to H. G. Muller from 05:11 PM:

Ok, fair enough.


Tenjiku Shogi. Fire Demons burn surrounding enemies, Generals capture jumping many pieces. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Dec 23, 2022 07:07 PM UTC in reply to H. G. Muller from Thu Dec 15 10:17 AM:

Yeah, that doesn't seem like a good idea.


Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Dec 25, 2022 02:38 AM UTC:

This  is probably a stupid question, but can a subroutine have zero parameters?

Example:

sub <subname>;
  <...code...>
endsub;

A. M. DeWitt wrote on Sun, Dec 25, 2022 04:24 PM UTC in reply to Fergus Duniho from 02:53 AM:

Ok. Thanks.


A. M. DeWitt wrote on Sat, Dec 31, 2022 03:14 AM UTC:

When using the allow command, am I correct that the word in the word/number argument pair does not have to be a command or keyword?

Example:

allow ... one 2 two 2 onetwo 2 ...; // I was planning on using this to get around a very annoying bug I found in a future version of Suzumu Shogi's GC preset (with multi-capturing versions of the jumping Generals).

Edit: I answered my own question. You can use custom commands in allow, provided that for each custom command you include a subroutine in your Pre-Game code like the one shown below.

sub <cmdname>:
  return true;
endsub;

Tenjiku Shogi. Fire Demons burn surrounding enemies, Generals capture jumping many pieces. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Jan 1, 2023 03:59 PM UTC:

Do you want to update this page to remove the rule that the jumping Generals cannot jump-capture royalty?

Note: My presets for Tenjiku Shogi and Nutty Shogi follow the rules described in their respective Rules pages, so they will not be changed unless you update them.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Tue, Jan 3, 2023 04:31 PM UTC:

For some reason, when using an image for the board in Game Courier, the file labels are positioned higher than they should be. Here's an example from Chu Shogi.


Tenjiku Shogi. Fire Demons burn surrounding enemies, Generals capture jumping many pieces. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Tue, Jan 3, 2023 06:14 PM UTC in reply to H. G. Muller from 04:36 PM:

Well, I don't want to have any discrepancy between what is in Wikipedia and on CVP, so I would then also have to change it in Wikipedia. To not run into an edit battle there, this would have to be done with care.

Understandable. I don't think this would be too hard, provided that the forbidding jump-capturing royalty rule is mentioned in the Disputed Moves section along with a reason for the change (perhaps your comment from our conversation in the Betza notation (extended) page?). But then again, maybe the Wikipedia page is far more sensitive to rule changes than I think it is.

All other rules equal, this would make for a very interesting game.


Zo Shogi (象將棋). A variant of Sho Shogi in which Drop rule is included and Prince (promoted Elephant) is a non-royal King. (9x9, Cells: 81) [All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Wed, Jan 4, 2023 02:05 AM UTC:

You have some great ideas. However, you seem to have some difficulty when trying to put those ideas in words. Thankfully I'm here, and I have plenty of tips from personal experience with using the site.

Here's some of those tips to get you started.

  • Put important statements (such as "All rules are identical to standard Chess except for the following") at the top of the section they go in. This makes reading about the differences more intuitive, as the top of the section is the first thing the reader will see. The same goes for the page in general.
  • Put the Interactive Diagram for the game in the Setup section along with the picture, preferably above the picture. This way the reader can dive right in without having to scroll down to the comments section. This helps the reader understand your game more quickly.
  • Using tables in the Pieces section works wonders for helping the reader to understand your game better, and has the added benefit of making the Pieces section look nicer in general.
  • Make sure to respond to comments that editors make in a timely fashion. This speeds up the publishing process
  • Be patient. There are only a handful editors on the site, and only some of them will be processing submissions at any given time, so it may take a while to get your submissions published, even if you do everything right the first time. Case in point, the GC preset pages for Suzumu Shogi and Mitsugumi Shogi have been approved, but the corresponding Rules pages have not (which I find a bit odd, but I digress).
    • You can leave a comment on this page if you think they missed your submission, but do this sparingly.
  • Don't be afraid to ask for help! There are plently of contributors and editors on the site who are more than willing to help you if you just ask them.

A. M. DeWitt wrote on Thu, Jan 5, 2023 01:12 AM UTC in reply to Daphne Snowmoon from Wed Jan 4 02:38 PM:

And I'm not sure exactly what the 'table' you are talking about is

When I say tables, I am referring to HTML tables. Speaking of which, it wouldn't hurt to get to know the basics of HTML, if you haven't done so already.

The editor also allows you to insert tables without needing to write HTML.

But I don't know how to apply interactive diagram inside the page.

All you need to do is paste the diagram definition into the page. The Interactive Diagram script doesn't care where you put it - the result is the same. Depending on whether there are multiple diagrams on the page, you may need to set the satellite parameter (satellite=xxx) within the definition to get it to work.

IMPORTANT: When inserting or editing an interactive diagram, make sure you keep the editor in HTML format, otherwise the editor will mess up the definition!


Suzumu Shogi. 16x16 variant based on Tenjiku Shogi. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Wed, Jan 11, 2023 04:20 AM UTC:

After some testing, I found that the threat of the Great General capturing one of the Fire Demons was giving Black too big an advantage. So to keep the new range captures under control, the jumping Generals are now subject to the rankings from Tenjiku Shogi (may only jump lower ranking pieces, but no restrictions on final capture). Update coming soon to both the rules page and the GC presets.


💡📝A. M. DeWitt wrote on Tue, Jan 17, 2023 09:19 PM UTC:

After some testing, I have managed to implement an algorithm to implement the Tenjiku ranking system in the interactive diagram. I've also changed the Heavenly Tetrarch's move so that instead of burning, it freezes (immobilizes) all adjacent enemy pieces except other Heavenly Tetrarches. Because of this, the Fire Demon's burning move restriction now only applies to other Fire Demons.

The GC Preset has already been updated, and the Mitsugumi Shogi preset will be updated soon.


💡📝A. M. DeWitt wrote on Wed, Jan 18, 2023 03:14 AM UTC in reply to Daniel Zacharias from 01:14 AM:

Is that instead of burning? That's an interesting addition

Yep. It creates a nice duality between the the Fire Demon and the Heavenly Tetrarch. And it was really easy to implement for the interactive diagrams and GC presets thanks to this comment and GC's Ultima include file. The diagram now understands the new restrictions for the jumping Generals as well (same as Tenjiku, but with no restrictions on the final capture), though it still isn't yet capable of understanding the burning restriction. The GC presets are also up to date. But the best part is that I am finally done developing this game (for real this time). It took 4 years, but it was worth it.

The new freezing ability for the Suzumu Heavenly Tetrarch came from a suggestion by Eric Silverman somewhere about a certain version of the Tenjiku Heavenly Tetrarch having a similar ability instead of the igui ability, immobilizing adjacent pieces, and stopping an adjacent Tenjiku Fire Demon's burn (for all pieces adjacent to the Fire Demon) as well. I can't seem to find it anymore though...

Edit: I also cropped the Shogi images so that they are the same size as the Mnemonic images.

Edit: It seems I left out the double igui part of the Tetrarch's description. I'll fix that right away.

Edit: I also changed the turn skipping restrictions to be more in line with those of other LSVs (specifically, you cannot skip two consecutive turns, making skipping a turn useless if your opponent can skip their turn too)


💡📝A. M. DeWitt wrote on Wed, Jan 18, 2023 04:01 PM UTC:

I think I have an idea of how to implement the burning restriction in the interactive diagram using the clicks array, which stores the values for each move made using the the new move system. It's going to take a while to perfect it though.

Edit: I managed to implement the burn restriction for Fire Demons that burn once in a prototype file. Now for the hard part...Fire Demons that burn twice.

Edit: Turns out the code from the first prototype covered a lot of the cases for the twice-burning Fire Demon. Now, the second prototype covers most cases. The only thing left is to allow a direct capture of a Fire Demon where the Fire Demon burns exactly twice.

Edit: After some struggling, I managed to cover all the cases for the twice-burning Fire Demon, which means the Diagram now properly forbids a Fire Demon from burning another Fire Demon. The Rules pages for Suzumu Shogi and Mitsugumi Shogi will be updated soon.

Edit: I've updated both pages. No more worrying about having the AI make an illegal move.

Edit: It turns out the AI's move generation doesn't use the clicks array, so the AI will exit with an error whenever you try to run it.

Edit: With some help from H. G. Muller, I was able to fix the burning restriction for the AI.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sat, Jan 21, 2023 03:20 PM UTC:

I'm having a problem with Suzumu Shogi's interactive diagram. I managed to get the Fire Demon's burning restriction implemented properly in the pieceZone function using the clicks array, but as it turns out, clicks is not used by the AI's move generator, so the AI doesn't work properly. I was wondering if there is a similar array used by the AI to keep track of the squares it visits?

In case you need it, here is the relevant portion of the pieceZone code and its supporting functions (I left the rest out, since it is quite complicated)

function pieceZone(x2, y2, piece, color, x1, y1, ex, ey)
{
  if(touched) return 0; // not during ShowMoves()
  // ... Heavenly Tetrarch Section ...
  // Fire Demon
  v = board[y2][x2] & 511; // Highlight square
  firstX = (clicks.length >= 4) ? clicks[2] : -1;
  firstY = (clicks.length >= 4) ? clicks[3] : -1;
  firstVictim = (clicks.length >= 4) ? board[firstY][firstX] & 511 : -1;
  secondX = (clicks.length >= 6) ? clicks[4] : -1;
  secondY = (clicks.length >= 6) ? clicks[5] : -1;
  secondVictim = (clicks.length >= 6) ? board[secondY][secondX] & 511 : -1;
  if(isBurner(p))
  {
  // Always allow starting square
  if(x2 == x1 && y2 == y1) return 0;
  // Reject captures of Fire Demon outside normal range
  if(isBurner(v) && !nonBurningRange(x1, y1, x2, y2)) return 1;
  // Allow direct capture of Fire Demon with second burn after first burn
  if(firstVictim > 0 && !isBurner(firstVictim) && clicks.length == 4)
  {
    if(isBurner(v) && nonBurningRange(x1, y1, x2, y2) && canBurn(x2, y2, firstX, firstY)) return 0;
  }
  // If first victim is a Fire Demon, allow move to start square, reject moving to empty square or burning another Fire Demon
  if(isBurner(firstVictim))
  {
  // Always allow starting square
  if(x2 == x1 && y2 == y1) return 0;
    // If a Fire Demon was captured via igui, always allow second burn of Fire Demon
    if(isBurner(firstVictim) && secondX == x1 && secondY == y1) return 0;
      // if second victim is not an empty square or a Fire Demon, only allow single burn
      if(secondVictim > 0 && !isBurner(secondVictim)) return !(x2 == secondX && y2 == secondY);
      // Reject moves to empty square or burn of Fire Demon
      else return (v == 0 || (isBurner(v) && (x2 != firstX || y2 != firstY)));
    }
    // If first victim is not a Fire Demon, allow direct capture with optional second burn, reject burn of another Fire Demon
    else
    {
      if(firstVictim != -1 && !isBurner(firstVictim))
      {
        if(isBurner(v)) return 1;
      }
    }
  }
  // ... Range Capturing Pieces Section ...
  return 0;
}

A. M. DeWitt wrote on Sun, Jan 22, 2023 12:05 AM UTC in reply to H. G. Muller from Sat Jan 21 04:26 PM:

Very useful information. Unfortunately it requires me to go back to the drawing board...


A. M. DeWitt wrote on Sun, Jan 22, 2023 04:42 AM UTC:

Unfortunately, I wasn't able to find a solution for implementing the burning restriction for the AI other than disabling the AI. It mainly has to do with the fact that the move generator will auto-complete the move if it thinks only one move is left if I try to use the killX and killY arrays instead of the clicks array.


A. M. DeWitt wrote on Sun, Jan 22, 2023 02:30 PM UTC in reply to H. G. Muller from 10:32 AM:

I think it is better to just show you the difference. You can find the demonstration diagrams here.


A. M. DeWitt wrote on Mon, Jan 23, 2023 01:20 AM UTC in reply to H. G. Muller from Sun Jan 22 08:54 PM:

I did notice that the kills variable wasn't being updated upon selection of a locust victim when I did some debugging of my own. The killX and killY arrays would update, but kills would always be zero. That would explain why when I tried recreating the clicks array using the visits array (using kills to regulate the length of the killX and killY arrays), it always ended up failing.


A. M. DeWitt wrote on Mon, Jan 23, 2023 06:43 PM UTC in reply to H. G. Muller from 09:27 AM:

Some other remarks: You use (af)0 to force a slide on a K atom, but this is not recommended. Because (af)0K is expanded by pre-processing to KafKafafKafafafK..., as if every distance is a separate move, which would be attempted independently. So if the slide is blocked at the second square (so that afK would fail to produce a move) it would still keep trying afafK etc. And when afafafK was a valid non-capture, it would still again check the first four squares for emptiness when attempting afafafafK and longer paths. The equivalent plain Q would do much more efficiently, and probe each square on the path only once, and stop after it finds an occupied one. You can turn the Q into K for the burning by using ya to specify a range toggle. E.g. mpyacabQ would describe a Queen burning one enemy adjacent to her destination.

Sure, (af)0mpacabK is inefficient, but under the current implementation, it's the only Betza string that gives all options for the Fire Demon's burn. Using ympacabQ omits some of these options for some reason.

I suppose I should put the code that moves the destination click earlier inside a loop, so that it is able to pass locust vctims as lon as the preceding two legs have a cab structure. Then the double burnings could be entered by first clicking the destination, and then picking off the burn victims until you run out of victims, or click the destination again to terminate the move. That would be a much more intuitive way for entering multiple burns.

It would also make implementing the burning restriction much simpler, as then I don't have to worry about branching cases nearly as much, as it would usually be the same check every time (usually, not always, because shooting an adjacent Fire Demon without moving (double igui) is still allowed).

Right now I am supressing the new Highlight function with the old one, since the current code in Suzumu Shogi's interactive diagram relies on the call from the Highlight function. Once the pass for cab locust captures is implemented, I should be able to use the new function without any problems.


A. M. DeWitt wrote on Tue, Jan 24, 2023 04:43 PM UTC in reply to H. G. Muller from 12:12 PM:

The extensive testing you do in BadZone() slows things down enormously. It is questionable whether this variant can ever be played by the Diagram's AI, (it outlasted my patience even at 2 ply), but this extra processing certainly doesn't help. If you need this amount of programming to make it work, it might be simpler to just replace some functions of the original script by slightly modified ones of your own. JavaScript allows you to redefine a function.

The amount of testing required for the Fire Demon was mainly because of the branching cases. With the new version, not only was I able to use the code from your comment to make the check much shorter, I was even able to remove three of the supporting functions because of this. As for code in general, sure, it will slow things down a lot, but that is to be expected from a complex game like Suzumu Shogi. You could treat it like a correspondence game in GC, though, so I was never too worried about it being too slow. I could probably do some optimization (I've saved this comment in my favorites), but right now I am just happy that everything is working properly.


A. M. DeWitt wrote on Wed, Jan 25, 2023 03:24 AM UTC:

OK, I think I fixed it. The Betza compiler now refrains from inserting these 'loop directives' in the legs sequence when the NewClick move-entry method is used. I had to change some tests in the assignment of click sequences (which already relied on the presence of these directives) too. Distant or sliding rifle captures do not require the click to the final destination. This might be a folly, though, as it causes ambiguity when both the rifle and normal capture are allowed on the piece. Perhaps I should make this subject to a Diagram parameter autoComplete, and in general require all clicks, but consider the move entered when there is only one matching move left in the list, and at least two clicks have been given.

I am not even sure that swapping the order of locust victim and destination is always harmless, or whether it could lead to ambiguities too.

There does seem to be a problem when using the Lion Dog (XBetza: KADGHcavKabKmpafcavKcafcmpavK) with the newClick generation. When doing a double capture of the first two pieces in a straight line, and you click the second piece again, it always selects the two out one in option. This is probably due to the ambiguity caused when rifle captures and normal captures are allowed. I am planning on reviving Hook Shogi, and I intend to include the Lion Dog in it, so any help would be greatly appreciated.

I think the best solution would be some directive specifically for this kind of ambiguity, or to only skip a locust victim after cab if that locust victim's square is the only one that can be visited, so as to not destroy the directives that allow the Suzumu Fire Demon's burning restriction to work properly.


A. M. DeWitt wrote on Fri, Jan 27, 2023 12:25 AM UTC in reply to H. G. Muller from Thu Jan 26 09:45 PM:

Thanks for fixing that. To be honest, I was a bit worried that the Suzumu Fire Demon might get messed up, but it turns out I was overreacting. And now that the Lion Dog works properly as well, I can include it and the Suzumu Fire Demon in the same game without needing to use any special code (apart from BadZone for the burning restriction, of course).

As for the paralyze parameter, I'm not sure whether it would actually increase efficiency or not. If paralyze doesn't suspend the BadZone call after move generation you would end up calling it twice instead of once, so it could slow things down even more if I am not careful with it. So for now, I am just going to keep Suzumu Shogi's BadZone code as it is.

I did encounter another minor bug. The highlights for the ShowMoves() function seem to be a bit bugged when using the new move generation. For example, when showing the possible moves of a piece after clicking its name, the Suzumu Fire Demon doesn't show the burn for its ranging moves, and hook moving pieces only show the hook moves for the first square in each direction. It appears to only be affecting atom such as R, B, and Q. It doesn't affect the diagram when clicking pieces on the actual board, but it can be a bit misleading. Thankfully, this shouldn't be too difficult to fix.


New Submissions for Review. A listing of all submissions still awaiting editorial approval.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Jan 27, 2023 01:44 AM UTC in reply to Fergus Duniho from Sat Apr 16 2022 09:36 PM:

What if you sorted based on the timestamp of the last action taken for each article? That way you don't have to worry about unset modification dates, and you can see which articles have changes ready for review.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Jan 27, 2023 07:59 PM UTC in reply to H. G. Muller from 04:13 PM:

I now also made promotion to empty square ('kamikaze capture') possible; it can be specified in the captureMatrix by a 0 (zero), and requested from the WeirdPromotion() custom script by returning 251 for the promotion piece. This means that it would now also be possible to implement the passive burning ability of a Tenjiku Shogi Fire Demon, by detecting in WeirdPromotion() whether a move lands next to an enemy Demon, and return 251 in that case.

Now all that is needed to successfully implement a interactive diagram for Tenjiku Shogi is to give WeirdPromotion the ability to affect other squares.

Edit: I tested this in an interactive diagram of Tenjiku Shogi, and the piece does get removed, but the diagram still thinks there is a piece there.


A. M. DeWitt wrote on Sat, Jan 28, 2023 01:35 AM UTC in reply to H. G. Muller from Fri Jan 27 09:13 PM:

Speaking of XBetza (or rather, IBetza), you should really consider adding a link to your page on Extended Betza Notation to this page. Even if it is not strictly identical to the one used in the interactive diagrams it would be a very helpful edition. I did check for a link to that page before writing this, and I couldn't find one.

The new definition for t could be quite interesting. It also helps that kc covers the old function of t (excluding capture of royals).


A. M. DeWitt wrote on Sat, Jan 28, 2023 02:49 PM UTC in reply to H. G. Muller from 01:26 PM:

Sounds awesome. Only problem is that returning 512 for the promomtion it doesn't work like it should. Instead of burning adjacent pieces it simply burns the moving piece as if you returned 251 for the promotion.


A. M. DeWitt wrote on Sat, Jan 28, 2023 04:06 PM UTC in reply to H. G. Muller from 03:52 PM:

It works now.


Tenjiku Shogi. Fire Demons burn surrounding enemies, Generals capture jumping many pieces. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sat, Jan 28, 2023 09:36 PM UTC in reply to H. G. Muller from 09:21 PM:

I also experienced this bug with contagious promotions. It seems the shogi promotion prompt is suppressing the WeirdPromotion result.


Variants playable against the diagram's AI. (Updated!) Index of variants that can be played against the interactive diagram.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Feb 3, 2023 12:42 AM UTC:

Mitsugumi Shogi seems to be missing. It doesn't have as many problem pieces as its big brother Suzumu Shogi, so it can be added to the list without much trouble. I've also successfully tested a modified NextLeg function, which relieves the AI from having to use cumbersome recursive functions to vet moves for the range capturing pieces, which I will implement in the CVP articles soon.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Feb 3, 2023 03:29 AM UTC:

The Review New Submissions page seems to be skewed towards new submissions now, rather than submissions that have new changes ready for review. This makes approving pages much harder, as you will only see the newest pages rather than the ones that have changes ready for review. Perhaps if the page is sorted by the timestamp of the last action taken on each article this can be rectified without having to worry about the unreliable modification date.

update test


Suzumu Shogi. 16x16 variant based on Tenjiku Shogi. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Fri, Feb 3, 2023 10:08 PM UTC:

Suzumu Shogi is ready


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sat, Feb 4, 2023 12:34 AM UTC:

Also, I am getting this error whenever I try to update my previous comment:

Attempting to update comment.

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `CommentID` = ?' at line 1

Update of Comment with ID of 46749 failed.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Feb 5, 2023 03:46 PM UTC:

There is something wrong with the diagram for Desert Pub Chess. When the AI moves, it seems to spuriously remove pieces from the board in unpredictable ways. Furthermore, this bug also affects the desert pieces, causing them to not capture properly when they capture more than once.

Normal Move Bug Replication

Move each pawn forward one at a time, you should see the opponent's pawns add locust squares (the dull red highlights) when moving. Eventually the AI will make a Knight move that removes a friendly pawn. 

Desert Piece Bug

Make the following moves manually:

1. e2e4 f2g4 2. Fc8d5

Then open the AI dashboard and move a white piece. You will see some very strange behavior (only one white pawn gets captured and the other is "moved" to a different square).


Variants playable against the diagram's AI. (Updated!) Index of variants that can be played against the interactive diagram.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Feb 5, 2023 05:04 PM UTC:

(Same as old page, but with the hyphen removed)


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Tue, Feb 7, 2023 03:37 PM UTC:

Does trackPieces=N track the pieces around pieces of type N if spell is not set?


A. M. DeWitt wrote on Wed, Feb 8, 2023 02:54 AM UTC in reply to H. G. Muller from Tue Feb 7 05:38 PM:

That's a really nice feature. For example, it saves a huge amount of time in the diagrams for Suzumu Shogi and Mitsugumi Shogi from not having to check nearly as many locations for Heavenly Tetrarches (which which immobilize non-Tetrarch pieces) during move vetting. I've now implemented the new code in the Rules pages for these games.

Also, can you approve the Rules pages for Suzumu Shogi and Mitsugumi Shogi? I've been waiting rather patiently, and their corresponding GC Preset pages have been approved, but the editors haven't seemed to notice the Rules pages, possibly due to the new sorting method for the Review New Submissions page.


A. M. DeWitt wrote on Wed, Feb 8, 2023 05:56 PM UTC in reply to H. G. Muller from 08:03 AM:

I don't know how to approve articles; I limit my activities as editor to inserting Interactive Diagrams in existing articles, and improving the infra-structure for doing this. I am the only editor working on this task, and it doesn't seem a good idea to reduce the time I can spend on it by also taking up tasks that other editors can do.

That's OK. I assume you passed that along to another editor, and they approved it themselves.


A. M. DeWitt wrote on Thu, Feb 9, 2023 03:53 AM UTC in reply to H. G. Muller from Wed Feb 8 07:21 PM:

It would be a misconception to think editors communicate amongst each other by any other means than the comments you can read here...

Well, whatever the case, the issue is settled. I'll let you get back to working on the Interactive Diagram code.


A. M. DeWitt wrote on Thu, Feb 9, 2023 07:46 PM UTC in reply to H. G. Muller from 09:07 AM:

BTW, the tracking, and thus the marking the spell zone of the indicated piece, currently only works correctly if there are not more than two pieces of that type in play. Otherwise it will loose track of some of the pieces. The current way I use for tracking just keeps two locations (in loc[coloredType] and loc[coloredType+512]), of the last two pieces of that type that were moved during the search. (And it then only marks the spell zones around those.) Now this is fine for Mitsugumu Shogi, but in Suzumu Shogi there can potentially be 4 Tetrarchs. This is of course unlikely to happen in a real game, so perhaps we should not worry about it at all.

I can switch to a more robust way of tracking, able of handling an arbitrary number of pieces of the same type. This would cause a slight slowdown, though. Which is a pity, as almost no game would use it. An cheaper alternative would be to allow requesting spell zones around more than one piece type, so that piece types of which there can be more than two instances can be artificially split into two identical types. The location of each piece is tracked anyway, it is just a matter of marking the squares around the designated types before every move generation, and pieces where only a single type cause spells would not experience a delay by this.

It would even be possible to mark the spell zones of different types differently, e.g. as nodes | (1<<(24+K)) for the Kth spell zone. This would allow, say, freezing and burning in the same Diagram. The test for being in the zone would than have to be (neighbors[sqrNr] & 0xFFFFFF) == nodes. I wonder if all that complexity would be worth it, though. I am not even aware of any variants that would need it.

You could increase the cap of instances of one type for trackPieces to four without much trouble. This would take care of the 3+ Tetrarches problem in Suzumu Shogi while leaving plenty of room to handle the vast majority of cases. However, the more robust tracking method would be preferred for games using Chess-style promotion (you could have up to (#startingSpellPieces)+(#piecesPromotableToSpellPieces) pieces with spell effects).

As for multiple spells, I agree would not worry about that right now, as I can't see any variants that will be using that either. Besides, there is also the frozen variable, the 251 kamikaze promotion, and the 512(+[bits]) promotion methods, which can be used to implement spells in the xxZone, xxxPromotion, and xxxTinker scripts withouts using the spell parameters.

@Adam: I see that you are using your own markers. Beware that I have added a new marker (markerFFF000.png), which the betzaNew.js script uses for indicating moves of a piece that has active burning defined for it through the captureMatrix in the move diagrams. It then also indicates the blastZone on hovering, by making the background of the burned squares around the indicated target grey.

Thankfully that's very easy to do, as my markers are all simple circles.


A. M. DeWitt wrote on Sun, Feb 12, 2023 04:17 PM UTC:

Would it be possible to implement a system to allow the inclusion of pieces with multiple-character IDs in the Diagram parameters that use them? If you need suggestions for how to implement something like this, Fergus uses a system in his FEN parser for Game Courier that surrounds multi-character piece IDs in {} curly brackets (e.g. {+P} for promoted Shogi pawn).

P.S. Those empty comments were me trying to insert this comment while I was not logged in, which may be the result of a bug.


A. M. DeWitt wrote on Tue, Feb 14, 2023 04:34 AM UTC in reply to H. G. Muller from Sun Feb 12 09:17 PM:

I guess I don't really need the curly bracket enclosures.

However, I do need help with captureMatrix. I'm trying to use it to replace the modified NextLeg Function in Suzumu Shogi and Mitsugumi Shogi, and it works, but it seems to exclude certain cases where hops should be allowed (such as hopping over a lower-ranking friendly piece). Strangely, Minjiku Shogi does not have this problem. The captureMatrix value I have so far is this:

captureMatrix=//////////////////////////27^27,27^60,27^28,27^61,27^34,27^64,27^35,27^65,27^37,27^46/28^27,28^60,28^28,28^61,28^34,28^64,28^35,28^65,28^37,28^46//////34^34,34^64,34^35,34^65,34^37,34^46/35^35,35^65,35^37,35^46/////////////////////////60^27,60^60,60^28,60^61,60^34,60^64,60^35,60^65,60^37,60^46/61^27,61^60,61^28,61^61,61^34,61^64,61^35,61^65,61^37,61^46/././64^34,64^64,64^35,64^65,64^37,64^46/65^35,65^65,65^37,65^46
 


chessshogi wrote on Tue, Feb 14, 2023 06:44 PM UTC in reply to H. G. Muller from 08:06 AM:

Now I've got it figured out. Thanks to this, I no longer need the modified NextLeg function (jumpClass is still needed to for the multi-captures though).


A. M. DeWitt wrote on Tue, Feb 14, 2023 07:05 PM UTC in reply to H. G. Muller from 08:06 AM:

Now I have it figured out. Thanks. I'll also redo the Tenjiku Diagram so it uses captureMatrix instead.


Tenjiku Shogi. Fire Demons burn surrounding enemies, Generals capture jumping many pieces. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Tue, Feb 14, 2023 09:07 PM UTC:

Here's an Interactive Diagram for Tenjiku Shogi (following Wikipedia/CVP ruleset).

satellite=wikipedia files=16 ranks=16 holdingsType=0 promoOffset=35 promoZone=5 maxPromote=30 promoChoice=+ royal=35 royal=44 captureMatrix=/"25/.27^^.4^3.8^.13^^..^^=/"//"3/.33^3.8^.17^^=/.34^^.8^.18^=//"22/.27^^.4^3.8^.13^^..^^=/"///.33^3.8^.17^^=/.34^^.8^.18^=//@66/" stalemate=win graphicsDir=https://www.chessvariants.com/graphics.dir/tenjikushogi/ whitePrefix= blackPrefix=flip/ lightShade=#FFFF80 darkShade=#FFFF80 graphicsType=gif squareSize=36 symmetry=rotate firstRank=1 rimColor=#000000 coordColor=#FFFFFF newClick=1 trackPieces=65 trackedTypes=2 spell=burn spellZone=K blastZone=K atomicCapture=0 pawn:P:fW:Pawn:a5-p5 dog:D:bFfW:Dog:e6,l6 iron general:I:fFfW:IronGeneral:d1,m1 copper general:C:fFvW:CopperGeneral:e1,l1 silver general:S:FfW:SilverGeneral:f1,k1 ferocious leopard:FL:FvW:FerociousLeopard:c1,n1 gold general:G:WfF:GoldGeneral:g1,j1 blind tiger:BT:FsbW:BlindTiger:f2,k2 drunk elephant:DE:FsfW:DrunkenElephant:i1 knight:N:fN:Knight:b1,o1 kirin:KY:FD:Kyrin:g2 phoenix:PH:WA:Phoenix:j2 lance:L:fR:Lance:a1,p1 reverse chariot:RV:vR:ReverseChariot:a2,p2 side mover:SM:vWsR:SideMover:a4,p4 vertical mover:VM:sWvR:VerticalMover:b4,o4 side soldier:SS:bWsRfW2:SideSoldier:a3,p3 vertical soldier:VS:bWfRsW2:VerticalSoldier:b3,o3 bishop:B:B:Bishop:c3,n3 rook:R:R:Rook:c4,n4 dragon horse:DH:BW:DragonHorse:d3,m3 dragon king:DK:RF:DragonKing:e3,l3 horned falcon:HF:BsbRfWfDfcavWfabW:HornedFalcon:d4,m4 soaring eagle:SE:RbBfFfAfcavFfabF:SoaringEagle:e4,l4 lion:LN:KNADcaKmcabK:Lion:h2 queen:Q:Q:FreeKing:i2 bishop general:BG:B(paf)0kcB:BishopGeneral:f4,k4 rook general:RG:R(paf)0kcR:RookGeneral:g4,j4 chariot soldier:CS:BvRsW2:ChariotSoldier:c2,d2,m2,n2 water buffalo:WB:BsRvW2:WaterBuffalo:f3,k3 free eagle:FE:QADcaFmcabF:FreeEagle:i3 lion hawk:LH:BWNADcaKmcabK:LionHawk:h3 vice general:VG:B(paf)0kcB(a)2KabK:ViceGeneral:i4 great general:GG:Q(paf)0kcQ:GreatGeneral:h4 value=3500 king:K:K:King:h1 tokin:+P:WfF:PawnP: multi general:+D:bBfR:DogP: vertical soldier:+I:bWfRsW2:IronGeneralP: side mover:+C:vWsR:CopperGeneralP: vertical mover:+S:sWvR:SilverGeneralP: bishop:+FL:B:FerociousLeopardP: rook:+G:R:GoldGeneralP: flying stag:+BT:FsWvR:BlindTigerP: prince:+DE:K:DrunkenElephantP: side soldier:+N:bWsRfW2:KnightP: lion:+KY:KNADcaKmcabK:KyrinP: queen:+PH:Q:PhoenixP: white horse:+L:fBvR:Lance: whale:+RV:bBvR:ReverseChariotP: free boar:+SM:BsR:SideMoverP: flying ox:+VM:BvR:VerticalMoverP: water buffalo:+SS:BsRvW2:SideSoldierP: chariot soldier:+VS:BvRsW2:VerticalSoldierP: dragon horse:+B:BW:BishopP: dragon king:+R:RF:RookP: horned falcon:+DH:BsbRfWfDfcavWfabW:DragonHorseP: soaring eagle:+DK:RbBfFfAfcavFfabF:DragonKingP: bishop general:+HF:B(paf)0kcB:HornedFalconP: rook general:+SE:R(paf)0kcR:SoaringEagleP: lion hawk:+LN:BWNADcaKmcabK:LionP: free eagle:+Q:QADcaFmcabF:FreeKingP: vice general:+BG:B(paf)0kcB(a)2KabK:BishopGeneralP: great general:+RG:Q(paf)0kcQ:RookGeneralP: value=3500 heavenly tetrarch:+CS:jvhQjsQ3cabK:ChariotSoldierP: fire demon:+WB:shQ(a)2KabK:WaterBuffaloP: fire demon:FD:shQ(a)2KabK:FireDemon:g3,j3

Mitsugumi Shogi. Smaller variant of Suzumu Shogi on a 13x13 board. (13x13, Cells: 169) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Tue, Feb 14, 2023 09:32 PM UTC in reply to Fergus Duniho from 08:36 PM:

The 404 script is logging many 404 errors from this page for graphic images.

The paths from the errors are the paths used in the diagrams on my computer. I already fixed that.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Tue, Feb 14, 2023 09:50 PM UTC in reply to H. G. Muller from 08:06 AM:

Speaking of captureMatrix, I updated the Tenjiku Shogi Interactive Diagram to use it, and I noticed that the burn marker was only being used on the last piece that had burning abilities from captureMatrix. You can see it in action by clicking the link and promoting a Water Buffalo and clicking the newly gained Fire Demon, and then compare it to one of the original Fire Demons.


Hook Shogi. 16x16 variant with the hook movers from the largest Shogi variants. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Thu, Feb 16, 2023 02:48 AM UTC in reply to Fergus Duniho from Tue Feb 14 10:31 PM:

The 404 script has logged a bunch of 404 errors from this page for graphic images.

Thanks for letting me know, but reporting it isn't necessary. When the errors pops up, I immediately notice that the interactive diagram on the page is blank (the path used is the one for the interactive diagrams on my personal computer) and fix the error.


💡📝A. M. DeWitt wrote on Thu, Feb 16, 2023 09:45 PM UTC:

Hook Shogi is ready


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Feb 17, 2023 01:22 AM UTC:

Is there a way to tell if a piece is protected or not in the custom scripts when using the new move generation system? I just revived Hook Shogi, and I would like to include Maka Dai Dai Shogi's Emperor in the game, but I'm not sure how to do that using the custom script when using newClick=1.


Minjiku Shogi. Wild shogi variant, with pieces that burn neighbors or jump many pieces. (10x10, Cells: 104) [All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Feb 17, 2023 02:17 AM UTC:

I updated the Tenjiku Shogi Interactive Diagram to use captureMatrix, and I noticed that the burn marker was only being used on the last piece that had burning abilities from captureMatrix. You can see it in action by clicking the link and promoting a Water Buffalo and clicking the newly gained Fire Demon, and then compare it to one of the original Fire Demons.

Edit: Also, the orthogonal jumper has the XBetza R(paf)8R. Did you mean R(paf)8cR?


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sat, Feb 18, 2023 04:21 PM UTC:

Before I forget, I gave you that Mitsugumi Shogi link for the Variants playable against the diagram's AI page. It's in the top comment.


Shoko Shogi. Smaller variant of Hook Shogi on a 13x13 board. (13x13, Cells: 169) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Sun, Feb 19, 2023 03:29 AM UTC:

Shoko Shogi is ready


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Mon, Feb 27, 2023 11:13 PM UTC:

This time I made it so you can toggle between the two movesets I am considering for the Shima (more test cases basically). The bug seems to only occur when the AI makes a zigzag pair of forward jump captures.

  • Original Shima (KaK): 1. Ca3 cd6 2. Cf3 Ce4 3. cd3 Cc5 4. Sb3 Cc6 5. hg3 Cg4 6. de3 h6 7. h3 Cc6 8. d4 Ce6 9. c3 b6 10. Sb4 a5 11. Sb5 Cc7 12. Gd2 Cxb5=S 13. Cxb5=S a6 14. Sc4 Gb7 15. Gg2 de6 16. b3 Sb6 17. Ch2 Kd8 18. Cg4 hg6 19. Cxc6 Gxc6 20. Sxa5 b5 21. Sa3 Rxa3=S 22. Rxa3=S f6 23. a4 Ge7 24. axc6 Sxc6 25. g4 d5 26. Ge3 e6 27. f3 Sb6 28. Sb4 Sc6 29. de4 Sc4 30. Gd3 gf5 31. Gxc4=S f5xg4xf1=G
  • Multi-capturing Shima (Kmca(b)1K): {2053676357} 1. Ca3 cd6 2. Cf3 Ce4 3. cd3 Cc5 4. Sb3 Cc6 5. hg3 Cg4 6. Cc2 Cf6 7. Cb4 Cxb4 8. Sxb4xb3 Gg8 9. Cg5 de6 10. bc3 ef6 11. Ce4 Cxe4 12. d3xe4xd7

The last move of each only captures one of the victims it intended to capture. It appears that this bug is a niche case.

Edit: The AI has also gone completely out of whack. It will only move the black pieces as of right now.

KaK

files=8 ranks=8 holdingsType=1 promoChoice=*R*G*CP stalemate=win graphicsDir=../membergraphics/MSyangsi/ whitePrefix=w blackPrefix=b lightShade=#FFCC9C darkShade=#CF8948 graphicsType=png?nocache=true squareSize=50 symmetry=mirror firstRank=1 borders=0 rimColor=#000000 coordColor=#FFFFFF newClick=1 pawn::mfFcaf(macaf)3F:pawn:a2-h2 cavalier::N0:knight:b1,g1 general::FsW:bishop:c1,f1 chariot:R:R:rook:a1,h1 shima::KaK:queen:d1 king:K:K:king:e1

A. M. DeWitt wrote on Tue, Feb 28, 2023 03:47 PM UTC in reply to H. G. Muller from 10:27 AM:

I cannot reproduce any of this. If I enter the second game by hand up to 11. Ce4, switch on the AI and then play Cxe4, it replies with a double capture, and both victims disappear.

It doesn't seem to happen in Chrome, but it does occur in Microsoft Edge. Strange. But like I said, the bug seems to be a niche case, apparently more so than I was expecting.

Edit: It does happen in chrome, but under different circumstances. So strange...

I agree that the SAN needs reworking. As it is now, it also gets stuck on castling moves when the move has a tilde (~) in it.


Desert Pub Chess. A game where Desert Wazirs & Desert Ferz capture by jumping. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Tue, Feb 28, 2023 04:02 PM UTC:

A most interesting game. It inspired me to come up with a game with a similar mechanic. It took a while, but I've finally managed to come up a worthy variant, called Shuka.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sat, Mar 4, 2023 02:33 AM UTC:

If you press the Move button repeatedly in any diagram using betzaNew.js, the AI will only move one side's pieces.


A. M. DeWitt wrote on Thu, Mar 9, 2023 03:13 PM UTC:

Castling seems to have this weird bug where the diagram thinks it can make an unloading move with the castled Rook (or King (?)) if another move hasn't been made since.

files=8 ranks=8 holdingsType=1 stalemate=win graphicsDir=../membergraphics/MSyangsi/ whitePrefix=w blackPrefix=b lightShade=#FFCC9C darkShade=#CF8948 graphicsType=png?nocache=true squareSize=50 symmetry=mirror firstRank=1 borders=0 rimColor=#000000 coordColor=#FFFFFF newClick=1 pawn:::pawn:a2-h2 knight:N::knight:b1,g1 bishop:::bishop:c1,f1 rook:::rook:a1,h1 queen:::queen:d1 king:::king:e1

A. M. DeWitt wrote on Fri, Mar 10, 2023 06:11 PM UTC:

I also discovered that demotion of promoted pieces doesn't occur for captured pieces going into the hand when using Shogi-style promotions. Perhaps this can be parameterized to account for variants with different drop rules than Shogi.


MSshuka[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Thu, Mar 16, 2023 06:09 PM UTC:

The item ID of this page is incorrect. It should be "MSshuka" instead of "MSshoka".


A. M. DeWitt wrote on Thu, Mar 16, 2023 08:06 PM UTC in reply to Fergus Duniho from 06:35 PM:

I'm trying to either delete MSshuka (with a u), or copy the text in this page over to MSshuka and then delete MSshoka. Apparently, MSshuka didn't fully delete when I tried to do it the first time. This is what the page says when I go to MSshuka:

<404 Error Stuff>

ItemID is MSshuka

A record of this page is still in the database, and it indicates that the page has been deleted.

In other words, the database still has the MSshuka record, but it has been tricked into thinking it has been deleted.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Thu, Mar 16, 2023 08:28 PM UTC:

I noticed a minor bug that makes the jump highlights for black pieces yellow instead of orange.


MSshuka[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Thu, Mar 16, 2023 11:56 PM UTC in reply to Fergus Duniho from 10:05 PM:

Thanks.


MPshuka[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sat, Mar 18, 2023 03:35 AM UTC:

Shuka is ready


Ludii PortalA website
. The home of Ludii, a general game system that can play the full range of traditional strategy games, including chess variants. () [All Comments] [Add Comment or Rating]
📝A. M. DeWitt wrote on Sat, Mar 18, 2023 01:31 PM UTC:

Ludii Portal is ready


📝A. M. DeWitt wrote on Sat, Mar 18, 2023 05:20 PM UTC:

It makes sense that Ludii would not play very well. The AI is designed to play a much wider array of games, and it has to sacrifice some performance to do that.


Great Whale Shogi. Great Whale Shogi by R. Wayne Schmittberger. (11x11, Cells: 121) [All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Mon, Mar 27, 2023 03:37 PM UTC:

Unfortunately, the quality of this page is severely lacking. Most of the page is just text, and that text isn't even separated into paragraphs to make reading easier. Furthermore, the few pictures that are present do not describe the game very well, and in particular, the picture describing the piece movements is so tiny that it is impossible to map the piece movements to the pieces in the setup photo. TBH, as it is now, I'm amazed that this paged even got approved in the first place.

That being said, having multi-capturing pieces in a variant with drops is quite an interesting idea that I have never seen before. I am thinking about doing something similar in the future.


A. M. DeWitt wrote on Mon, Mar 27, 2023 03:50 PM UTC:

The text is much better than before, but my point about the picture of the movement diagrams still stands.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Apr 2, 2023 03:01 PM UTC:

Perhaps there could be a way to allow usage of the special characters in piece IDs in parameters like morph and captureMatrix? Maybe using {} curly brackets to enclose IDs using one of these special characters (e.g. {+P} for a Tokin (promoted Shogi Pawn))? In particular, the +[A-Z] ID is quite common in certain Shogi variants.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Tue, Apr 11, 2023 12:18 AM UTC:

It seems that the script for editing a page's index information is a bit broken. For example, I am trying to check the fields 2d and Shogi-based for MSshuka and MPshuka because I forgot to do so when initially creating them, but every time I try to do so, it doesn't work. This is the case even if I delete them and restore them afterwards. Any help would be greatly appreciated.

Edit: I thought I'd create a page for Honno Shuka (Shuka + 1 Chu Shogi Queen, placed halfway b/w the Bishop and Rook at setup), which bridges the gap between Shuka and Shosu Shogi, before deciding that the game should be kept under Shuka's lore section. However, now that I am trying to delete MShonnoshuka, I am having the same problem that I encountered when I accidentally made MSshoka instead of MSshuka. Namely, MShonnoshuka is still in the database, but the database has been tricked into thinking MShonnoshuka has been deleted.


A. M. DeWitt wrote on Tue, Apr 11, 2023 02:04 AM UTC in reply to Fergus Duniho from 01:33 AM:

It is the "Edit Index Information" script in the Edit tab in the top menu.

Edit: I've decided to change the name of Shuka to Seireigi.


Seireigi. Variant of standard Shogi with promotable Gold Generals, as well as more varied and animalistic promotions. (9x9, Cells: 81) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Thu, Apr 13, 2023 08:44 PM UTC:

Seireigi is ready.


💡📝A. M. DeWitt wrote on Thu, Apr 13, 2023 11:43 PM UTC in reply to Fergus Duniho from 09:43 PM:

The Abstract pieces look terrible, which I'm saying as the creator of the original design. Why not just use the Symbolic pieces, which look much better, and have already been made for Shogi from the Abstract pieces? Also, we have much better-looking Kanji and half-Kanji pieces available. Just take a look at the sets already being used for Shogi in Game Courier.

I've copied the appropriate images from Eric Silverman's 1kanji set from Ai Ai to use in my diagram in place of the old images (the Mnemonic setup diagrams are still present, to aid in mapping pieces to their correspinding moves). The rest of the page should be good to go, as it is done in a similar format to my other Shogi variant pages.


💡📝A. M. DeWitt wrote on Fri, Apr 14, 2023 01:07 AM UTC in reply to Fergus Duniho from 12:49 AM:

The changes are there, but you will need to refresh the cache of either your browser or the site to see them. All the image links have the ?nocache=true suffix, so they will change immediately once this is done.


Seireigi. Variant of standard Shogi with promotable Gold Generals, as well as more varied and animalistic promotions. (9x9, Cells: 81) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Fri, Apr 14, 2023 01:07 AM UTC:

Seireigi is ready.


Seireigi. Variant of standard Shogi with promotable Gold Generals, as well as more varied and animalistic promotions. (9x9, Cells: 81) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Fri, Apr 14, 2023 01:45 AM UTC in reply to Fergus Duniho from 01:09 AM:

I removed all the old pieces. That said, I can make Mnemonic pieces pretty easily. It's just a matter of forming the templates, and then making pieces from those templates.

Also, the checkered board is an intentional design choice, in case you were wondering.

Edit: I've uploaded enlarged Mnemonic images for Seireigi and the ability to switch between the Mnemonic and Kanji sets (refresh browser cache).


💡📝A. M. DeWitt wrote on Fri, Apr 14, 2023 03:28 PM UTC in reply to H. G. Muller from 07:25 AM:

I'm currently experimenting with adding linear Lion moves to the Violent Wolf and Drunk Elephant. Surely, those will have an impact. They would have the same limitations as their current iterations, but would be able to tear through defenses easier, while still being short range.

Edit: For now, in my experiments on piece moves, I have given the Violent Wolf and Drunk Elephant the ability to step twice in a straight line, or jump two squares, along the forward orthogonal and forward diagonals, respectively.


💡📝A. M. DeWitt wrote on Fri, Apr 14, 2023 05:41 PM UTC in reply to H. G. Muller from 04:44 PM:

It would give the variant much less 'Shogi feel' when you introduce such an exotic move. I am also not sure whether in Shogi Soaring-Eagle-like Lion capture would do really much more than a two-square jump (or even slide). The locust capture is mainly dangerous because it can eliminate protected pieces. But in Shogi the main factor that determines the value of a piece is how effective it is in checking a King. And there you don't care whether it was protected or not. Starting to hunt for other material by dropping, promoting, capturing takes too long, and you would probably be checkmated before you get the opportunity to drop the piece you gained by it.

Good points.

Although I think that in Shogi the promotion Silver to Gold was mainly motivated by uniformity, it is not an entirely useless promotion. When dropping a Silver in front of the King to check the latter, the King can evade by stepping next to the Silver. The latter can then pull backwards to renew the check, and by promoting to Gold in the process it can make sure the King now has to retreat.

The same could be said for the Drunk Elephant (or non-royal King). While it may take too long to actually move it, it can still do things that the other pieces might struggle with, such as checkmating a King from the side. That being said, I don't think the double step options will work. For now, I am just going to make the style changes you recommended.

Edit: I've made the changes, and I've decided to give the Violent Wolf and Drunk Elephant sliding moves in the directions I tried giving them double step options on.


💡📝A. M. DeWitt wrote on Sat, Apr 15, 2023 01:41 AM UTC:

Seireigi is ready.


💡📝A. M. DeWitt wrote on Sat, Apr 15, 2023 03:10 PM UTC in reply to H. G. Muller from 02:42 PM:

I suppose I could change the names. But then I would also have to change them in the Ludii file as well. While Ludii does have an enormous collection of LSV pieces (it implements Taikyoku Shogi, crazy enough), there aren't that many elephant or wolf pieces in said collection.

I could use Great Elephant for the promoted Gold. That would make a lot more sense, and since sometimes it is disputed whether it appears or not in the historical LSVs, this version could stand out. But for the wolf piece, I want each promoted form to use unique characters so it stands out, and the running character is already used for the promoted Lance. I suppose I can use the Venomous Wolf here for the same reason.

Edit: I changed the names of the promoted Silver and promoted Gold to Venomous Wolf and Great Elephant, respectively.


100 comments displayed

EarliestEarlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.