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

Comments/Ratings for a Single Item

LatestLater Reverse Order EarlierEarliest
Apothecary Chess-Classic. Large board variant obtained through tinkering with known games.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Mon, Jun 29, 2020 07:15 PM UTC:

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 05:19 PM UTC:

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 03:38 PM UTC:

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 02:07 PM UTC:

@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 01:52 PM UTC:

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 01:30 PM UTC:

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 12:34 PM UTC:

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 09:16 AM UTC:

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 08:19 AM UTC:

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 07:31 AM UTC:

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 06:45 AM UTC:
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 04:29 AM UTC:

@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 07:20 PM UTC:

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 11:55 AM UTC:

@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 07:53 AM UTC:

@Thor

I had sent you an invitation with the new preset.


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

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 04:05 AM UTC:

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


🕸Fergus Duniho wrote on Mon, May 25, 2020 03:20 AM UTC:

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 Mon, May 25, 2020 03:02 AM UTC:

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 06:56 PM UTC:

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 05:11 PM UTC:

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 04:38 PM UTC:

Ok!


🕸Fergus Duniho wrote on Sun, May 24, 2020 03:07 PM UTC:

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 02:29 PM UTC:

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 02:14 PM UTC:

You may also need this:

  def None-Range ();

25 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.