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

Comments/Ratings for a Single Item

EarliestEarlier Reverse Order LaterLatest
Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Wed, Jul 6, 2022 08:29 AM UTC in reply to Aurelian Florea from 07:09 AM:

Ah, sorry. I thought you wanted to allow both kinds of Pawns to promote to each other. But you want to exclude it. (Why would you want that, btw? It would be a nice tactical twist if it was allowed.)

I am afraid that BadZone cannot be used to veto promotions, because it does not get the promotion piece passed as a parameter. I wonder if it is worth it to implement some general solution for this problem, which can be summarized as that you want to allow the promoting pieces to refrain from promoting on some ranks, but you don't want to allow them to promote to each other. Adding their types to the possible promotion choices for that rank then would not work. It would be nice if a special symbol like 'self' could be added to the set of choices to indicate the type of the moving piece. I will think about it.

And you are right about the other thing: the AI of the Diagram appears to ignore the promotion restrictions.


catugo wrote on Wed, Jul 6, 2022 08:42 AM UTC in reply to H. G. Muller from 08:29 AM:

Thanks, HG!


Aurelian Florea wrote on Wed, Jul 6, 2022 01:17 PM UTC in reply to H. G. Muller from 08:29 AM:

@HG,

On the previous rank the promoting pawn basically has a sergeant power (fWfA). This is to difficult to stop in my opinion.


💡📝H. G. Muller wrote on Thu, Jul 7, 2022 09:20 AM UTC in reply to Aurelian Florea from Wed Jul 6 01:17 PM:

I now implemented the 'self option' in the betza.txt include file:

Just remove the p and x from all the sets in the promotab, and replace it by the word self. (Always lower case, even in the sets of white pieces.) If this word is in the set the piece name of the moving piece will be added to the choices before further processing. This way you prevent there will be an x in the set when the mover is a p, or a p in the set when the mover is an x.

Perhaps you can test this; I did not test it myself, but it was a very simple change.


Aurelian Florea wrote on Thu, Jul 7, 2022 10:39 AM UTC in reply to H. G. Muller from 09:20 AM:

That is great. I'll be testing it soon!


Aurelian Florea wrote on Thu, Jul 7, 2022 01:08 PM UTC in reply to H. G. Muller from 09:20 AM:

@HG There is also a peculiar situation in the Grand Apothecary chess games given by the brouhaha squares. Technically pawns should not reach there and that is easily done by adjusting the promotab so that you are forced to promote before reaching the brouhaha squares. But I'm not sure how easy it is for the interactive diagram.


Aurelian Florea wrote on Thu, Jul 7, 2022 03:52 PM UTC in reply to H. G. Muller from 09:20 AM:

It seems that staying a pawn does not work. Is that because the self pieces do not appear in the supply array?


💡📝H. G. Muller wrote on Thu, Jul 7, 2022 08:29 PM UTC in reply to Aurelian Florea from 03:52 PM:

Oh yes, I forgot to tell that. The rule that you cannot promote to pieces that are not captured and not in the supply array remains applicable. So it should allow 'promotion to self' if a pawn of that type was already captured, but this is probably not the way you tested it. So add p and x to the supply array.


Aurelian Florea wrote on Fri, Jul 8, 2022 09:21 AM UTC in reply to H. G. Muller from Thu Jul 7 08:29 PM:

No, it does not work with (P 10 p 10 X 10 x 10) nor with (P p X x)


💡📝H. G. Muller wrote on Sat, Jul 9, 2022 03:05 PM UTC in reply to Aurelian Florea from Fri Jul 8 09:21 AM:

Sorry, I managed to produce a bug in this simple change after all, swapping the arguments of a GAME-code 'push' instruction. Now it should work, and I actually tested it on one of your presets.

BTW, the numbers you put in the supply array are meaningless. But they do not hurt.


Aurelian Florea wrote on Sat, Jul 9, 2022 04:52 PM UTC in reply to H. G. Muller from 03:05 PM:

OK, Thanks


Aurelian Florea wrote on Sat, Jul 9, 2022 04:53 PM UTC in reply to H. G. Muller from 03:05 PM:

But how do I put 2 bishops in the supply array?


💡📝H. G. Muller wrote on Sat, Jul 9, 2022 06:01 PM UTC in reply to Aurelian Florea from 04:53 PM:

You cannot. The supply array is for indicating what piece types are in infinit supply. If a piece is not in there you can only promote to it when it was captured.


Aurelian Florea wrote on Sun, Jul 10, 2022 10:35 AM UTC in reply to H. G. Muller from Sat Jul 9 06:01 PM:

Well I can manipulate the captured pieces array. I did that before! Thanks!


💡📝H. G. Muller wrote on Sun, Jul 10, 2022 11:01 AM UTC:

I am not sure why you would even bother to limit the number of Bishop promotions to 2 (if the original Bishops are still present). Like anyone would ever want to promote to Bishop... In practice promotions would never occur when there still are enough super-pieces around to prevent them. So even with promotion to captured pieces only there would always be something much better than a Bishop available. It is quite inconceivable that the opponent would have blundered away so many pieces that he can no longer stop promotion, while you would not have lost a single piece better than a Bishop.

So it seems a totally useless rule. Even when you would grant an infinite supply of Bishops, no one would ever want to use one. Let alone 3.


Aurelian Florea wrote on Sun, Jul 10, 2022 01:02 PM UTC in reply to H. G. Muller from 11:01 AM:

This game, like Gross chess has promotion limited by rank. Bishops are easier to promote earlier in the game.


💡📝H. G. Muller wrote on Sun, Jul 10, 2022 01:30 PM UTC in reply to Aurelian Florea from 01:02 PM:

I understand that, but that is not a reason for allowing your opponent to promote, anymore than you would let him capture one of your Bishops with a Pawn (which would also give him a Bishop for a Pawn, if the Bishop was protected). In real games there never are any promotions 'early in the game'. At least not any where the promoted piece is allowed to survive. And there certainly will not be more than two. So if you want a Bishop to be available early in the game for the one-in-a-million case that someone would be allowed to promote and would want one, you might as well make it available in unlimited supply. How many games would have more than 2 promotions in total anyway? Usually the first promotion decides the game.


Aurelian Florea wrote on Sun, Jul 10, 2022 05:11 PM UTC in reply to H. G. Muller from 01:30 PM:

I see your point, HG. You are probably correct but I'll do it my way. It can't really hurt. Unless I blunder a bug anyway.


💡📝H. G. Muller wrote on Mon, Jul 11, 2022 02:02 PM UTC in reply to Aurelian Florea from Sun Jul 10 05:11 PM:

This is a test for how to implement immobilizers with the Interactive Diagram, through a user-supplied function BadZone(). The Queen here immobilizes all adjacent enemy pieces.

files=8 ranks=8 promoZone=1 promoChoice=NBRQ graphicsDir=/graphics.dir/alfaeriePNG/ squareSize=50 graphicsType=png pawn:P:ifmnDfmWfceF:pawn:a2,b2,c2,d2,e2,f2,g2,h2,,a7,b7,c7,d7,e7,f7,g7,h7 knight:N:N:knight:b1,g1,,b8,g8 bishop:B:B:bishop:c1,f1,,c8,f8 rook:R:R:rook:a1,h1,,a8,h8 queen:Q:Q:queen:d1,,d8 king:K:KisO2:king:e1,,e8

This was already possible before, by having the function BadZone() examine all board squares adjacent to the origin of the move, and vetoing the move (by returning non-zero) when an enemy immobilizer was found there. This was quite inefficient, though, as it would be done for every potential move of the immobilized piece.

I now changed the Diagram Script such that BadZone() can remember the result of any test it does in a variable 'frozen', set to -1 whenever move generation for a new piece starts. So that it can get the result of a previous test for the same piece from there, rather than redoing the test. And by setting frozen = 100 it can even abort generation of moves for the current piece altogether.


Jean-Louis Cazaux wrote on Mon, Jul 11, 2022 05:22 PM UTC in reply to H. G. Muller from 02:02 PM:

Seems to work. What a mighty piece!


💡📝H. G. Muller wrote on Mon, Jul 11, 2022 06:06 PM UTC in reply to Jean-Louis Cazaux from 05:22 PM:

Indeed, it would not make sense to use this in a FIDE context. But it might fit in with the Tenjiku-Shogi crowd. After all, getting paralyzed is not nearly as bad as getting burned.


Ben Reiniger wrote on Tue, Jul 12, 2022 04:34 PM UTC:

The immobilizer works for me when moving pieces around, but not when playing against the AI.


💡📝H. G. Muller wrote on Tue, Jul 12, 2022 05:20 PM UTC in reply to Ben Reiniger from 04:34 PM:

Refresh your browser cache (Shift + reload on FireFox), or you would still be using the old Diagram script.


Aurelian Florea wrote on Sat, Jul 30, 2022 02:46 PM UTC:

I remember there being a way to save and load games for the interative diagram. I cannot find where. Any ideas of how to do it?


💡📝H. G. Muller wrote on Sat, Jul 30, 2022 08:14 PM UTC in reply to Aurelian Florea from 02:46 PM:

There is no real save function. Under the buttons in the AI bar there is a text box where the game record will appear, and you can copy-paste that to a place where you want to store it. You can paste such a game back into that same text box to load it into the Diagram again.


Aurelian Florea wrote on Sat, Jul 30, 2022 08:21 PM UTC in reply to H. G. Muller from 08:14 PM:

Can it be a non finished game?


💡📝H. G. Muller wrote on Sat, Jul 30, 2022 09:05 PM UTC in reply to Aurelian Florea from 08:21 PM:

Yes it can, and you should be able to continue it in that case. Either by making a move, or pressing the Move button.


Aurelian Florea wrote on Sun, Jul 31, 2022 07:36 AM UTC in reply to H. G. Muller from Sat Jul 30 09:05 PM:

Well HG, for me it does not work. I use edge. Can this be the problem?


28 comments displayed

EarliestEarlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.