Check out Chess with Different Armies, our featured variant for July, 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/Ratings for a Single Item

Earlier Reverse Order LaterLatest
Grand Apothecary Chess-Alert. Very large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
💡📝Aurelian Florea wrote on Sat, Apr 24, 2021 04:44 AM UTC:

This article is ready for review!


💡📝Aurelian Florea wrote on Sun, Apr 25, 2021 09:25 AM UTC in reply to Aurelian Florea from Sat Apr 24 04:44 AM:

Actually while testing with the interactive diagram I have noticed some undesired results. So I'm modifying a bit the game. Please allow me some more time.


💡📝Aurelian Florea wrote on Thu, May 6, 2021 09:25 AM UTC in reply to Aurelian Florea from Sun Apr 25 09:25 AM:

To the editors. Now this article is ready for review.


💡📝Aurelian Florea wrote on Tue, May 18, 2021 06:47 AM UTC:

May an editor look over this article?


💡📝Aurelian Florea wrote on Mon, Aug 23, 2021 01:26 PM UTC:

@ HG&Fergus

I have changed the piece names in the automatically generated preset here: https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+1&settings=Applet

The mortar seems to be able to capture from the initial position on the home brouhaha squares. Any thoughts on that?


🕸Fergus Duniho wrote on Mon, Aug 23, 2021 10:19 PM UTC in reply to Aurelian Florea from 01:26 PM:

I am not familiar with how these automatically generated presets work. It looks like it might be trying to emulate logical directions without using the built-in support for logical directions. I cannot tell what piece the Mortar is or how it moves from this code.


H. G. Muller wrote on Tue, Aug 24, 2021 08:36 AM UTC:

I think the problem is that you use piece IDs that are not purely alphabetic, like .ZW or 1BI. The GAME code in the betza.txt include file recognizes the color of the pieces through the operaters islower and isupper for determining whether a piece is black or white. This doesn't work properly on digits or punctuation. So it allows the Mortar in the initial position to capture to the brouhaha square because it does not consider the piece there to be a white one (and thus considers it fair game for capture).

Perhaps Fergus can tell if there are alternatives to islower and isupper that ignore non-alphabetic characters, (or judge only the first letter in the string), and thus can be used to reliably recognize color in an environment of names that contain digits / punctuation. My first thought would of course be to outlaw such piece names in the fist place: it seems totally silly to allow such names. There doesn't seem any need for it.


🕸Fergus Duniho wrote on Tue, Aug 24, 2021 12:15 PM UTC in reply to H. G. Muller from 08:36 AM:

Perhaps Fergus can tell if there are alternatives to islower and isupper that ignore non-alphabetic characters, (or judge only the first letter in the string), and thus can be used to reliably recognize color in an environment of names that contain digits / punctuation. My first thought would of course be to outlaw such piece names in the fist place: it seems totally silly to allow such names. There doesn't seem any need for it.

My recommendation is to change the piece labels, which I have previously documented how to do. This would require extra programming, though, which could defeat the purpose of having all the code generated for you. Perhaps code for changing piece labels could be automatically generated with the other code. This would require you to enter both the original piece label and the notation you want to use for the piece. See recent comments to the Developer's Guide for details on what kind of code is needed to do this.


H. G. Muller wrote on Tue, Aug 24, 2021 02:00 PM UTC in reply to Fergus Duniho from 12:15 PM:

I will check this out, to see if it is something that should be done in the automatically generated code, or whether this would be something that is better done by the end user in addition to the generated code.

I still want to explore an alternative solution, though: would it be possible to have GAME code support operators nolower and noupper, as analogs to isupper and islower? E.g. nolower would return true if its string argument would not contain any lower case characters, i.e. if it is all upper case, digits or punctuation. The operators isupper and islower turn out not to be very useful in an environment where piece labels can contain digits and punctuation.


🕸Fergus Duniho wrote on Tue, Aug 24, 2021 04:15 PM UTC in reply to H. G. Muller from 02:00 PM:

would it be possible to have GAME code support operators nolower and noupper, as analogs to isupper and islower?

No, those are already in use for returning arrays of spaces. Also, PHP doesn't have a ctype function for what you want.

E.g. nolower would return true if its string argument would not contain any lower case characters, i.e. if it is all upper case, digits or punctuation.

With #0 standing in for the space with the piece in question, try using match #0 nolower. This will check whether it's among the spaces whose pieces have no lowercase letters in them. Or with #0 as the piece label, you could try not fnmatch "*[a-z]*" space #0. This checks it against a wildcard pattern for containing any lowercase ASCII characters, then negates the result.


🕸Fergus Duniho wrote on Tue, Aug 24, 2021 04:49 PM UTC in reply to H. G. Muller from 02:00 PM:

I just updated explode to work with an empty separator, and I wrote and tested this function:

def nolowercase allfalse lambda (islower #0) explode "" #0;

H. G. Muller wrote on Wed, Aug 25, 2021 09:51 AM UTC:

OK, I replaced the islower everywhere in the include file by fnmatch "*[a-z]*", and isupper by fnmatch "*[A-Z]*". This seems to solve the problem of friend/foe discrimination. I hope there aren't any piece sets that use piece labels that mix upper and lower case...


💡📝Aurelian Florea wrote on Sat, Feb 12, 2022 01:05 PM UTC:

I have added in this game's initial position one regular pawn on each flank on the fourth row. That is because flank attacks by white where too dangerous in start positions where the black rook of the file was undefended. Also more king safety should he castle.


💡📝Aurelian Florea wrote on Tue, Feb 22, 2022 04:41 PM UTC:

I have added in the notes sections explanations about why are the pieces are the way they are in this game. They are not perfect, but I had questions and I wanted to answer them.


Bob Greenwade wrote on Mon, Aug 28, 2023 03:51 PM UTC:

Fascinating! So just to be sure I understand the Vulture: It can freely leap, but not capture, along its (0,3) destination; but is lame for its (1,4) and (3,4) destinations? (mHnFXnNY)


💡📝Aurelian Florea wrote on Mon, Aug 28, 2023 04:55 PM UTC in reply to Bob Greenwade from 03:51 PM:

Yes, that is because without the leap it would be very hard to develop!


💡📝Aurelian Florea wrote on Mon, Aug 28, 2023 05:01 PM UTC in reply to Aurelian Florea from 04:55 PM:

The other 2 grand apothecary games have similar vultures. Also I have wanted a rook level piece. But it is not as strong most certainly! To my surprise they are weaker than the 12 directions leapers!


Bob Greenwade wrote on Mon, Aug 28, 2023 05:27 PM UTC in reply to Aurelian Florea from 05:01 PM:

The Vultures being that weak is probably because they're lame. A straight-up HFXNY would probably start to rival the Rook (but might disrupt this game in other ways).


💡📝Aurelian Florea wrote on Mon, Aug 28, 2023 05:33 PM UTC in reply to Bob Greenwade from 05:27 PM:

Indeed. Long leapers make pawns kind of irrelevant. On the other hand leapers the way I used them make the game less local.


💡📝Aurelian Florea wrote on Thu, Sep 7, 2023 05:32 PM UTC:

I have discovered a new error in the Grand Apothecary Chess-Alert preset. In the game here:

 

Grand Apothecary Chess 1 on the Chess Variants Game Courier

 

I want to capture the joker on e1 with check, by the nightrider in a3. But the move does not go through.


💡📝Aurelian Florea wrote on Fri, Sep 8, 2023 04:41 AM UTC in reply to Aurelian Florea from Thu Sep 7 05:32 PM:

@HG & @Fergus, anything about this?


H. G. Muller wrote on Fri, Sep 8, 2023 09:34 AM UTC in reply to Aurelian Florea from 04:41 AM:

OK, I see. This was automated with GAME code generated by the Play-Test Applet.

I did some debugging, and it doesn't seem there is anything wrong with the code. I get the impression that it just runs into a timeout enforced by Game Courier, so that it cannot complete, and gives you the error message instead.

You are using full legality checking here (which probably is a necessity due to participation of the Joker). That means that testing to see if white is checkmated requires finding a legal  move for white. So it tries all white moves, and for each of those it then generates all black moves to see if there is one that captures the King. If there isn't, the process is aborted, with the verdict that there is no mate; if it encounters one that does capture the King it knows the preceding white move was illegal, and immediately goes on with the next, to see if it has better luck there.

But it appears the board is scanned for pieces from rank 14 to rank 1. After NN a3xe1 the Nightrider is checking. I have not studied the rules of your game to see if this is actually checkmate, but it is clear that the white pieces on the high ranks cannot resolve the check. And it starts trying all those, before it gets to pieces that would be close enough to the Nightrider to capture it. And all these other moves have to be refuted by Nightrider takes King, which is also one of the last moves it generates for black. So it must refute nearly all white moves, and for each of those it has to generate nearly all black moves to do it.

Had it scanned the board from low to high rank, it would always have detected the NNxK capture as one of the first black moves, so even if it was really checkmate (and it would have to try all white moves to prove that), it would have gone more than an order of magnitude faster. And if a white piece on low rank would have been able to capture the NN, it would have been one of the first things it tried for white. And then it would have found its legal move for white, and abort the mate test, which would again make it an order of magnitude faster. As it is, it only gets to trying moves from g3 before it is timed out.

I am not sure what we could do about this, apart for asking Fergus to stretch the timeout for executing GAME code. The Betza move generator uses a statement

  for (from piece) fn friends #player:

to loop over all pieces of the side to move, and this provides no control over the order in which the pieces are treated. Obviously the mate test could be sped up very much if we would always start with the piece that was checking; then almost all moves of the (nearly) checkmated player would be very quickly refuted by the King capture. The function 'friends' I used here gets its result from either onlyupper or onlylower, and I suppose it would be possible to reorder the pieces in these associative array, to get the checker in front, if the move generator is called for the purpose of legality testing for moves starting from an in-check position.

A poor-man's solution would be to scan the board always strating from the side of the player on move, because that is where his King starts. King moves are often a good way to get out of check, and if the King is suffocated like here, the check is likely to come from a piece that is close by.


H. G. Muller wrote on Fri, Sep 8, 2023 12:19 PM UTC:

It seems to work now: I implemented a sort of killer heuristic in the 2-ply search needed to test for checkmate. This appears to speed up the search enough so that it can complete in this potentially unfavorable case.

What I did is this: when the reply to an investigated move captures the King (thus disqualifying the move and requiring the search for a legal one to go on), it remembers the square of the piece that made the capture. When it then investigates the next move, it first generates the moves of this piece alone, before generating all moves of the opponent. In positions with a pre-existing check most moves won't resolve that check, and are quickly refuted that way. (By generating moves of only a single piece, rather than of all pieces.)

In the rare case where there wasn't a pre-existing check, but it happened to first try a move that exposed the King, it could lead to extra work, as the moves of the King-capturing piece will be generated twice during investigation of the next move. But even there exposing the King could have been a result of moving away a pinned piece. And since moves are generated piece by piece the next move is then likely to have exposed the King in the same way, and will then be quickly refuted by the same King capture.


💡📝Aurelian Florea wrote on Fri, Sep 8, 2023 12:25 PM UTC in reply to H. G. Muller from 12:19 PM:

Thanks!


Daniel Zacharias wrote on Sat, Mar 23 08:26 PM UTC:

I can't see the Warlock on the interactive diagram.

Also, I'm wondering where the name Warlock for ZW comes from, or if it's original to this game.


25 comments displayed

Earlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.