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 Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Later Reverse Order EarlierEarliest
Apothecary Chess-Classic. Large board variant obtained through tinkering with known games.[All Comments] [Add Comment or Rating]
Bob Greenwade wrote on Mon, Aug 28, 2023 01:24 PM EDT in reply to Aurelian Florea from 12:56 PM:

I'd love it, if you do!

Well, I did. I wasn't too sure about including the Ostrich anyway.


💡📝Aurelian Florea wrote on Mon, Aug 28, 2023 12:56 PM EDT in reply to Bob Greenwade from 12:01 PM:

I'd love it, if you do!


Bob Greenwade wrote on Mon, Aug 28, 2023 12:01 PM EDT:

I really should include the Mamluk in Desert Dust....


💡📝Aurelian Florea wrote on Wed, Jan 13, 2021 02:18 AM EST in reply to Daniel Zacharias from Tue Jan 12 11:51 AM:

You have made my day Daniel especially with that final sentence :)! Thanks! I'll try hard!


Daniel Zacharias wrote on Tue, Jan 12, 2021 11:51 AM EST:Excellent ★★★★★

This is a very good game. Everything fits together well. The random setup provides variety without being completely chaotic. The brouhaha squares are a great way to add more pieces without making the board so big it feels empty. The promotion rule encourages more variety in promotion, which is something I look for particularly; and I like the auxiliary pieces used here. The Mameluk especially is fun.

I think I might slightly prefer the Modern Apothecary game, for it's Dragon and Griffin, which to me are more interesting than the Chancellor and Archbishop, but I like the Siege Elephant and Mameluk as auxiliaries, so it's hard to choose one game over the other. I don't know if I'd agree with the statement that the Joker can't defend well. It seems to me that it's ability to mimic an attacker's move makes it particularly good at defending and more difficult to use aggressively. I'm not great at chess (in any form), though, so I could be wrong about that.

I'm interested to see what the next games in this series will be like!


H. G. Muller wrote on Sat, Dec 26, 2020 02:37 AM EST in reply to Aurelian Florea from 12:07 AM:

No, I just replaced the standard JavaScript random generator by obne of my own making. And I am sure that new one works.

For me, the Diagram in this article does randomize. But only when you press 'Restart' in the AI control bar; the initial display is always of the 'nominal' setup. The diagramsfirst Diagram in the comments to it does not randomize, though. But it also do not contain a shuffle=... parameter.

It could also be a problem that you have multiple diagrams on one page. It seems the shuffle triggered by 'Restart' (or in fact any of the navigation buttons) acts on the 'active' Diagram, i.e. the one you last used. And pressing the buttons or opening the AI control bar doesn't count as 'use'. (This is arguably a bug.) So be sure to touch a piece in the diagram before you press 'Restart'.


💡📝Aurelian Florea wrote on Sat, Dec 26, 2020 12:07 AM EST in reply to Aurelian Florea from Wed Dec 2 12:27 PM:

@H.G. Hello. You have said that you have worked with the randomizing algorithm. It seems that my diagrams don't randomize anymore. Could there be a connection?


💡📝Aurelian Florea wrote on Wed, Dec 2, 2020 12:27 PM EST:
files=10 ranks=10 promoZone=3 promoChoice=!PZNBLER2J2A2D1Q1 graphicsDir=../graphics.dir/alfaerie/ whitePrefix=w blackPrefix=b graphicsType=gif squareSize=54 symmetry=none pawn::fmW*fceF::a3,b3,c3,d3,e3,f3,g3,h3,i3,j3,,a8,b8,c8,d8,e8,f8,g8,h8,i8,j8 knight:N:NmZ:knight:c2,h2,,c9,h9 bishop::::d2,g2,,d9,g9 rook::::a2,j2,,a9,j9 queen::::e2,,e9 king::KisO3::f2,,f9 archbishop:A:BN:cardinal:e1,,e10 dragon:D:FyafsF:dragon:f1,,f10 mamluk:L:WL:camel:b1,i1,,b10,i10 siege elephant:E:FAH:elephant:d1,g1,,d10,g10 Cavalier:Z:NF:wideknight:b2,,i9 joker:J:fI:fool:i2,,b9 royal=6

Kevin Pacey wrote on Thu, Oct 8, 2020 10:07 PM EDT:

I started using the AI in the Classic version's article as of last night, when I had the experience I wrote of in my last post.

It's quite possible I did what H.G. supposed I might have.

A frustrating part of using my Windows 10 laptop is that mouse-slips seem to happen fairly often for me - particularly increasing or decreasing the font size without intending to, when on websites, happens a lot (I use [cntr]+ or - to get it back to 100% (normal) font size). I also accidently moved a piece I didn't intend to, one time, when moving too quickly.


H. G. Muller wrote on Thu, Oct 8, 2020 04:37 AM EDT in reply to Kevin Pacey from Wed Oct 7 11:07 PM:

Well, it is hard to say without knowing exactly how you clicked. I can elucidate some general aspects of the Diagram, though:

  • The Diagram does not enforce turn order. Hence you can always make as many moves in a row as you want. If the AI is switched on, however, it will always reply to every move with a move of the other player. This causes some alternation of turns, but would not preclude you from moving for the side that the AI just moved for.
  • A click on a piece that is not highlighted as a valid target for a piece that was clicked before, will select that former piece, instead of any previously selected one. So it is not possible to enter illegal captures. Clicking an empty square will always move the selected piece there, whether it is legal or not.
  • When a Pawn enters the promotion zone, and the piece table below the board is open, a message will appear (on red background) above the board requesting you to select a piece from the table to promote to. The table should then have highlighted (in light blue) all the piece types that are available.
  • If the table is closed, however, a pawn entering the zone will automatically promote to a default piece, (the piece mentioned first in the promoChoice parameter of the Diagram) whether this is available or not. This is perhaps something I should improve on, e.g. by automatically opening the table and then following the same procedure as above.

If I must hypothesize on what happened, I would think you had the table open, but missed the request to select a piece (perhaps because it was out of view). When nothing happened after you clicked f8 you got confused about whether the click had succeeded, and clicked it again. (Or perhaps your mouse button 'bounced', and accidentally produced a double click.) But this click, instead of a click in the table for selecting a promotion piece, aborted the promotion move, and instead selected the black Pawn. This added to the confusion, and you tried to redo the entry completely, by clicking your own Pawn again. But this Pawn was a valid target for the (now selected) black Pawn (which, unlike the white Pawn, was not waiting for a promotion choice to be made). So what you intended as a first click for your move, was in fact interpreted as a second click for a black move, which was then executed (Pf8xe7).


💡📝Aurelian Florea wrote on Thu, Oct 8, 2020 03:46 AM EDT in reply to Kevin Pacey from Wed Oct 7 11:07 PM:

Have you used the diagram in the article or the one in the comments section?


Kevin Pacey wrote on Wed, Oct 7, 2020 11:07 PM EDT:

@H.G. (or Aurelian):

I tried playing the AI for this variant as White a couple of times, and in one game some things happened that apparently shouldn't have. Unfortunately I don't have the exact position or a record of the game, but here are the relevant details that may be all that's needed:

White: Pawn e7,f6; Rook f1; King i1

Black: Pawn d6,e8,f8; Bishop g9; King f9.

I tried touching my pawn on e7 and the Black pawn on f8 was lit in red, while the empty square f7 lit in green.

I then tried 1.Pe7xpf8 and Black's pawn on f8 took my pawn on e7 instead - at no point did I specify what to promote my e7-pawn to, yet (there's already been at least the Archbishops traded and a bishop of mine traded for a knight). After that, I simply elected to recapture Black's (improperly arrived) e7 pawn with my f6 pawn, to see what would happen. At that point I was allowed to make a second move in a row, which I used to capture Black's king with my Rook on f1 on a now open file, and I was told that the program had lost.

Any ideas what might have happened for such a case?


💡📝Aurelian Florea wrote on Fri, Oct 2, 2020 07:49 AM EDT:
files=10 ranks=12 symmetry=none holdingsType=1 promoZone=4 promoChoice=!P*N*B*L*E*R3*J3*A2*Q2*C2 graphicsDir=../graphics.dir/alfaerie/ whitePrefix=w blackPrefix=b graphicsType=gif squareSize=54 hole::::a1-j1,,a12-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:NmZ:knight:c3,h3,,c10,h10:1 mamluk:L:WL:camel:d1,g1,,c12,f12:1 siege elephant:E:FAH:elephant:e1,h1,,d12,g12 joker:J:fI:fool:f1,,e12 Chancellor:C:RN:chancellor:i3,,i10 archbishop:A:BN:cardinal:b3,,b10 king:K:KimbsLimbsN:king:f3,,f10 symmetry=mirror shuffle=A:BC,:BN,ACQ

I have tried this week to add a rider piece. Unfortunately this proved to make the game worse as more opening moves were forced. So I reverted to an earlier version while keeping the idea that black has more pieces on the non-king side. This will be the final apothecary chess-classic game. I'm satisfied with the game.


💡📝Aurelian Florea wrote on Mon, Sep 28, 2020 11:35 AM EDT:

I have switched the places of osprey and mamluk in the opening position in order to give more opening opportunities.


💡📝Aurelian Florea wrote on Sun, Sep 27, 2020 08:10 AM EDT:

I have played this game against the interactive diagram's AI. It takes less time that an game courier match and I wanted to see how the games feel after the final changes I have made. The game seems to be very tactical now with many strong pieces quickly engaging . I'm really unsure about how good the game is. It's learning curve is quite steep but maybe once properly learned it is fun. I was hoping that more experienced player will take a look and try to play against the interactive diagram until the endgame (me I always blunder something before the endgame).


💡📝Aurelian Florea wrote on Sun, Sep 27, 2020 05:09 AM EDT:

Thanks so much HG. very cool tool you have made!


H. G. Muller wrote on Sun, Sep 27, 2020 04:20 AM EDT:

This night the following occurred to me: I normally write a Diagram definition by first specifying all parameters, and then all pieces. Although some parameters (such as the board size) must be set before placing any pieces, in general there is no need for this ordering, and parameter definitions and piece definitions can be mixed in any order. Furthermore, it is not an offense to specify the same parameter multiple times with different value; each definition simply replaces any previous value, so that the value from the last definition prevails.

You could therefore try the following: start with a line symmetry=none amongst the parameter settings. Then specify all pieces with their locations. Because at the time of their processing the symmetry is set to none, it will not automatically place any mirror images, and you specify the squares of both white and black pieces in any way you want. After defining all pieces, you add a line symmetry=mirror . This will alter the symmetry spec, but this new spec will not be used during setup, which is already done. It will be used during shuffling, though, which occurs after the entire Diagram definition is read.


H. G. Muller wrote on Sat, Sep 26, 2020 06:03 PM EDT:

I guess the current diagram script cannot do this, because the specified symmetry is applied both to the shuffling and to the setup. You seem to want a point-symmetrical setup, (symmetry=rotate) but then a line-symmetric shuffle (symmetry=mirror).


💡📝Aurelian Florea wrote on Fri, Sep 25, 2020 11:29 PM EDT in reply to H. G. Muller from Wed Sep 23 05:59 PM:

@HG : And I could not find a solution on my own :(!


💡📝Aurelian Florea wrote on Thu, Sep 24, 2020 01:07 AM EDT:

@HG, ... But it has introduced another problem. Now the shuffling of pieces is not simtrical anymore :(!


💡📝Aurelian Florea wrote on Thu, Sep 24, 2020 12:16 AM EDT:

@HG, Indeed that has solved it. Thanks!


H. G. Muller wrote on Wed, Sep 23, 2020 05:59 PM EDT in reply to Aurelian Florea from 11:54 AM:

I suppose you need a symmetry=none line in the diagram definition. It is probably reflecting the other Joker now.


💡📝Aurelian Florea wrote on Wed, Sep 23, 2020 11:54 AM EDT:

@HG, Hello, The interactive diagram on this page puts in the initial position an extra black joker outside of those defined. Why is this happening?


💡📝Aurelian Florea wrote on Wed, Jul 22, 2020 11:41 AM EDT:

It works well. I hope there are no more bugs. Thanks Fergus!


🕸Fergus Duniho wrote on Wed, Jul 22, 2020 11:14 AM EDT in reply to Aurelian Florea from 10:55 AM:

I think this would work better. I moved an or and reformatted it to show the logic better.

def White_Barren_Pawn 
checkaleap #0 #1 0 1 
and cond empty #0 not capture empty #1
or and 
  or checkaleap #0 #1 -1 1 checkaleap #0 #1 1 1 
  cond empty #0 capture islower space #1;

def Black_Barren_Pawn
checkaleap #0 #1 0 -1 
and cond empty #0 not capture empty #1
or and 
  or checkaleap #0 #1 -1 -1 checkaleap #0 #1 1 -1 
  cond empty #0 capture isupper space #1;

💡📝Aurelian Florea wrote on Wed, Jul 22, 2020 10:55 AM EDT:

I have corrected the mistake and now it goes like this:

def White_Barren_Pawn 
checkaleap #0 #1 0 1 and cond empty #0 not capture empty #1
or and checkaleap #0 #1 -1 1 or checkaleap #0 #1 1 1 
cond empty #0 capture islower space #1;
def White_Barren_Pawn-Range merge leaps #0 1 0 leaps #0 1 1;

def Black_Barren_Pawn
checkaleap #0 #1 0 -1 and cond empty #0 not capture empty #1
or and checkaleap #0 #1 -1 -1 or checkaleap #0 #1 1 -1 
cond empty #0 capture isupper space #1;

But during my tests I came across the fact that a joker imitating a barren_pawn does not have the ability to capture another joker (although it is fine when capturing a knight).


🕸Fergus Duniho wrote on Wed, Jul 22, 2020 08:58 AM EDT in reply to Aurelian Florea from Tue Jul 21 11:41 PM:

I'm confused about what you want to say. Isn't it that : and cond empty #0 capture isupper space #1; does exactly that, capture for actual moves, and isupper space #1 checks for a potential victim in potential moves? Where am I wrong?

That's not the issue. The issue is that and has only one value. With only one value, it is a breaking and, which means that it will immediately exit the function and return false if the value it receives is false. See the "Breaking Logic" section in the tutorial on the fairychess include file for details.


💡📝Aurelian Florea wrote on Tue, Jul 21, 2020 11:41 PM EDT:

I'm confused about what you want to say. Isn't it that : and cond empty #0 capture isupper space #1; does exactly that, capture for actual moves, and isupper space #1 checks for a potential victim in potential moves? Where am I wrong?


🕸Fergus Duniho wrote on Tue, Jul 21, 2020 03:46 PM EDT in reply to Aurelian Florea from 03:32 PM:

The first thing it does is require that the move is a capture. If it is not a capture, it will not proceed any further.


💡📝Aurelian Florea wrote on Tue, Jul 21, 2020 03:32 PM EDT:

I have corrected the post move code to:

if != const alias $moved White_Joker:
  if != const alias $moved White_Pawn:
    set last_type_moved const alias $moved;
  else:
    set last_type_moved Black_Barren_Pawn;
  endif;
endif;

and similar for black. This code works.

But the Barren_Pawn worked fine when I had done only the move part of the pawn's powers but now I have added the capture part and nothing is legal anymore. Please help if you may! The code in question is:

def Black_Barren_Pawn
checkaleap #0 #1 0 -1 and cond empty #0 not capture empty #1
or checkleap #0 #1 -1 -1 or checkleap #0 #1 1 -1 
and cond empty #0 capture isupper space #1;


🕸Fergus Duniho wrote on Tue, Jul 21, 2020 11:43 AM EDT in reply to Aurelian Florea from 09:13 AM:

It doesn't work, because you are testing the codename of the piece, but Pawn is not the codename for any piece. It is the display name for the pieces with the codenames of Black_Pawn and White_Pawn.


🕸Fergus Duniho wrote on Tue, Jul 21, 2020 11:39 AM EDT in reply to H. G. Muller from 10:05 AM:

Is that minus sign in Pawn-Range intended, or is it a typo for an underscore?

It's a hyphen, not a minus sign, and it is not a typo.


H. G. Muller wrote on Tue, Jul 21, 2020 10:05 AM EDT:

Is that minus sign in Pawn-Range intended, or is it a typo for an underscore?


💡📝Aurelian Florea wrote on Tue, Jul 21, 2020 09:13 AM EDT:

@Fergus

A few weeks ago I have figured out that the joker imitates the pawn in all things which causes the joker moves to not be allowed.

To tackle this issue I have decided to write a Barren_Pawn function that the joker will use when imitating a pawn instead of imitating the regular pawn function. Otherwise things are unchanged. The Barren_Pawn functions are:

def White_Barren_Pawn checkaleap #0 #1 1 0 and empty #1 islower space #1 and or checkaleap #0 #1 1 -1 checkaleap #0 #1 1 1;

def White_Barren_Pawn-Range merge leaps #0 1 0 leaps #0 1 1;

def Black_Barren_Pawn checkaleap #0 #1 -1 0 and empty #1 isupper space #1 and or checkaleap #0 #1 -1 -1 checkaleap #0 #1 -1 1;

def Black_Barren_Pawn-Range merge leaps #0 1 0 leaps #0 1 1;

The piece of code involving the joker imitation is:

if != const alias $moved White_Joker:
  if != const alias $moved Pawn:
    set last_type_moved const alias $moved;
  else:
    set last_type_moved White_Barren_Pawn;
  endif;
endif;

and for black:

if != const alias $moved Black_Joker:
  if != const alias $moved Pawn:
    set last_type_moved const alias $moved;
  else:
    set last_type_moved Black_Barren_Pawn;
  endif;
endif;

I thought it should easily work. Unfortunately it does not. Any idea why that is?


💡📝Aurelian Florea wrote on Mon, Jul 6, 2020 09:41 AM EDT:

Ok, thanks for the heads up. I'll try to think at something else.


🕸Fergus Duniho wrote on Mon, Jul 6, 2020 09:28 AM EDT:

I wouldn't recommend that. That doesn't sound like the correct solution to your problem.


💡📝Aurelian Florea wrote on Mon, Jul 6, 2020 08:29 AM EDT:

@Fergus

The way I had thought the game, the joker should, when imitating a pawn, get only the regular power and not promotion rights or double move privileges. And that works best with moving some of the lines in the pawn function to the pawn subroutine. It should be rather easy.


🕸Fergus Duniho wrote on Fri, Jul 3, 2020 01:02 PM EDT:

Since it works for displaying legal moves, it's probably because the Pawn functions are only for potential moves, and the Joker is trying to use one of the Pawn functions when making an actual move. Specifically, I think it fails on the line "and empty #1" in the Pawn function, because that space is occupied for an actual move. Some options include changing your rules, rewriting the Pawn functions to handle both potential and actual moves, or using a Joker subroutine for actual moves, which would let you undo the Joker's move before testing it with a function, then redoing it if it is legal.


💡📝Aurelian Florea wrote on Fri, Jul 3, 2020 07:38 AM EDT:

@Fergus,

I have unfortunately uncovered another bug on the preset for this game.

The joker can't move when imitating a pawn, although the moves are properly displayed. Any idea why?

 


💡📝Aurelian Florea wrote on Thu, Jul 2, 2020 04:51 AM EDT:

@ Fergus,

I have found the mistake. 
This piece of code was missing and adding it has solved the problem.

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


💡📝Aurelian Florea wrote on Wed, Jul 1, 2020 12:56 PM EDT:

It still gives the error:  "you may not move into check".


🕸Fergus Duniho wrote on Wed, Jul 1, 2020 12:40 PM EDT:

I didn't say to get rid of the else clause. I said to get rid of the else. Just the else. A single line of code.


💡📝Aurelian Florea wrote on Wed, Jul 1, 2020 12:40 AM EDT:

The new sub looks like this:

sub Apothecary_King from to:
if checkleap #from #to 1 1 or checkleap #from #to 1 0: 
return true;
endif;
move #to #from;
     if checkleap #from #to 1 3
     or checkleap #from #to 1 2
     and match rankname #to 1 10
     and flag #from :
         if not sub checked #from:
         move #from #to;
         return true;
         else die You may not perform the special moves out of check.;
         endif;
      endif;    
     return false;
endsub;

When trying to use regular moves out of check, I get the error "you cannot move into check.". This happens with or without the else part.


🕸Fergus Duniho wrote on Tue, Jun 30, 2020 07:54 PM EDT:

Also, add "return false;" to the very end of the subroutine.


🕸Fergus Duniho wrote on Tue, Jun 30, 2020 07:50 PM EDT:

The function looks fine. In the subroutine, you should remove the else.


💡📝Aurelian Florea wrote on Tue, Jun 30, 2020 02:45 PM EDT:

I have made the distinction between the function and the subroutine. But I still could not make work as expected.

def Apothecary_King
checkleap #0 #1 1 3
or checkleap #0 #1 1 2
and not sub checked #0
and match rankname #1 1 10
and flag #0
or checkleap #0 #1 1 0 
or checkleap #0 #1 1 1;

 

sub Apothecary_King from to:
if checkleap #from #to 1 1 or checkleap #from #to 1 0: 
return true;
endif;
move #to #from;
     if checkleap #from #to 1 3
     or checkleap #from #to 1 2
     and match rankname #to 1 10
     and flag #from :
         if sub checked #from:
         die You may not perform the special moves out of check.;
          endif;
     else:
     move #from #to;
     return true;
     endif;
endsub;


🕸Fergus Duniho wrote on Tue, Jun 30, 2020 10:03 AM EDT:

$origin should not be included in the function definition. It may be used as an argument when calling a function or subroutine, but it should not be included in the definition of one. You should check the flag before calling the checked subroutine, because that will minimize the use of the subroutine. The same goes for checking the rank of the destination. Always do less expensive operations before more expensive operations, because that will minimize the need to do the most expensive operations.


💡📝Aurelian Florea wrote on Tue, Jun 30, 2020 04:18 AM EDT:

You are saying the the checked subroutine must be used inside the function?

Like that:

def Apothecary_King
checkleap #0 #1 1 3
or checkleap #0 #1 1 2
and match rankname #1 1 10
and flag #0
and not sub checked $origin
or checkleap #0 #1 1 0 
or checkleap #0 #1 1 1;

because this does not work.


🕸Fergus Duniho wrote on Mon, Jun 29, 2020 03:15 PM EDT:

The subroutine should undo the King's move before checking whether it is in check. If the move is legal, then it should redo it. The function does not need to undo and redo the King's move, but it should make sure the King is not in check before allowing the special moves. Also, each should handle the regular moves before checking whether the King is in check. Your current subroutine is very wasteful, because it will check whether the King is in check every single time.


💡📝Aurelian Florea wrote on Mon, Jun 29, 2020 01:19 PM EDT:

I have separated the 2 codes but never are the special moves availeble. I'm not sure about what to do!


🕸Fergus Duniho wrote on Mon, Jun 29, 2020 11:38 AM EDT:

This should be handled in the Apothecary_King function and in the Apothecary_King subroutine, not externally. Furthermore, the subroutine should not call the function. Each one should handle this independently from the other.


💡📝Aurelian Florea wrote on Mon, Jun 29, 2020 10:07 AM EDT:

@Fergus

I have tried to implement the ban on special moves while the virgin king is in check. I'm far from the result.

Could you take a look at the link below?

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


💡📝Aurelian Florea wrote on Tue, Jun 23, 2020 09:52 AM EDT:

HG,

I'm not sure what placement chess is.

I was wondering if the placement of the pieces may be done automatically. Can a javascript be written to do this. and after each restart another legitimate initial position can be generated.


H. G. Muller wrote on Tue, Jun 23, 2020 09:30 AM EDT:

1. I still have not figured out how to make the squares, brouhaha

Just define a first piece with name 'hole' (the ID, move and image fields will be ignored), and a list of 'starting squares' where you want the holes to be. Then you also specify a piece to start at one of those squares. All holes act as brouhaha squares, also during the game: you can place pieces on them, and when you then move them away they revert to black.

2. It may be a nice feature to display the brouhaha squares in a different colour

I will think about it. Perhaps dark grey.

3.I don't think the shuffling works in this particular case (please read the article) but probably a javascript code is possible to do. Unfortuneatly I don't know Java script so if you can help me here I'd really apreciate it.

Well, this sounds more like placement chess with some restrictions than like shuffling. The logcal solution would be to put all the pieces in hand (except those that have fixed location, like Kings and Rooks). For easy placement just display the piece table permanently next to the board. You can do that by defining in the diagram parameters satellite=apothecary , and then somewhere on your page put a HTML element <table id="apothecaryTable"></table> . The Diagram script will then put the piece table there, rather than collapsible under the diagram, and people can directly drag the pieces to the Diagram.


💡📝Aurelian Florea wrote on Tue, Jun 23, 2020 08:34 AM EDT:

HG,

1. I still have not figured out how to make the squares, brouhaha

2. It may be a nice feature to display the brouhaha squares in a different colour

3.I don't think the shuffling works in this particular case (please read the article) but probably a javascript code is possible to do. Unfortuneatly I don't know Java script so if you can help me here I'd really apreciate it.


H. G. Muller wrote on Tue, Jun 23, 2020 05:16 AM EDT:

The Diagram does have a shuffle option now. But to make that work you should first place the pieces in some 'reference position', and then indicate in a shuffle option which piece types you want to permute. (It can then see the set of squares that should be involved in the shuffle.) Depending on whether the King has a castling move defined on it, the shuffle will respect its placement between the corner pieces during the shuffle, or not. In your case you have no castling, and there would be no restriction to the King placement.

In Chess960 the reference position would be FIDE; from this it would then know that the castling partners are Rooks, and that the King must remain between the Rooks. BTW, the Diagram does not implement Fischer castling; no way has been devised yet to indicate that in XBetza; the On notation would mean something else. Perhaps OX ? But as far as the shuffling is concerned, you could say shuffle=N!BRQK, where the exclamation point before the B indicates Bishops should be equally distributed over shades. When you ask it to do impossible things the results will be undefined.

I don't know whether this shuffle option satisfies your needs. A straightforward enhancement of it could be to allow multiple 'shuffle groups' (say comma separated in the shuffle option), where it would then apply the same shuffling as it does now to each group independently. (They had better be non-overlapping groups then, or the results would get statistical bias.)

And yes, your King move seems correct. But you should be able to see that in the XBetza sandbox, when you ask for the move diagram.

To see diagram source in a comment I usually click the 'View' link at the bottom of the comment to see it in isolation (so that I don't have to look for it on a page that contains lots of other stuff), and ask my browser to show the page source. There will still be a lot of stuff before it for the menu bar, and all the adds, but you can always use the browser search function to look for 'idiagram'.


💡📝Aurelian Florea wrote on Tue, Jun 23, 2020 04:19 AM EDT:

HG,

About the king: It does not castle bun while virgin it may leap one rank back using a knight or camel jump. I am thinking that in xbetza is : KimbsLimbsN. Is it correct?

The pieces are missing beacuse they should be added by shuffling. But for now I can;t do this. It probably should be treated as a particular case as the algorithm for placing piece from this game is rather weird, but you had said it may be done by java script.

 

Also I want to see the brouhaha code and the 960 code.


H. G. Muller wrote on Tue, Jun 23, 2020 03:31 AM EDT:

Well, if I look at your page source, I see this:

<div class="idiagram">
files=10
ranks=12
holdingsType=1
promoZone=3
promoChoice=!P*N*B*L*E*R2*J2*Q3*C3*A3
graphicsDir=../graphics.dir/alfaerie/
whitePrefix=w
blackPrefix=b
graphicsType=gif
squareSize=54
symmetry=none
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::::,
queen::::,
bishop:b:B:bishop:,
knight:n:NmZ:knight:,:1
mamluk:l:WL:camel:,:1
siege elephant:e:FAH:elephant:,
joker:j:fI:fool:,
Chancellor:c:RN:chancellor:,
archbishop:a:BN:cardinal:,
</div>

You should also see that when you edit your comment in source-code mode. (Switching the submission editor to WYSIWYG mode and then back to source code destroys the diagram, don't do it!)

Most of it looks OK, but except for the Pawns, the lists of squares where the pieces should be placed are all empty. You should have something like a2,j2,,a11,j11 for the Rooks etc., but you just have a single comma. I also see no King amongst the pieces. And in the promoChoice string you probably intend to suffix Q, C, A with '1' rather than '3', if you only allow those on the final rank. (Since you have promoZone=3, '3' would be default anyway, and would not have to be specified.)

Also, you defined the piece IDs as lower case, but in the promoChoice string you then refer to them with upper case. There isn't really any reason to define the ID for pieces other than Knight, as by default it would take the (capitalized) first character of the name.


💡📝Aurelian Florea wrote on Tue, Jun 23, 2020 02:45 AM EDT:
files=10 ranks=12 holdingsType=1 promoZone=3 promoChoice=!P*N*B*L*E*R2*J2*Q1*C1*A1 graphicsDir=../graphics.dir/alfaerie/ whitePrefix=w blackPrefix=b graphicsType=gif squareSize=54 symmetry=mirror shuffle=A:BC,:BN,ACQ hole::::a1-j1,,a12-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:NmZ:knight:c3,h3,,c10,h10:1 mamluk:L:WL:camel:d1,g1,,d12,g12:1 siege elephant:E:FAH:elephant:e1,h1,,e12,h12 joker:J:fI:fool:f1,,f12 Chancellor:C:RN:chancellor:i3,,i10 archbishop:A:BN:cardinal:b3,,b10 king:K:KimbsLimbsN:king:f3,,f10

💡📝Aurelian Florea wrote on Tue, Jun 23, 2020 12:29 AM EDT:

@Fergus,

I have moved the buggy code from the presets named apothecary-classic and apothecary-modern to the apothecary2working and apothecary1working.

The code I had mentioned before:

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;

introduces a bug.  Sometimes the message A King may not use the special moves out of check. is displayed seemingly randomly when non-king pieces are moved. That I had checked with the play at same location feature.

Have you any idea on how to fix this bug?


🕸Fergus Duniho wrote on Mon, Jun 22, 2020 03:20 PM EDT:

It sounds like you modified the code of an ongoing game in a way that retroactively made a past move illegal.


💡📝Aurelian Florea wrote on Mon, Jun 22, 2020 07:55 AM EDT:

@Fergus,

I have copied the code from Apothecary-Modern here, and when I test the preset it seems fine, but when I try to move in an ongoing game of Apothecary Classic, I receive the error saying I've made special moves out of check.

Any idea why?


💡📝Aurelian Florea wrote on Thu, Jun 11, 2020 03:53 AM EDT:

@Thor

I had sent you an invitation with the new preset.


💡📝Aurelian Florea wrote on Tue, Jun 9, 2020 11:19 AM EDT:

In the light of recent disuctions in the sister game, I have updated the rules for this game and brushed up a bit the article.

Also the preset allows the game to be played here.


💡📝Aurelian Florea wrote on Mon, May 25, 2020 12:05 AM EDT:

It works!... I'm so happy!...


🕸Fergus Duniho wrote on Sun, May 24, 2020 11:20 PM EDT:

I'm on my ereader right now and won't be back on my computer until tomorrow morning, which is even later than your morning. My main suggestion for now is to replace #last_type_piece with var last_type_piece in the four Joker* functions, because this sometimes makes a difference.


💡📝Aurelian Florea wrote on Sun, May 24, 2020 11:02 PM EDT:

Any joker move would do.

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

you can find the preset in question. Just move a white mameluke (the camel picture), and then try to move the joker.


🕸Fergus Duniho wrote on Sun, May 24, 2020 02:56 PM EDT:

Without seeing the game in which that is a move, I cannot tell what is going on.


💡📝Aurelian Florea wrote on Sun, May 24, 2020 01:11 PM EDT:

Now when I try to move the joker in a correct manner I get this:

You may not move your White Joker from e1 to f4.

I recognize this line. It is from the post move section and it prevents things like moving one's queen like a knight.

As no moves were displayed either, I think this could be from an error in updating the joker's identity.


💡📝Aurelian Florea wrote on Sun, May 24, 2020 12:38 PM EDT:

Ok!


🕸Fergus Duniho wrote on Sun, May 24, 2020 11:07 AM EDT:

Stick to one or the other. I wasn't paying careful attention to what I already wrote.


💡📝Aurelian Florea wrote on Sun, May 24, 2020 10:29 AM EDT:

You have wrote both last_piece_moved and last_type_moved. Are they different entities and I'm missing something or something else?


🕸Fergus Duniho wrote on Sun, May 24, 2020 10:14 AM EDT:

You may also need this:

  def None-Range ();

🕸Fergus Duniho wrote on Sun, May 24, 2020 10:09 AM EDT:

The function '#last_piece_moved' has not been defined. Its arguments are e10 f2

A variable appears as a string literal when it has not been defined. Make sure that last_piece_moved has a value assigned to it.

The function 'White_Joker-Range' has not been defined. Its arguments are e1

I didn't give you any code for defining this, but it needs to be defined.

def White_Joker-Range fn join str_replace "Black_" "White_" #last_piece_moved "-Range" #0;
def Black_Joker-Range fn join str_replace "White_" "Black_" #last_piece_moved "-Range" #0;

💡📝Aurelian Florea wrote on Sun, May 24, 2020 09:51 AM EDT:

Now the error is ;

The function 'White_Joker-Range' has not been defined. Its arguments are e1


💡📝Aurelian Florea wrote on Sun, May 24, 2020 09:33 AM EDT:

Yes, you are correct, it was the joker, but now I'm getting:

The function '#last_piece_moved' has not been defined. Its arguments are e10 f2

That happens in the checked subroutine at the line:

if fn const alias #piece #from var king

I had solved that one. There was a line where I wrote last_piece_moved instead of last_type_moved. 

 


🕸Fergus Duniho wrote on Sun, May 24, 2020 08:57 AM EDT:

That kind of error comes from not assigning a codename to a label you use for notation. It could be any piece. Make sure every piece in the game is fully defined.


💡📝Aurelian Florea wrote on Sun, May 24, 2020 12:34 AM EDT:

For now I use code which starts the joker on the board and not in hand. That to make it easier to isolate bugs.

But I'm getting the error:

The function '' has not been defined. Its arguments are e10 f2

It is at the for each where checks are tested. Could it be because of the special king?


🕸Fergus Duniho wrote on Sat, May 23, 2020 05:20 PM EDT:

Since I made White_Joker and Black_Joker separate pieces, use this code in White's Post-Move section:

if != const alias $moved White_Joker:
  set last_type_moved const alias $moved;
endif;

Use the same code for Black's but substitute Black_Joker for White_Joker.


🕸Fergus Duniho wrote on Sat, May 23, 2020 01:15 PM EDT:

I think these should work. Where a piece has a different definition for each side, it will use that for the piece on its own side. The other code for setting last_piece_moved should be used with this. This variable should be initialised in the Pre-Game section, and it should be updated in each Post-Move section. I rewrote None to include the two arguments for origin and destination as other piece functions do. Since it's a contradiction, it will always return false.

  def None == #0 #1 and != #0 #1;
  def White_Joker fn str_replace "Black_" "White_" #last_piece_moved #0 #1;
  def Black_Joker fn str_replace "White_" "Black_" #last_piece_moved #0 #1;

💡📝Aurelian Florea wrote on Sat, May 23, 2020 12:13 PM EDT:

Would the White Joker be able to move as a Black Pawn or as a White Pawn? 

So far I've played whith the joker always imitating it's own pieces when they have different moves. So the white joker moves like a white pawn when imitating a black pawn. That makes sense to me more as generally speaking pawns advance, so should the joker. Maybe if you think about it a little you would feel quite awkward with your piece moving backwards. But when moving as a pawn the joker may not promote.

Thanks for your help! 


🕸Fergus Duniho wrote on Sat, May 23, 2020 12:05 PM EDT:

First of all, you want to keep track of the last type of piece moved, and to start off with, it needs an initial default value.

set last_type_moved None;
def None false;

I'm thinking this could work for tracking the last piece moved:

  if != const alias $moved Joker:
    set last_type_moved const alias $moved;
  endif

This keeps track of the last piece moved using its codename, which matches the function name used for how it moves. But now I have another question. Suppose that the last piece moved was a Black Pawn. Would the White Joker be able to move as a Black Pawn or as a White Pawn?


💡📝Aurelian Florea wrote on Sat, May 23, 2020 09:45 AM EDT:

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 Sun, May 10, 2020 08:04 AM EDT:

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


💡📝Aurelian Florea wrote on Wed, May 6, 2020 03:19 AM EDT:

Becuuase 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 Wed, May 6, 2020 03:17 AM EDT:

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.


H. G. Muller wrote on Thu, Mar 26, 2020 08:01 AM EDT:

Indeed, if there is a diagonal path from Joker to King, Bishops and Queens would be pinned.

If there is a diagonal path of a black Joker to f1 (say from d3), I would not think that this would forbid O-O, because it also doesn't forbid Kf1,

The tricky question is what to do when the Joker has a diagonal path do e1 (say from c3). Can white castle now, or is he in check, and consequently cannot? This again depends on how one imagines the Joker to move after a turn pass. And if he keeps his old move in that case, it depends on the previously moved piece.


💡📝Aurelian Florea wrote on Thu, Mar 26, 2020 06:30 AM EDT:

HG,

Some interpretation could be on game by game basic and it's inventor should cover all details. I have not thought on everything, but the joker is definetly an interesting piece.

As you stated the rule :"Checking power is defined as the ability to make an actual capture after the opponent passes his turn (thus giving the turn back to the owner of the checking piece)." you agree with me when I had said that if the joker in unbostucted on the same diagonal with the king all the bishops friendly to the king are pinned.


H. G. Muller wrote on Thu, Mar 26, 2020 05:57 AM EDT:

But that's not true of other pieces. Other pieces retain checking power during the opponent's move.

That is exactly what I disagre with. Checking power is defined as the ability to make an actual capture after the opponent passes his turn (thus giving the turn back to the owner of the checking piece).

So the question is really how the Joker must move after a turn pass, because such a turn pass cannot be assigned to any particular piece. Must it then also pass its turn, or does it retain the powers it had on the move before? This question is important to distinguish checkmate from stalemate.

For 'passing through check' turn passing plays no role, though. The King was already moving when it reached the square it aims to pass through. The logical approach is to evaluate the situation under the fiction that he would stop there, and then the last move would have been a King move. So I would say the Joker has to be assumed to move as a King in order to judge whether the King passed through its attack. Even when the ultimate rule for Joker movement after a complete castling would be that it should move like a Rook. (E.g. because castling according to FIDE rules must first move the King, and then the Rook, so the Rook would be the last moved piece.)


💡📝Aurelian Florea wrote on Wed, Mar 25, 2020 01:26 PM EDT:

When you'll succeed with the joker piece there will still be work to be done with the 2 apothecaries. I can do this part I think. I currently have 1 working preset for each baring the presence of a joker.


90 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.