Check out Grant Acedrex, our featured variant for April, 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
Apothecary Chess-Modern. Large board variant obtained through tinkering with known games.[All Comments] [Add Comment or Rating]
💡📝Aurelian Florea wrote on Tue, May 2, 2017 02:15 PM UTC:

While playing a game against Greg Strong I figured out that a rule is not clear.

No pieces besides the initial ones can enter the bruhaha squares.

That's the new rule. For now I just put it in a comment when sufficient material is obtained I'll edit the article.


Greg Strong wrote on Tue, May 2, 2017 02:51 PM UTC:

What do you mean by "the inital ones"?  The pieces initally on the brouhaha squares?

In Brouahah, the rule is that you cannot move onto one of the squares except to capture a piece already on it.  I did this, rather than just saying you cannot move onto them ever, because I did not want a piece that never left the brouhaha square to be protected from capture or else it might want to stay there.  They are intended to be "launch" square from which you launch onto the board and then the square is gone.

Is the rule here different?  Your new addition is not clear to me.


💡📝Aurelian Florea wrote on Tue, May 2, 2017 03:21 PM UTC:

I have considered Greg Strong's input so I'm making a new rule (the one Greg proposed actually):

A player cannot move into a Brouhaha Square but may capture a piece already on it. Only the pieces initially placed there have special powers.

The second part is there to highlight that the special powers are given to help in the opening they don't go further to the possible capturer of the pieces initially placed on the brouhaha squares. Also remember that the special powers are just move abilities.


💡📝Aurelian Florea wrote on Tue, May 2, 2017 03:23 PM UTC:

Public thanks to Gregory Strong for helping with the desing of this game and it's twin. I am such a newbie, I don't know how this has escaped me!


sirius628 wrote on Fri, Sep 1, 2017 02:07 AM UTC:

The champion is pretty strong and should be average.


💡📝Aurelian Florea wrote on Sat, Sep 16, 2017 08:18 AM UTC:

@Nicolino Will

Hello Nicolino, and thank you for taking time for my variant.

Actually I've made Apothecary chess 1 & Apothecary chess 2 like twins. That is mainly why the champion is still a minor piece so they both games have 4 minor pieces each. I'm aware that's not entirely apropiate but I think it's ok as anyway the difference between champion and rook is still pretty significant!


Kevin Pacey wrote on Thu, Mar 1, 2018 06:57 AM UTC:Excellent ★★★★★

The apothecary games may have a somewhat steep learning curve, but it seems it's well worth the trouble, based on my limited experience.


💡📝Aurelian Florea wrote on Thu, Jan 30, 2020 08:10 AM UTC:

@The Editors

These days I had tried to finalize the rules of my 2 apothecary games.

This should be the final version of this article pending review.


💡📝Aurelian Florea wrote on Sat, Feb 1, 2020 11:44 AM UTC:

I hope you guys enjoy the new version of this game. For now, the rules enforcing and move displaying are an ongoing job, for me to do. After that I hope to see you soon!...


🕸Fergus Duniho wrote on Thu, Apr 2, 2020 09:37 PM UTC:

Comparing this page to your Game Courier code, I see things in your code that I don't see on this page, such as rules concerning Pawn promotion and the King's first move.


💡📝Aurelian Florea wrote on Fri, Apr 3, 2020 04:56 AM UTC:

In the paragraf above notes I had written :

"There is no castling in this game, but the king may jump once from the initial position to c1,d1,h1 or i1 for white or c10,d10,d10,h10 for black."

And the pawn description:

"Pawns - orthodox chess pawns on a 10x10 board from the point of view of movement and capture but that may promote starting the 8th rank according to the above mentioned piece categories provided that the reserve holds the piece required. Pawns may promote to any auxiliary piece on the players 8th rank, any auxiliary piece or average piece at the 9th rank, and any piece at rank 10. In the reserve there are initially 1 queen, 1 rook,1 champion and 1 knight and later on enter any of the player's lost pieces. "


💡📝Aurelian Florea wrote on Wed, May 6, 2020 07:16 AM UTC:

The two things than need doing to complete the preset for this game is the finishing rules (as there are different from many chess variants) and all things related to the joker. For the first I will forfeit any more development as this website cannot support the 5 types of results present here. For the second the behavior of the jester is beyond my game code programming abilities and hopefully someone can help sooner or later. Fergus, if you see this, you have said a while ago that you took a look at the problem but I see you are very busy now. Anyway the day will come when this will be done one way or the other. I think I can handle the placing of the joker, I mean the main problem is the movement of the piece.


💡📝Aurelian Florea wrote on Wed, May 6, 2020 07:18 AM UTC:

Because I was asked to and, the rules have been anyway changed I will make some challenges with the non rules enforcing preset.


💡📝Aurelian Florea wrote on Sun, May 10, 2020 12:05 PM UTC:

I have corrected an omision. The king need not be in check in order to perform the special leap.


💡📝Aurelian Florea wrote on Sat, May 23, 2020 01:45 PM UTC:

I have added some clarifications regarding how the joker moves in the beginning and when imitating the enemy joker. They can be found at the end of the rules chapter.


💡📝Aurelian Florea wrote on Mon, May 25, 2020 03:53 PM UTC:

Fergus, we have reached the final hurdle. What I want to do is to insert the joker as part of the move in in the place of the last piece moved as long as the piece is virgin and occupies a spot on a1,b2,c2,d2,e2,f2,g2,i2 or h1 for white. The code for a1 that I tried is below. The if in the first line should have something like and flag a1 but when I do this it never enters the the if block.

if == $origin a1 :
unsetflag a1;
allow commands 2;
allow moves 2;
ask "Do you want to insert your joker now?" "Yes" p2-a1 "No" "skip";
ban allmoves;
ban commands;
allow moves 1 captures 1 promotions 2;
endif;

 

The error it gives is : J p2-a1 and other moves from one space to another are banned here.  This happens when after the ask command I go for yes. This is post move 1 code.


🕸Fergus Duniho wrote on Mon, May 25, 2020 09:41 PM UTC:

This code is in the Post-Move section, which means it is running after the move has been performed. The ask command does not perform a move right then and there. What it does is insert a move into the moves list. To guarantee that a move is allowed before it is made, you should define what is allowed in the Pre-Game section.

Also, the ask command should be used only as an alternative to entering the notation for a move. Once the ask command has been used on the current turn, the move it adds to the move list will be in the move list, and there will no longer be any need to use the ask command each time the same move is repeated. Remember that when you run Game Courier, it repeats all past moves, but when past moves have already been made, there is no longer any need to ask the player which move to make. Moreover, continuing to do so would stop the game from moving forward.

There are three things to check in determining whether to use the ask command. The first is whether the move made possible by the ask command has already been made. If it has been made, there is no need to ask whether to make the move. If it hasn't been made, there are two other things to check. The White_Pawn and Black_Pawn subroutines are designed to allow optional promotion in games with extended promotion zones, such as Grand Chess. Instead of entering a placeholder for an empty move, such as the skip command, these don't do anything special to mark that a Pawn has not promoted. Instead, they both use this condition to tell whether to use askpromote:

if not $answered and == mln $maxmln:

When the ask or askpromote command is used, it sets $answered to true. But this lasts only for the current turn. It will not help when you repeat past moves. So, this line also checks whether it is the latest move with == mln $maxmln. If a promotion move has not been made, and the command has not been answered on the current move, and it is the latest move, it asks what to promote to. Otherwise, it does not.


🕸Fergus Duniho wrote on Tue, May 26, 2020 01:45 AM UTC:

I propose giving the off-board Joker a drop move,which would be handled with the * operator, as in Shogi.


💡📝Aurelian Florea wrote on Tue, May 26, 2020 06:45 AM UTC:

The way I see it, once the user makes the regular move of the virgin piece (the ones allowed to vacate the spot for the joker), the user is then asked if he/she wants the joker to be inserted. I'm thinking that continuemove may be used here.

If a drop is to be used, the joker then starts in the hand I assume, where it is displayed, like in shogi. But there is still the problem of when to insert!


🕸Fergus Duniho wrote on Tue, May 26, 2020 03:50 PM UTC:

The Joker's entry to the board works similarly to optional Pawn promotion. After moving a previously unmoved piece, it may be placed on the board in the space vacated by the piece just moved. It is not necessary to use continuemove, because there are only two options: moving the Joker to the vacated space or not moving it. The ask command is the appropriate one to use. In using it, here are the things to check. First, check whether the Joker is still off-board. If it isn't off-board, it has already been moved to the board, and there is no need to check whether the player wants to move it to the board. If it's still off-board, check how many turns have passed. If too many turns have passed, you can stop there, perhaps even removing it to indicate that it is no longer available. If there is still time to drop it, check whether the question has been answered and whether it is the latest turn. If it has not been answered, and it is the latest turn, you can use the ask command. But if it has been answered, or it is not the latest turn, this command should not be used.


🕸Fergus Duniho wrote on Tue, May 26, 2020 03:54 PM UTC:

I proposed using a drop move to place the Joker on the board, because in your code, you were adjusting what is allowed before and after moving the Joker. If the Joker's entry to the board is a drop move, you can permanently allow drop moves on the second move, and once the Joker has moved to the board, the player will simply have no more drop moves available. There will be no need to ban drop moves, because the player will have no more legal drop moves after the first and only one that is allowed.


💡📝Aurelian Florea wrote on Wed, May 27, 2020 04:57 AM UTC:

Fergus,

I got stuck at the command that checks if the number of turns is larger than 8. How do I proerly write this?

My code uses:

if mln > 8 :
delete p2;
else:...

This is always true for some reason.

 

Commen t edit.

Moreover I cannot use setsytem starpath as it gives the error  You may not set $starpath(!p2 with setsystem.


🕸Fergus Duniho wrote on Wed, May 27, 2020 04:19 PM UTC:

Operators must precede the operands in GAME Code. So the line " if mln > 8 " should be "if > mln 8" except that mln is not what you want to use here. This is not a measure of turns. It is the line number of a line in the movelist, and it can be affected by the presence of comments. What you want to use instead of mln is turn.


💡📝Aurelian Florea wrote on Wed, May 27, 2020 05:38 PM UTC:

I don't know how to put a J and a j in hand. For now I used a p2 field (far from the rest of the board, but still on board) containing a Joker. Same for black. J*origin gives an error related to that.


🕸Fergus Duniho wrote on Wed, May 27, 2020 05:58 PM UTC:

Use setsystem to set the value of starpath.


💡📝Aurelian Florea wrote on Wed, May 27, 2020 06:06 PM UTC:

I had seen the material in the meantime. Thanks. GameCode is a Marvel!...


💡📝Aurelian Florea wrote on Wed, May 27, 2020 06:49 PM UTC:

@Fergus,

Hopefully you don't feel to nagged, but I still don't understand how to add a piece in the reserve. So far I got this.

setsystem starpath (!p2) reverse (!p9);
reserve first P;
reserve second p;
allow drops 2;


🕸Fergus Duniho wrote on Wed, May 27, 2020 09:49 PM UTC:

$starpath is an array of two arrays. This should do:

setsystem starpath ((!p2) (!p9));

You don't need to use the reserve command if you place the Jokers there in your FEN code.


💡📝Aurelian Florea wrote on Thu, May 28, 2020 01:29 AM UTC:

I still get the same error:

ILLEGAL: R a1-d1; J*origin on turn 1:

You have no J to drop with the * operator for move: MOVE:  J*origin.

In the end of pregame I have:

setsystem starpath ((!p2)(!p9));
reserve first J;
reserve second j;
allow drops 2;

and

in the end of postmove1 I have:

verify == space p2 J;
if > turn 8:
delete p2;
elseif not $answered and == mln $maxmln:
ask "Do you want to insert your joker now?" "Yes" J*origin "No";
endif;

There is also the need to check for flags but for now I'd like to understand why I receive this error. Thanks! 

Edit:

I have deleted the reserve commands. Now it just does nothing.


🕸Fergus Duniho wrote on Thu, May 28, 2020 02:36 AM UTC:

Perhaps because Shogi has Black move before White, something got mixed up in how drops work, and the first array in $starpath is for the second player. So, switching the two values in the $starpath array fixes this problem.

But then you have a new problem. When you allow multiple moves on the same turn, you have to treat them individually. This normally involves rolling back the moves, then doing one at a time, checking the legality of each move individually before doing the next one. See my code for Extra Move Chess or Marseillais Chess for examples.


💡📝Aurelian Florea wrote on Thu, May 28, 2020 02:47 AM UTC:

Marseillaise chess seems to have an error!


💡📝Aurelian Florea wrote on Thu, May 28, 2020 03:03 AM UTC:

What should I learn from Extramove chess? I see that the premove section has a store command. That means that the initial position is remembered and probably later restored and then actually make the 2 moves after legality checks have been made.


🕸Fergus Duniho wrote on Thu, May 28, 2020 01:06 PM UTC:

What you should learn from Extra Move Chess is how to program your code to deal with two moves made by the same player on the same turn. While Chess allows Pawn Promotion as two moves without going through this, this is because adding a piece to a space does not change the values of $origin and $dest. However, dropping a piece does. It counts as a complete move just as much as moving a piece on the board.

The first line in Extra Move Chess's Post-Move section is

set mvs explode chr 59 thismove;

This line creates an array of all the moves made. It uses chr 59 to tell the explode function to split the string returned by thismove where semicolons appear.

The next line restores the position to what it was when it was stored in the Pre-Move section.

Some of the stuff that follows is peculiar to Extra Move Chess. The main thing to pay attention to is how it uses the elements of the mvs array to replay each individual move before testing its legality.

If you don't want to program the game as though it were a double move variant, then you could introduce the Joker to the board with an add move. This is the kind of move used in Pawn promotion. It uses the piece notation with a hyphen and a destination. Unlike a regular move, it does not include an origin space.


🕸Fergus Duniho wrote on Thu, May 28, 2020 02:27 PM UTC:

The alternative to dropping a piece held in hand is what is called in the code freedrops. But allowing this will allow a bunch of illegal moves that would have to be prevented in the code. Also, it changes the value of $dest if it is to a location other than $dest, and that might still require you to handle things as though a double move were being made. One other alternative is to put the rule enforcement code in the Pre-Move sections. This would involve rewriting some things. You would have to extract the moves from thismove and test their legality before they're made. Before they're made, $origin and $dest would not be available.


💡📝Aurelian Florea wrote on Thu, May 28, 2020 03:01 PM UTC:

So any way I go it is a bit complicated.

Now I face an message saying that : A J cannot move from p2 to origin (anywhere origin is).

To be honest, at the beginning I never though programming this game is going to be so tough. I remembered you warning me about it.

For now my mind is all over the place. I think I'll try again tomorrow.


🕸Fergus Duniho wrote on Thu, May 28, 2020 11:18 PM UTC:

One of the things that can make programming double moves more difficult is the loss of information about the previous move. To help correct that, I have added three new variables called $prevmoved, $prevorigin and $prevdest. These store the previous values of $moved, $origin and $dest respectively. Using these, you could detect whether a Joker has been dropped and test whether the previous move was legal. Here's how it could work.

Instead of using $moved, $origin and $dest in the code for evaluating the main move, use some variables, such as #piece, #from and #to. If the last move was a Joker drop, set these variables to $prevmoved, $prevorigin, and $prevdest. Otherwise, set them to $moved, $origin, and $dest. Evaluate the move. Then if a Joker drop was made, evaluate that.


💡📝Aurelian Florea wrote on Fri, May 29, 2020 06:26 AM UTC:

For entering the block of code that is about the joker insertion I try to use these commands. Why am I wrong? 

verify flag space $origin; 

verify == space p2 J;


🕸Fergus Duniho wrote on Fri, May 29, 2020 03:33 PM UTC:

space returns what is on a space, which is a piece. I presume you flagged the spaces, not the pieces. So, you want the flag named after the value of $origin.


💡📝Aurelian Florea wrote on Fri, May 29, 2020 04:34 PM UTC:

For now in my pregame section I have relevant to this discussion the following:

setsystem starpath ((!p9)(!p2));
allow drops 2;

And and the end of my premove section there is this code:

verify flag $origin;
verify == space p2 J;
if > turn 8:
delete p2;
elseif not $answered and == mln $maxmln:
ask "Do you want to insert your joker now?" "Yes" J*a1 "No";
endif;

How would you do it? I don't have something solid to stand on it seems!


🕸Fergus Duniho wrote on Fri, May 29, 2020 06:26 PM UTC:

I wouldn't use ask in the Pre-Move section. This should be used after a player has moved, not before. Since the Jokers begin on !p9 and !p2, you want to use those coordinates, not p9 and p2, which do not exist. Prefixing a coordinate with the exclamation mark indicates that labels for that file should not be displayed on the board. This is useful for in-hand areas you drop pieces from Shogi-style. The rest may be okay to include in your Pre-Move section, but there isn't any special need to include it there as opposed to the Post-Move section, where other important code would have to go anyway. When using verify, bear in mind that it exits the function when given a false value. This is okay when no other code follows it than what is shown here.


🕸Fergus Duniho wrote on Fri, May 29, 2020 07:53 PM UTC:

I would use code like the following in the Post-Move sections. This code is for White.

  if isvisible $origin:
    set piece $moved;
    set from $origin;
    set to $dest;
  else:
    set piece $prevmoved;
    set from $prevorigin;
    set to $prevdest;
  endif;
 
  // Regular code for enforcing piece movement, but using the variables defined above
  // instead of the system variables.
 
  if not isvisible $origin:
    if != $moved J:
      die You may not drop any piece other than a Joker.;
    elseif != $dest $prevorigin:
      set pname alias const alias $prevmoved;
      die You may not drop your Joker on any space except the one the #pname just left.
    endif;
    delete $origin;
    unsetflag $prevorigin;
  elseif onboard !p2:
    if not $answered and == mln $maxmln and <= turn 8 and flag $origin:
      set jmove join "J*" $origin;
      ask "Do you want to insert your Joker now?" "Yes" #jmove "No" "";
    elseif >= turn 8:
      delete !p2;
      remind Joker removed because 8 turns passed without dropping it on the board.
    else:
      unsetflag $origin;
    endif;
  endif;

💡📝Aurelian Florea wrote on Sat, May 30, 2020 07:52 AM UTC:

To me the code looks great, but after copying it I got at the beginning of the program :

if == thismove null:
say This preset enforces the rules and displays legal moves.;
endif;

this error:

Syntax Error on line 2

Misplaced endif within main scope 0.

 

This is very puzzling to me. Any ideea why this happens?


🕸Fergus Duniho wrote on Sat, May 30, 2020 04:39 PM UTC:

When that happens, it is usually because something is out of place somewhere else in the code. When it reported the error, it also listed the program. The listing of the program is formatted so that lines are properly indented. So, you should scan the listing for any line that is not indented properly. When I did that, I found a misaligned endif between lines 199 and 200. A little further on, I found a misaligned else between lines 208 and 209. Make sure all your semicolons and colons are in place around those lines.


💡📝Aurelian Florea wrote on Sun, May 31, 2020 07:14 AM UTC:

There were 2 semicolons missing indeed. I have corrected that. But still it never goes as far as to ask the question.


💡📝Aurelian Florea wrote on Fri, Jun 5, 2020 01:12 PM UTC:

@Fergus,

I'm not sure if you've seen my previous comment but the last code you have made doesn't get as far as to ask the question about inserting the joker. I have had a similar problem before. Hopefully you can spare some time this week-end to take a look.


🕸Fergus Duniho wrote on Fri, Jun 5, 2020 07:04 PM UTC:

I think you need to remove the line:

unsetflag $prevorigin;

💡📝Aurelian Florea wrote on Fri, Jun 5, 2020 08:00 PM UTC:

I tried that, it is not it it seems :(!


🕸Fergus Duniho wrote on Fri, Jun 5, 2020 09:37 PM UTC:

You still need to remove it, and you have to adapt the code I gave you to Black. While you changed 8 to 12, you did not make any of the other changes that needed to be made for Black. Without those changes made, it is not going to work for Black. Also, the comment I left in the code was a placeholder for code you were supposed to write and include at that spot. It was not meant to be inserted into the code as is.


💡📝Aurelian Florea wrote on Sat, Jun 6, 2020 06:24 AM UTC:

While working on the changes to the preset modifying it to include the joker drop rule, I have started pondering the idea of renouncing this rule.
The programming for the game has become to bloated and frankly I doubt the need for such a rule anymore.
To replace that the joker would start in the current king's place and the king a rank back. As a consequence the king will lose the special moves but gain a castle ability.
I hope the members of the community could offer an opinion about this change.

https://www.chessvariants.com/play/pbm/diagram-designer.php?submit=Update&code=---wccw---%2Fr4k3r%2F1abngjnbq1%2Fpppppppppp%2F10%2F10%2F10%2F10%2FPPPPPPPPPP%2F1ABNGJNBQ1%2FR4K3R%2F---WCCW---&shape=square&scale=100&group=Apothecary+Chess&set=apothecary-standard&files=a+b+c+d+e+f+g+h+i+j+&ranks=0+1+2+3+4+5+6+7+8+9+10+11&font=Verdana&point=12&cols=10&board=10.01.&colors=339933+CCCC11+22BB22&bcolor=111199&tcolor=EEEE22&bsize=16&bgimage=maple-walnut.png&nextfile=50+0&nextrank=0+50


💡📝Aurelian Florea wrote on Sat, Jun 6, 2020 06:30 AM UTC:

In doing that the pros would be :

1. More comprehensive rules.

2. Easier programming

and the cons would be:

1. no more compensation for black's second move disadvantage


Thor Slavensky wrote on Sat, Jun 6, 2020 01:01 PM UTC:

Hey Aurelian, as I have said before, I have the deepest respect for all the work you are putting into the programming of this very nice game of yours.

In the games we recently played, it was an interesting tactical feature in the opening game that you had to free up the best possible square for the drop of the Joker within 8-12 moves, but the rest game had so much to offer, that you definitely can live without that feature..

The new starting set-up of the board looks a little odd to me. I think I would prefer the King back on rank 2 and 9. Then maybe the Joker can be placed on a brouhaha square (either an extra square or instead of a Champion). That would give some of the same tactical considerations as in the original game, as to when and how you should 'enter the board' mimicking with the Joker.

But most of all I have to agree with the (deciding ?!) point on your pro and con-list.: EASIER programming.

Btw, have you seen the piece description of the game JESTER CHESS ? There is a very clear and understandable definition of that game's Joker/Fool/Jester. It's a weaker (and more boring, IMO) Joker (not having full capturing ability), but it has some good points about mimicking a promoting pawn or a king..

Best wishes, Thor.


Greg Strong wrote on Sat, Jun 6, 2020 02:51 PM UTC:

I have never really like the rule that the Joker needs to be dropped within X turns, so I am happy to see it go.  I do not think white's first move needs compensation.  In a game this complex I think it is unlikely that will be the deciding factor.

This new setup is ok, but I agree with Thor that it looks a little unusual.  The King's position is off center with nothing beside him.  He looks lonely and the queen is way off to the side.  But this minor estetic is probably not too important.

Other posibilities - not sure how much they simplify the programming - leave the board as it was and either (a) have the joker drop in automatically at the first opportunity, or (b) there is no turn limit to dropping him.


🕸Fergus Duniho wrote on Sat, Jun 6, 2020 05:43 PM UTC:

I agree with Greg. White's opening advantage is likely to be a deciding factor mainly between equally skilled players who are both expert at the game. This will rarely be the case for Chess variants, which are more often than not played between people who have little experience at the game. Also, this game is bigger than Chess, and that also makes it less likely that White's opening advantage will be a deciding factor. As long as your game does nothing to increase the significance of White's opening advantage, it should be okay for you to do nothing else about it. Mainly, make sure all the Pawns are protected in the opening setup, so that neither player begins with a vulnerability that White might be able to exploit faster. Also, placing Jokers on the board gives Black the ability to move his Joker first, which is itself a slight advantage for Black.


💡📝Aurelian Florea wrote on Sun, Jun 7, 2020 06:27 AM UTC:

@Thor,Greg&Fergus

Thanks guys for your thoughts on the matter.

So the crux of the matter it is that the dropping of the joker is not needed but the initial position should be given further consideration. What about then adding another brouhaha square for the joker? This would mean a champion more to the side. King in it's original position. King keeps special initial moves.

https://www.chessvariants.com/play/pbm/diagram-designer.php?submit=Update&code=---wcjwc--%2Fr8r%2F1abngknbq1%2Fpppppppppp%2F10%2F10%2F10%2F10%2FPPPPPPPPPP%2F1ABNGKNBQ1%2FR8R%2F---WCJWC--&shape=square&scale=100&group=Apothecary+Chess&set=apothecary-standard&files=a+b+c+d+e+f+g+h+i+j+&ranks=0+1+2+3+4+5+6+7+8+9+10+11&font=Verdana&point=12&cols=10&board=23.10.01.10.01.10.01.10.01.10.01.32.&colors=339933+CCCC11+DD99DD+FFBBFF&bcolor=111199&tcolor=EEEE22&bsize=16&bgimage=maple-walnut.png&nextfile=50+0&nextrank=0+50


H. G. Muller wrote on Sun, Jun 7, 2020 07:30 AM UTC:

Simplicity is a hallmark of elegance. So I think it is in general better to not use several completely different mechanisms for introducing pieces on the board. Use gating, dropping or brouhaha squares, but then stick to the method of choice.

Of course a question could be: why use any of these at all? What does it add to the game that some of the pieces start on brouhaha squares? They still have to make the first move as if the brouhaha square was a normal board square, so for the pieces themselves it makes no difference. One uses brouhaha squares to prevent distortion of the board regularity, which could interfere with checkmating abilities as these are on rectangular boards, such as the Omega-Chess Wizard squares do. So you can create room for extra pieces without side effects on the board.

But why would you want to create any extra room at all, if you already have so many empty squares on the back rank, in your initial setup?

@Greg & Thor: I used that same 'lonely King' setup in Elven Chess. I did not consider it odd at all. Why would you want the King to start in the front line? This way you have free castling paths immediately, so you don't have to worry about evacuating non-jumping pieces to clear the path, and destroying the Pawn shield in the process.


💡📝Aurelian Florea wrote on Sun, Jun 7, 2020 08:57 AM UTC:

@HG,

Withouht the brouhaha squares the wizard may quickly capture powerfull pieces in the opening. That was the initial idea but it does not work! Also, this way rooks stay conected.


H. G. Muller wrote on Sun, Jun 7, 2020 09:24 AM UTC:

Well, it delays their development one move, as they can use their F step to move to first rank. Disconnecting the Rooks in the process...

What is the use of giving the Rooks a free rank if you cannot castle with them anyway? Rooks have to move to (half-)open files, and it will take you quite some time before any such file arises, with not only a full rank of Pawns in front of them, but also a rank filled with pieces. By the time a better place to put a Rook emerges, the Wizards and Champions would hardly ever be in the first two ranks or on the brouhaha squares, no matter where you start them.


Thor Slavensky wrote on Sun, Jun 7, 2020 09:54 AM UTC:

If you are considering to have pieces on the first rank with the rooks, there is also another option.

As long as it is not a major programming problem to add or subtract brouhaha squares, then you could consider having only 3 brouhaha's, moving EITHER the champions up to e1 and f1, OR the wizards up to somewhere on the first rank, could also be c1 and h1, for example. You will of course always have a asymmetrical set-up with the odd number of pieces, so with 1 pair of either wizards or champions, then you just have to decide if you want the joker 'king-side' or 'queen-side' on the 3 brouhaha squares.

I agree with all the insightful thoughts of H.G.Muller, and I think ELVEN CHESS looks very nice, and it does not have that 'odd look' at all, probably in Aurelian's new set up it was because of the 4  brouhaha squares below the 'lonely King'. 


💡📝Aurelian Florea wrote on Sun, Jun 7, 2020 11:05 AM UTC:

@HG,

That one turn delay makes the game possible, and quite fun in my experience! These principles came up from 4 years of testing with human players!


💡📝Aurelian Florea wrote on Sun, Jun 7, 2020 11:07 AM UTC:

@Thor,

Programming the brouhaha squares in game code is quite easy. In C++ or another language for an engine I'm not sure!


H. G. Muller wrote on Sun, Jun 7, 2020 11:30 AM UTC:

Oh sure, that would be very easy as well. An efficient way to representthe board is by an array much larger than the board itself, and surround a board-sized central area by unmovable and uncapturable 'boundary guard' pieces. Then moves that stray off board will be automatically rejected by the code that prevents capture of your own pieces, without having to test whether it ended on the board proper. So all you do is when a brouhaha square is evacuated, not set it to the code for an empty square but to one for a boundary guard. You could do that by replacing the statement board[fromSqr] = 0; in the MakeMove() routine by board[fromSqr] = shadow[fromSqr]; where the 'shadow' array can be initialized to indicate which squares revert to empty, and which to boundary.

Perhaps I should support brouhaha squares in the Interactive Diagram. It already recognizes the special piece type 'hole', which can used to place boundary guards on the board. (Usually as edge fillers to implement non-rectangular boards, such as for Omega Chess.) I could als have it recognizepiece type 'brouhaha', and use that to place hole on the shadow board instead of the regular one.


💡📝Aurelian Florea wrote on Mon, Jun 8, 2020 08:30 AM UTC:

The last thing I'd like to consider is that I'd like to try an unseen to my knowledge type of symmetry. The jokers will fill a place in the brouhaha squares but mirroring the center of the board like in mirror symmetry while the rest of the pieces have regular symmetry. This has the advantage of populating the board in a balanced way (as many pieces on both sides of the board), although one player will have a king side minor advantage while the other will have a non-king side minor advantage. I'd like to call this twist symmetry. Twist symmetry would mean that  we split the pieces of one side in two so that one part has mirror symmetry to the opponent while the other has regular symmetry. This concept resembles the mathematical concept of Chiral symmetry but I'm not sure about a proof that it is the same thing.

 

 https://www.chessvariants.com/play/pbm/diagram-designer.php?submit=Update&code=---jww----%2Fr3cc3r%2F1abngknbq1%2Fpppppppppp%2F10%2F10%2F10%2F10%2FPPPPPPPPPP%2F1ABNGKNBQ1%2FR3CC3R%2F----WWJ---&shape=square&scale=100&group=Apothecary+Chess&set=apothecary-standard&files=a+b+c+d+e+f+g+h+i+j+&ranks=0+1+2+3+4+5+6+7+8+9+10+11&font=Verdana&point=12&cols=10&board=23.10.01.10.01.10.01.10.01.10.01.32.&colors=339933+CCCC11+DD99DD+FFBBFF&bcolor=111199&tcolor=EEEE22&bsize=16&bgimage=maple-walnut.png&nextfile=50+0&nextrank=0+50 

 


Thor Slavensky wrote on Mon, Jun 8, 2020 10:30 AM UTC:

I'm sorry, I had not looked at your set-up with 5 brouhaha squares with the Joker in the middle. I have now. And it looks great. So forget my latest mainly nonsensical comment. I don't quite understand about the pieces you want to twist symmetrically, and the link doesn't seem to work. But if you want even more game testing, you are very welcome to send me an invitation (ID: Slavensky) for the 5 brouhaha square set-ups with or without twisted symmetry (if you have the time with all the testing of your new Grand Apothecary series).


💡📝Aurelian Florea wrote on Tue, Jun 9, 2020 03:16 PM UTC:

I have updated and brushed up the article for this game and the preset now is in working order (here). Thanks to all of you out there contributing with thoughts and especially Fergus for the help with the preset. Have fun guys!


💡📝Aurelian Florea wrote on Thu, Jun 11, 2020 07:53 AM UTC:

@Thor

I had sent you an invitation with the new preset.


Thor Slavensky wrote on Thu, Jun 11, 2020 03:19 PM UTC:

Hi Aurelian, I really like to try out the new set-up, as I said it looks like very 'game-logical' with the Joker in the middle and the auxillary pieces nicely spread around it.. But I cannot open the invitation, I can't find the accept buttom, it just says, that it's your turn to move. Would you try again, or should I send an invitation to you ? 


💡📝Aurelian Florea wrote on Thu, Jun 11, 2020 04:23 PM UTC:

Hello Thor,

I have sent 2 general invitations 1 for each game. It should work.


💡📝Aurelian Florea wrote on Mon, Jun 15, 2020 08:32 AM UTC:

Considerring the arguments made by Jean-Louis Cazeaux I have changed the names of 2 of the pieces to my original intent so the griffin and aanca became dragon and griffin (meaning the aanca is called griffin now).


💡📝Aurelian Florea wrote on Mon, Jun 15, 2020 09:08 AM UTC:

Can I do the following changes to the apothecary: standard piece set?

I'd like to be able sometime myself because in the near future I hope to come up with some other new games.

 

Add a dragon (with the letter D) 

Delete the Bird

Rename the AB to A  the CA to L and the CH to H


💡📝Aurelian Florea wrote on Mon, Jun 15, 2020 05:25 PM UTC:

@Fergus,

I have noticed that I forgot to ask you how to restrict the king's special moves to when the king is not in check. May you give me a final extra hand for this project?

The preset is here : https://www.chessvariants.com/play/pbm/play.php?game=Apothecary+Chess-Modern&settings=ApothecaryChess-Modern


H. G. Muller wrote on Mon, Jun 15, 2020 06:51 PM UTC:

Considerring the arguments made by Jean-Louis Cazeaux I have changed the names of 2 of the pieces to my original intent so the griffin and aanca became dragon and griffin (meaning the aanca is called griffin now).

This seems a very bad change, and it also seems you misunderstood the arguments of Jean-Louis. For one, Griffin is the established English name for an F-then-R, and it would be very confusing to now use it for another piece. Jean-Louis never claimed the Griffin would be a suitable name for the W-then-F; only that Aanca was the historic name of the F-then-R, and that it would be bad to use it on another piece. And that Aanca referred to a monstrous mythical bird for which no English name exists.

And you now use the image of a Griffin for a piece called Dragon, and the image of a bird for a piece called Griffin...


🕸Fergus Duniho wrote on Tue, Jun 16, 2020 02:08 AM UTC:

The castle subroutine contains these lines:

  move #to #from; // Temporarily undo King move
  if sub checked #from:
    die A King may not castle out of check.;
  endif;

And before it ends, it includes this line:

  move #from #to; // Redo King move

💡📝Aurelian Florea wrote on Tue, Jun 16, 2020 04:23 AM UTC:

@HG,

I will be changing the pictures once I figure out how.

For now you can use the symbolic apothecary piece set.


💡📝Aurelian Florea wrote on Tue, Jun 16, 2020 05:43 AM UTC:

I had tried the following in the postmove section 1 but with little succes:

 

if flag f2 and == moved K:
move $dest $origin; // Temporarily undo King move
  if sub checked $origin:
    die A King may not castle out of check.;
  endif;
move $origin $dest;
endif;


🕸Fergus Duniho wrote on Tue, Jun 16, 2020 11:07 PM UTC:

You had this code before it. You should be able to see how it would stop your other code from working.

if == moved K: 
  unsetflag f2;
  set Kpos $dest;
endif;

💡📝Aurelian Florea wrote on Wed, Jun 17, 2020 07:25 AM UTC:

@Fergus,

I'm glad to say I have managed to make it work.

Here is the code that does well:

if flag f2 and moved == K:
move $dest $origin; // Temporarily undo King move
  if sub checked $origin and not checkleap $origin $dest 1 0 or checkleap $origin $dest 1 1:
    die A King may not castle out of check.;
  endif;
move $origin $dest;
endif;

if == moved K: 
unsetflag f2;
set Kpos $dest;
endif;

if sub checked var Kpos:
  die You may not move into check.;
endif;

Later edit:

But althought the code works for white it does not work for black well, and also there is a weird side effect where a queen move on the first square generates the a king may not castle out of check error. So there is still work to do despite the progress.

2nd edit:

I think I have found the bug that generates both problems. It is the first if :

if flag f2 and moved == K:

this is either always true or always false if I move the == ahead of moved but I cannot get it to work in the intended way which is enter the condition when flag f2 of set and the K has just been moved.


Greg Strong wrote on Wed, Jun 17, 2020 02:49 PM UTC:

Should be:

if and flag f2 == moved K:

Operators come before their arguments.  I'll add parenthesis to show what's going on (although you should not use the parenthesis):

if (and (flag f2) (== moved k))

 


💡📝Aurelian Florea wrote on Wed, Jun 17, 2020 04:41 PM UTC:

I see what you say but with that I get always false. And the flag works well. I had checked.  So it is the equality. If i write if and flag f2 moved == K then it works for the king but the code enters for other pieces too which is weird.  So maybe == moved K regardless of how is written does not give the expected answer but all T or all F, which is weird. And that probably means I have trouble somewhere else.


🕸Fergus Duniho wrote on Wed, Jun 17, 2020 10:26 PM UTC:

Black pieces use lowercase labels. K is the white King, not just any King.


💡📝Aurelian Florea wrote on Thu, Jun 18, 2020 05:23 AM UTC:

I know that. This is why the error seems weird to me. I'll get back to you on that!


🕸Fergus Duniho wrote on Thu, Jun 18, 2020 08:03 PM UTC:

You're still checking the flag on f2, which is not the starting space for the Black King.


💡📝Aurelian Florea wrote on Fri, Jun 19, 2020 06:00 AM UTC:

All right, you were correct on that final point, but things are not done.

Let us start from scratch. Maybe I'll understand what is going on.

The code that greg has suggested:

if and flag f2 == moved K:

for the condition that enters the main code in question does not work although the way I see it it should.. It is always false. I have checked for the flag. That works fine so it moved be the == moved K part. But I can't see why!


🕸Fergus Duniho wrote on Fri, Jun 19, 2020 05:00 PM UTC:

Are you saying that this code is not working?

if and flag f9 == moved k:

Looking at the rest of your code, I see details that pertain only to castling, but I presume this code is not for castling. You need to understand what the code does and remove or modify what doesn't fit your purposes.


💡📝Aurelian Florea wrote on Mon, Jun 22, 2020 11:38 AM UTC:

Fergus,

I have solved it:

if flag f2:
if moved == K:
  move $dest $origin; // Temporarily undo King move
  if sub checked $origin:
    if not or checkleap $origin $dest 1 0 checkleap $origin $dest 1 1:
    die A King may not use the special moves out of check.;
  endif;
endif;
  move $origin $dest;
endif;
endif;


Carlos Cetina wrote on Mon, Jun 22, 2020 07:35 PM UTC:

@Aurelian,

At our current game I cannot make 7... b h5-f3 (bishop x wizard) because the GC program says: "A King may not use the special moves out of check. Use your browser's BACK button to go back to the previous page, then reload if necessary."

In order not to affect the current games, it would be convenient to do the tests to improve the code in a cloned preset using another settings name.


💡📝Aurelian Florea wrote on Tue, Jun 23, 2020 02:13 AM UTC:

I removed the buggy code. 

Now it should work!


💡📝Aurelian Florea wrote on Tue, Jun 23, 2020 06:43 AM UTC:
files=10 ranks=12 holdingsType=1 promoZone=3 promoChoice=!P*N*B*C*W*R2*J2*Q1*D1*G1 graphicsDir=../graphics.dir/alfaerie/ whitePrefix=w blackPrefix=b graphicsType=gif squareSize=54 symmetry=mirror shuffle=G:BD,:BN,GDQ hole::::a1,b1,c1,i1,j1,,a12,b12,c12,i12,j12 pawn:p:ifmnDfmWfceF:pawn:a4,b4,c4,d4,e4,f4,g4,h4,i4,j4,,a9,b9,c9,d9,e9,f9,g9,h9,i9,j9 rook::::a2,j2,,a11,j11:1 queen::::e3,,e10:1 bishop:B:B:bishop:d3,g3,,d10,g10 knight:N:NmHmA:knight:c3,h3,,c10,h10:1 wizard:W:FL:mage:d1,g1,,d12,g12 champion:C:WAD:champion:e1,h1,,e12,h12:1 joker:J:fI:fool:f1,,f12 dragon:D:FyafsF:dragon:i3,,i10 griffin:G:WyafsW:gryphon:b3,,b10 king:K:KimbsLimbsN:king:f3,,f10

💡📝Aurelian Florea wrote on Wed, Jun 24, 2020 01:55 AM UTC:

@Fergus,

I have moved the buggy code back to the old testing ground:

https://www.chessvariants.com/play/pbm/play.php?game=Apothecary+Chess+1&settings=Apothecary1working&submit=Edit

if flag f2:
if moved == K:
  move $dest $origin; // Temporarily undo King move
  if sub checked $origin:
    if not or checkleap $origin $dest 1 0 checkleap $origin $dest 1 1:
    die A King may not use the special moves out of check.;
  endif;
endif;
  move $origin $dest;
endif;
endif;

The way this goes wrong is that other pieces other than the king are affected by it. Any idea why?


H. G. Muller wrote on Wed, Jun 24, 2020 06:40 AM UTC:

I implemented 'repeated shuffling' in the diagram now, where the shuffle parameter accepts a comma-separated list of shuffles, which are then performed in order. I also added a new shuffle limitation: a piece prefixed with ':' (colon) will not be shuffled to different shades (like a '!' prefix would do), but to symmetric locations. (Which, on boards with an even number of files, should also have opposit shades.) Better make sure to apply it only to an even number of pieces on a set of symmetrically distributed locations!

I think this should allow you to do the shuffling you want, through a trick: When you shuffle (say) Knights and Bishops with :BN specification, it can only leave them as they were, or swap the N and B on both wings. Otherwise the Bishops would no longer be symmetrically positioned.

So what you can do is start the Bishops in the d- and g-file, and (say) A and C on the b- and i-file, and then shuffle A:BC. This will make the B end up either on d/g or b/i, with 50-50 chance. After that you shuffle B and N (which started on c- and h-file), as :BN, to randomize those while preserving symmetry. Finally you shuffle ACQ without limitations. So the specification would be shuffle=A:BC,:BN,ACQ .


💡📝Aurelian Florea wrote on Wed, Jun 24, 2020 08:10 AM UTC:

I have tested it by pressing restart and it does not go well. The queen and knigt get swaped. But not the way I described in the rules. My code is here:


<script type="text/javascript" src="../membergraphics/MSinteractive-diagrams/betza.js"></script>
<div style="float:left;margin:0 40px 20px 0;">
<div class="idiagram">
files=10
ranks=12
holdingsType=1
promoZone=3
promoChoice=!P*N*B*C*W*R2*J2*Q1*D1*G1
graphicsDir=../graphics.dir/alfaerie/
whitePrefix=w
blackPrefix=b
graphicsType=gif
squareSize=54
symmetry=mirror
shuffle=G:BD,:BN,GDQ
hole::::a1,b1,c1,i1,j1,,a12,b12,c12,i12,j12
pawn:p:ifmnDfmWfceF:pawn:a4,b4,c4,d4,e4,f4,g4,h4,i4,j4,,a9,b9,c9,d9,e9,f9,g9,h9,i9,j9
rook::::a2,j2,,a11,j11:1
queen::::e3,,e10:1
bishop:B:B:bishop:d3,g3,,d10,g10
knight:N:NmHmA:knight:c3,h3,,c10,h10:1
wizard:W:FL:mage:d1,g1,,d12,g12
champion:C:WAD:champion:e1,h1,,e12,h12:1
joker:J:fI:fool:f1,,f12
dragon:D:FyafsF:dragon:i3,,i10
griffin:G:WyafsW:gryphon:b3,,b10
king:K:KimbsLimbsN:king:f3,,f10
</div></div>

I had tested it be pressing restart a few times on the diagram. Refresh gives me the initial position.


H. G. Muller wrote on Wed, Jun 24, 2020 08:15 AM UTC:

OK, I see that my trick did not work for swapping b and d, as these are same shade, so that the B must get automatically to opposit halves, and the : adds nothing extra. I changed the meaning of : now to explicitly mean "mirror-image location", and adapted the Diagram script for that. This should make your diagram work as you have it, with the updated script.


💡📝Aurelian Florea wrote on Wed, Jun 24, 2020 08:25 AM UTC:

I'm not sure why but the diagram still does not work.

It behaves the same way.

I'm wondering if you have not tried to put a bishop over an already occupied square. Would this be an error?


H. G. Muller wrote on Wed, Jun 24, 2020 08:33 AM UTC:

I think caching again is broken on this website. I uploaded a new Diagram script, but when I read it back from the website, it shows the old text. Only when I suffix the URL with some random suffix, like ?t=1234, I get to see the newly uploaded text.

So this is what you can do as a work-around too: suffix the URL to betza.js in your comment to make it betza.js?nocache=true , to make sure it will use the new script. You still would have to flush your browser cache. When I tried the current script locally on your diagram, the shuffling works as it should.

BTW, note that when you specify symmetry=mirror (as you must, to preserve vertical symmetry during shuffling), there is no need to mention the location of the black pieces, as the Diagram would automatically add those. So you could leave out the double comma and everything behind it, even for the holes.


💡📝Aurelian Florea wrote on Wed, Jun 24, 2020 11:42 AM UTC:

@HG,

Indeed HG, now the diagram works as expected for me too!...

Thanks!


💡📝Aurelian Florea wrote on Thu, Jun 25, 2020 01:33 PM UTC:

@Fergus,

I have remade the code to work as expected for the king to not be able to use the special moves out of check:

/play/pbm/play.php?game%3DApothecary+Chess+1%26settings%3DApothecary1working

The relevant piece of code for white  is:

if flag f2:
if == moved K:
  if sub checked $origin:;
    if not or checkleap $origin $dest 1 0 checkleap $origin $dest 1 1:
    die A King may not use the special moves out of check.;
  endif;
endif;
endif;
endif;

There is still the problem that the special moves are displayed as legal when a king is in check. Is that solvable?


🕸Fergus Duniho wrote on Thu, Jun 25, 2020 04:22 PM UTC:

As long as you evaluate actual moves in the Post-Move sections, you have to bear in mind that potential moves are evaluated before a move would be made, and actual moves are evaluated after a move has been made. This means that you have to sometimes use different code for potential and actual moves. That's true of the King here. You should use both a function and a subroutine for the King's movement. The function should handle only potential moves, and it should stop a King from making its special move out of check before it makes its move. The subroutine should handle actual moves, and it should undo a King's special move after it has been made to make sure the King didn't move out of check with that move, then redo it if it was legal.


💡📝Aurelian Florea wrote on Fri, Jun 26, 2020 08:50 AM UTC:

 have written the following code but I don't know where to call the subroutine.

sub King from to

    move #to #from;
    if sub checked #from:
    verify or checkleap #from #to 1 0 checkleap #from #to 1 1;
    else:
    verify fn King #from #to;
    endif;
    move #from #to;

endsub;

;


💡📝Aurelian Florea wrote on Fri, Jun 26, 2020 09:47 AM UTC:

To the editors.

Can a piece set be changed or it needs to be redone from the beginning?

I want to change in the apothecary chess standard piece set the bird with the dragon.


🕸Fergus Duniho wrote on Fri, Jun 26, 2020 11:57 AM UTC:

Since your function has to allow special moves but stop the illegal ones, you should not be calling your function from your subroutine. They should be independent from each other. How to call the subroutine is described in the Fairychess include file tutorial under "A Real Example from Chess".

The tutorial also describes how you can use different pieces with the same notation. Although you cannot modify a set within Game Courier, you can change which pieces you use and what notation you will use for them. I recommend reviewing this tutorial every now and then.


🕸Fergus Duniho wrote on Fri, Jun 26, 2020 12:52 PM UTC:

While I could add code to Game Courier for enabling GAME Code programs to modify the images in piece sets, it would not work in Edit mode. So, if you want to use piece images that are not in your current set, you should change it to use a different set.


100 comments displayed

Earlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.