Check out Modern Chess, our featured variant for January, 2025.


[ 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 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 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. (Updated!) 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. (Updated!) 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.


25 comments displayed

EarliestEarlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.