Check out Symmetric Chess, our featured variant for March, 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
Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, Mar 15 10:33 AM UTC in reply to Daniel Zacharias from 09:14 AM:

I tried something similar, and it does work as expected using betzaNew.js. But not with betza.js. Which does surprise me, as I had not expected it to be different in this respect, so I will look into that.

And make sure to set maxPromote=0 to disable the normal promotion by zone rather than by morph.

[Edit] It appears that multiple promotion sets were never implemented in betza.js.


Daniel Zacharias wrote on Fri, Mar 15 09:14 AM UTC:

I don't understand how to use morph for optional promotions. I have promoChoice=W/PH/PF/PQ/PS/VH/VF/VQ/VS and two pieces, P and V, with morph=*/5/6/7/8 and morph=*/1/2/3/4 but it won't work right. What I expect is that each piece would have one optional promotion on each of the 4 ranks before the last. Instead, they either get all the promotion options at the same time or none.


💡📝H. G. Muller wrote on Thu, Mar 14 09:49 PM UTC in reply to A. M. DeWitt from 09:18 PM:

I have now done that too. But betzaNewer.js is experimental, and sooner or later will replace betzaNew.js and disappear itself (because it is fully compatible).


A. M. DeWitt wrote on Thu, Mar 14 09:18 PM UTC in reply to H. G. Muller from 08:15 PM:

Let's not forget about betzaNewer.js (the one with the experimental Shogi promotion system).


💡📝H. G. Muller wrote on Thu, Mar 14 08:15 PM UTC in reply to A. M. DeWitt from 07:25 PM:

It would be really nice if you could deselect a piece that you have just selected in the holdings.

OK, I now implemented this both in betza.js and betzaNew.js. (Every click in the holdings was treated as a first click, to prevent you could move pieces into the holdings, or between holdings squares. But a click on the already selected piece there indeed deserves to be an exception.)

@Fergus: I can no longer upload these .js scripts through the File Manager page of the Interactive Diagrams article. I get this error message:

Upload of /home/chessvariants/public_html/membergraphics/MSinteractive-diagrams/betza.js was allowed but failed! The cause of failure is unknown.

Upload through WinSCP still works.


A. M. DeWitt wrote on Thu, Mar 14 07:25 PM UTC:

It would be really nice if you could deselect a piece that you have just selected in the holdings. Currently this is not possible without selecting another piece in the holdings or dropping the selected piece on the board.


Bob Greenwade wrote on Sat, Feb 24 02:53 PM UTC in reply to H. G. Muller from 06:50 AM:

I must've misunderstood from an earlier conversation that multiple spells were possible if spell=defensatrate (or whatever) was put on a line after a piece listing. My mistake. (Maybe that was just something you were contemplating or considerring.)


💡📝H. G. Muller wrote on Sat, Feb 24 06:50 AM UTC in reply to Daniel Zacharias from 12:41 AM:

Currently you cannot even have more than one spell in the entire game. So anti-spell spells would not be useful.


Daniel Zacharias wrote on Sat, Feb 24 12:41 AM UTC:

Is it possible for a single piece to have multiple spells? I've been trying to come up with an ultima variant, and I had a few ideas that might be good as spells.

  • unfreeze - unfreezes frozen friends
  • neutralize - disables spells of affected enemy pieces (two overlapping neutralizers would have no affect on anything but each other)
  • empower - enables affected friendly pieces to capture protected enemies

Bob Greenwade wrote on Wed, Feb 21 03:12 PM UTC in reply to H. G. Muller from 07:03 AM:

So if I were to implement a parameter transparency=N, I would implement that by just filling the entire column of the capture matrix for piece number N with the code for transparency.

If that's the result, that's fine. (It'd be only on the "friendly" side, of course.)

I have grown an aversion agains specifying pieces by number, though; it is a frequent source of bugs when you decide to add or remove a piece later. So it would be better to allow a (possibly comma-separated) list of piece IDs here.

I agree 100%. I've run afoul of that several times while building the larger Kagamigi variants.

Comma-separated, yes, please. Not all games can be handled with single-letter codes (see Short Sliders).


Lev Grigoriev wrote on Wed, Feb 21 07:54 AM UTC in reply to H. G. Muller from 07:03 AM:

So if I were to implement a parameter transparency=N, I would implement that by just filling the entire column of the capture matrix for piece number N with the code for transparency.

Does it mean that Re-Ghost Chess with ghosts transparent for sliders is implementable here?


💡📝H. G. Muller wrote on Wed, Feb 21 07:03 AM UTC in reply to Bob Greenwade from Tue Feb 20 11:23 PM:

Well, unlike features such as contagion and ironness tranparency cannot be implemented as a filter on the generated moves, but would have to be implemented within the slider loop of move generator. In this respect it is similar to the already implemented ban on hopping. (As the final move does neither show what you hopped over, nor what empty squares you passed through.)

But wherever it is implemented, it has to test whether the slider loop should terminate or can continue after skipping the square, based on the piece type of the encountered piece. And in that case it might as well check the piece type of the moving piece as well, by looking in captureMatrix[attacker][victim] rather than in some newly created table transparency[victim]. So if I were to implement a parameter transparency=N, I would implement that by just filling the entire column of the capture matrix for piece number N with the code for transparency.

I have grown an aversion agains specifying pieces by number, though; it is a frequent source of bugs when you decide to add or remove a piece later. So it would be better to allow a (possibly comma-separated) list of piece IDs here. That is a bit harder to implement, because you can interpret it only after al pieces have been defined, but I already did something like that for the royal parameter.

The problem with an interface that shows the entire capture matrix at once is that for a large game it might not fit the screen. And usually capture matrices are quite sparsely populated. There are only a few special pieces, that either have their colun or their row set to something (possibly with some exceptions). But I am always open to good interface ideas.


Bob Greenwade wrote on Tue, Feb 20 11:23 PM UTC in reply to H. G. Muller from 10:06 PM:

I'm not against the captureMatrix, but without a good captureMatrix builder (one that shows a complete table and not just one piece at a time, as the Beta PTA gives) it's a little hard to use. From a user standpoint, at least, it would be easier to have something like transparent=N as a parameter alongside iron, antiTrade, and others in that group. Even so, I'm not sure from a programmer's standpoint whether it'd be easier to implement it that way, or build a full-scale Capture Matrix Wizard (which I'd adore in any event).


Daniel Zacharias wrote on Tue, Feb 20 10:57 PM UTC:

What am I doing wrong here?

files=8 ranks=8 promoZone=2 maxPromote=2 promoChoice=R/PA,N/PB,N graphicsDir=/graphics.dir/alfaeriePNG/ squareSize=50 graphicsType=png symmetry=none pawn:PA:ifmnDfmWfceF:pawn:e2,f2,g2,h2,,e7,f7,g7,h7 morph=*/1 berolina pawn:PB:fmFfceWifnmA:berolinapawn:a2,b2,c2,d2,,a7,b7,c7,d7 morph=*/2 knight:N:N:knight:g1,,g8 rook:R:R:rook:b1,,b8 king (fast castle):K:KispO6:king:e1,,e8

💡📝H. G. Muller wrote on Tue, Feb 20 10:06 PM UTC in reply to Bob Greenwade from 07:11 PM:

How would you do a piece that hides itself, though?

Pieces don't hide themselves; they just are transparent. Unfortunately transparency is currently not supported, other than making all sliders also hoppers, and then use the captureMatrix to forbid them to hop over anything except the transparent piece. It would of course be more convenient if there was a special symbol in the captureMatrix to tell that one type can slide through another. This might be implemented some day.


Bob Greenwade wrote on Tue, Feb 20 07:11 PM UTC in reply to H. G. Muller from Sun Feb 18 08:34 AM:

As to the spell zone: pieces are always immune to thir own spell, specifying a zone of only the square they stand on would have no effect. How would you imagine a piece that (passively) burns itself? Or freezes itself, or brakes itself, or protects itself? The latter three already exist as pieces without moves, steppers and iron pieces.

How would you do a piece that hides itself, though?

(I see the problem with the freeze -- though I still wish there could be a KAND option somehow. Or at least K2.)


💡📝H. G. Muller wrote on Tue, Feb 20 07:08 AM UTC in reply to Daniel Zacharias from 04:25 AM:

You can do that through the captureMatrix. Just fill the entire column for the contageous piece with its own ID, except in its own row. The capture matrix has basically  made the contageous and anti-trade parameters obsolete; it can do all that in a much more precise way.

[Edit] I suppose the question was for if you had various contageous types, so you would have multiple columns with automatic promotion to the captured type, and you would just leave the rows of the pieces that are immune to this blank; That could also be the pieces that are contageous. You can even make them immune to some, but not to others.


Daniel Zacharias wrote on Tue, Feb 20 04:25 AM UTC:

Is there a way to have a piece be both contageous and immune to contageon?


💡📝H. G. Muller wrote on Sun, Feb 18 08:34 AM UTC in reply to Bob Greenwade from 02:22 AM:

Indeed. The Ko Nets are problematic, as are other Gorgon type of pieces. Because the don't really cast the spell as a fixed zone, but as a sliding move that can be blocked. So the zone doesn't only change on their own move, which is what the Diagram's implementation of spellZone assumes. The Gorgon effect is similar to the rule that you cannot castle out of check, which is again related to e.p. capture; one could say that the latter is en depart capture. Castling creates e.p. rights not only on the squares the King passed through, but also on the square it came from. And any piece type can use those rights, not just Pawn. This is how the Diagram's AI implements the ban on castling out of check; it makes it look like exposing the King to (e.p.) capture.

Gorgons could be implemented in a similar way, by adopting the rule that a Gorgon move to the origin of the preceding move must be scored as an immediate win. The square of origin becomes a kind of e.p. square for exclusive use by Gorgons, while a thus captured piece counts as absolute royal. I guess this could be specified in the captureMatrix as a new symbol, so that you could specify in a type-selective way which pieces are paralyzed by a Gorgon. An alternative is adding 'Gorgon capture' as a new mode to XBetza.

As to the spell zone: pieces are always immune to thir own spell, specifying a zone of only the square they stand on would have no effect. How would you imagine a piece that (passively) burns itself? Or freezes itself, or brakes itself, or protects itself? The latter three already exist as pieces without moves, steppers and iron pieces.


Bob Greenwade wrote on Sun, Feb 18 02:22 AM UTC in reply to H. G. Muller from Sat Feb 17 10:10 PM:

The spellZone is defined as a bitmap held in an integer, so the number of squares is limited. The N option was in fact already extra, since I didn't know any variant that would need anything else than K. or a subset thereoff. In absence of variants that actually use it, I would not extend it. (And that doesn't count variants that are intentionally designed to break the limit, as that could be done for any limit...)

Hm. So I guess I'm out of luck if I want a two-space perimeter for a spellZone -- much less the Skyward Net and Earthward Net in Ko Shogi.

Spells do not affect the piece that casts them, and I don't see why they should. The piece is always in the spell zone, so whatever the spell does simply becomes a piece property.

"Affects only itself" is basically the effect I was looking for. I just don't know how to shut down the other spaces. spellZone=0?


💡📝H. G. Muller wrote on Sat, Feb 17 10:10 PM UTC in reply to Bob Greenwade from 03:18 PM:

The spellZone is defined as a bitmap held in an integer, so the number of squares is limited. The N option was in fact already extra, since I didn't know any variant that would need anything else than K. or a subset thereoff. In absence of variants that actually use it, I would not extend it. (And that doesn't count variants that are intentionally designed to break the limit, as that could be done for any limit...)

Spells do not affect the piece that casts them, and I don't see why they should. The piece is always in the spell zone, so whatever the spell does simply becomes a piece property.


Bob Greenwade wrote on Sat, Feb 17 03:18 PM UTC:

Two quick questions; I suspect the answer to both is (or boils down to) "not currently, but perhaps some time in the not-too-distant future."

1. Can blastZone or spellZone be something like (for example) KNS? or AXNX?

2. Can the hide spell be used to make the piece itself "hoppable"?


💡📝H. G. Muller wrote on Thu, Feb 15 07:44 AM UTC in reply to Daniel Zacharias from 03:56 AM:

In the promoChoice the pieces must optionally be separated by commas. That is, if there is a comma anywhere in the string, the string is split at the commas to get the piece IDs. If not, strange things could happen if the piece IDs are not single letters. (It then just looks if the ID occurs as a substring, while otherwise it looks whether the ID sandwidched between commas is occurs as a substring of promoOffset sandwidched between commas.)

It is on the to-do list to use the same system in individual rows of the morph and captureMatrix. So that you would not have to use commas throughout the entire matrix if you need it in just a few rows. (Usually these matrices are pretty sparse.) If you really need this I could give implementation of this priority.

A * refers to the first set in promoChoice, a 1 to the second. (Or one could imagine counting of the sets starts at 0.) This is partly historic accident, as a 0 in the captureMatrix was already defined as kamikaze capture before alternate sets were introduced and the the promotion zone was indicated by *.

There is a subtlety here that I did not foresee, and yet has to be resolved: would you promote on entering the zone, or in every case where you end the move in it. This becomes important when you can defer promotion, (which is standard in shogi variants), or in a more general case whenever you can promote to pieces that themselves can promote. It seems undesirable to have different behavior here on promotions specified by morph=* and those controlled by promoZone/maxPromote, as the main reason for introducing * in the morph boards was to handle irregular promotion zones (e.g. on diamond-shaped boards, or in diagonal variants). But I don't think this is currently the case. (The current rules for the normal zone are complex anyway, and depend on promoOffset and holdingsType, to get the desired behavior in regular Shogi, Chu Shogi and Grand Chess.)

Since 0 has no meaning yet in the morph boards (defining squares where pieces would disappear seemed pointless; no one would move there, and you might as well make them inaccessible), it could be made to refer to the first promoChoice set, but with alternative rules w.r.t. where you came from.

[Edit] It appears the comma notation was already implemented for morph. I now also implemented it in captureMatrix. (All untested, though, and only in betzaNew.js.)


Daniel Zacharias wrote on Thu, Feb 15 03:56 AM UTC:

I have two questions. Is there a way to group letters for games that need piece ids longer than a single character? And, does 1 in the morph section refer to the first promotion set or the second?


Bob Greenwade wrote on Wed, Feb 7 03:02 PM UTC in reply to H. G. Muller from 06:52 AM:

I didn't realize that the apostrophe could be used for that! Cool! It doesn't cover all cases where that'd be used (such as if the piece also promotes under other circumstances), but it's a big start.


25 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.