Check out Balbo's Chess, our featured variant for October, 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 ]

Ratings & Comments

EarliestEarlier Reverse Order LaterLatest
Homo Scacco. Several games with pieces of same type and a royal amongst them. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
🔔Notification on Tue, Jul 16 08:24 PM UTC:

The author, Lev Grigoriev, has updated this page.


Chu Shogi. (Updated!) Historic Japanese favorite, featuring a multi-capturing Lion. (12x12, Cells: 144) (Recognized!)[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Tue, Jul 16 09:36 PM UTC in reply to H. G. Muller from 07:52 PM:

Thanks for fixing this! Now the ID's AI plays Chu Shogi properly.

I did notice a visual bug with CountRoyals() where it counts a piece with the protected/counterStrike property as royal if there are no true royals of the same color on the board. This probably has something to do with how values in the royalness array are interpreted within the function.

Not a big deal for normal diagrams, but may affect highlights of diagrams where one side has no royals, like those of tsume problems. Fixing it is not really a high priority for me, but I figured I should let you know anyway.


📝H. G. Muller wrote on Wed, Jul 17 07:51 AM UTC in reply to A. M. DeWitt from Tue Jul 16 09:36 PM:

Actually every move should be marked as illegal for a player that has no royal in a game where royals are defined. It is just that the absence of royalty is only tested when a piece with special (royalty, baring, anti-trading) properties is captured, as the AI assumes royalty still exists before the move, or the search branch would already have been terminated earlier. So it only tests it when it could have changed.

I guess the current AI would choke on tsume positions without King.

[Edit] For the purpose of highlighting the legality test now assumes a royaltyCount of 1 in the current position when in reality royaltyCount <= 0. In terms of scoring this fakes a single royal for the side that has none.


Little Rider Reef. Overcome the reef. (11x11, Cells: 110) [All Comments] [Add Comment or Rating]
💡📝Gerd Degens wrote on Wed, Jul 17 11:54 AM UTC:

New proposal. Could be ready for review.


Chu Shogi. (Updated!) Historic Japanese favorite, featuring a multi-capturing Lion. (12x12, Cells: 144) (Recognized!)[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Wed, Jul 17 02:20 PM UTC in reply to H. G. Muller from 07:51 AM:

Actually every move should be marked as illegal for a player that has no royal in a game where royals are defined. It is just that the absence of royalty is only tested when a piece with special (royalty, baring, anti-trading) properties is captured, as the AI assumes royalty still exists before the move, or the search branch would already have been terminated earlier. So it only tests it when it could have changed.

[Edit] For the purpose of highlighting the legality test now assumes a royaltyCount of 1 in the current position when in reality royaltyCount <= 0. In terms of scoring this fakes a single royal for the side that has none.

Technically you are right about that first point. I guess it was less of a visual bug and more of an inconvenience for tsume diagrams that would cause confusion for the solver, especially for large libraries of tsume problems like what I have in my Applet. Thanks for fixing it anyway, though.


Storm the Ivory Tower. A Smess adaptation of Chinese Chess. (9x10, Cells: 90) [All Comments] [Add Comment or Rating]
🕸💡📝Fergus Duniho wrote on Wed, Jul 17 03:40 PM UTC in reply to H. G. Muller from Tue Jul 16 02:22 PM:
In general what one would have to supply is a move set for every square, and that for every piece type, as not in every variant we will be so lucky that Numskulls and Ninnies on the same square must also move in the same directions.

This is along the same lines as an idea I had when I woke up during the night. My idea is that you could incorporate some kind of select-case structure into a move definition that allows you to use different Betza codes for the piece on different spaces. Using the Numskull as an example, it might start out something like this:

a1: i1: a10: i10: e1: e10: b3: h3: c4: g4: c7: g7: b8: h8: a2: i2: a9: i9: R; 
b1: h1: b10: h10: BvR;
c1: g1: c10: g10: BsR;
d1: d8: fRrRfrB;

For the sake of a game like Xiangqi, you could allow the use of wild cards in designating coordinates. So a Pawn definition might look like this:

?[1-5]: fW; *: fWsW;

Here the * functions like default in a select-case statement by coming at the end.


H. G. Muller wrote on Wed, Jul 17 04:49 PM UTC in reply to Fergus Duniho from 03:40 PM:

For the specification of a number of squares (e.g. the starting squares of the pawns) I support a shorthand I.D. where you only have to specify the lower left and upper right corner of a rectangular board area, separated by a dash. That doesn't help much in Smess, but for Xiangqi a0-i4 would give you the entire area below the River, and d0-f2 the white Palace.

Still, having to fully write down the list of coordinates for nearly all board squares is probably more cumbersome than using a FEN-like notation for the entire board. That would require the property of the square to be encoded by a single character, though. But that character could encode an index in a table of the properties. Like

a: R; b: BvR; c: BsR; d: fRrRfrB; ...

acabcbaca/bdbcacbdb/...

(Just a move assignment I made up on the spot.) For irregular patterns like Smess there is no way to avoid specifying all squares explicitly, but regular cases one often encounters are homogeneous ranks, alternating squares on a rank, identical ranks or pairs of ranks. This is acually a problem that is very similar to coloring of the board, so the solution you use in the Diagram Designer for that should be applicable here.

 


🕸💡📝Fergus Duniho wrote on Wed, Jul 17 05:11 PM UTC in reply to H. G. Muller from 04:49 PM:

For the specification of a number of squares (e.g. the starting squares of the pawns) I support a shorthand I.D. where you only have to specify the lower left and upper right corner of a rectangular board area, separated by a dash. That doesn't help much in Smess, but for Xiangqi a0-i4 would give you the entire area below the River, and d0-f2 the white Palace.

Are you saying this is something your code already supports or that it is an idea you would be behind?

Still, having to fully write down the list of coordinates for nearly all board squares is probably more cumbersome than using a FEN-like notation for the entire board.

It would be more compact, but it would take the same mental effort* as it would to write out each coordinate in a select-case structure like I proposed, and the select-case structure would have the advantage of being easier for a person to read and understand, as it would allow someone to go directly from the coordinate to the Betza code without taking the time to mentally unpack the FEN-like string.

* or more actually as you would be taking the extra step of compressing your data.


H. G. Muller wrote on Wed, Jul 17 08:08 PM UTC in reply to Fergus Duniho from 05:11 PM:

The current code supports the format for indicating starting squares of the pieces, which it currently the only place where it interprets square coordinates. But if it was needed to process case labels referring to board squares, it could use the same shortcut.

I am not yet convinced enumerating the squares as case labels is the most convenient solution for the reader, though. To know how a piece moves he would have to search it amongst the case labels. Even if we adopt the convention to order these alphabetically, if there are many different square properties, he still would have to examine all the lines. But if the board is represented as a FEN he would know exactly where to find the square, as a FEN is basically an image.

Another problem with the case labels is that it is hard to find a shortcut for checkered patterns, which can be expected to be a common case. For Elk Chess it would be annoying if you have to write 32 case labels of the dark squares for the N move, and the other 32 case labels for the R move. The shorthand rules already used by the I.D. for the morph  FENs make it easy to represent such patterns in a compact way.

But I guess that in the context of the I.D. we should above all ask ourselves the question "where will it be displayed, and what is the intended audience. The Diagram definition would normally be invisible to viewers of the page. And if this info would be displayed at all, it would not have to be displayed in the same format as in the Diagram definition.

I think the most convenient way to present this info to the reader is put the list of squares in parentheses behind the piece name in the piece table. Each move would have da different entry in this table. In the simplest implementation it would be the responsibility to write this list himself as part of the name. But it could also be added automatically, based on the square-property FEN. In principle it would be a comma-separated list of squares, but some regular patterns could be recognized (rectangles, which includes files and ranks, or chrckering), an special verbal descriptions could be shown for those (such as "on dark squares").

Of course the reverse could also be possible: the person creating the Diagram could write the list of squares, or the special phrases behind the piece names, and the Diagram script could recognize those, and apply the indicated moves accordingly.


🕸💡📝Fergus Duniho wrote on Thu, Jul 18 02:10 AM UTC in reply to H. G. Muller from Wed Jul 17 08:08 PM:

Another problem with the case labels is that it is hard to find a shortcut for checkered patterns, which can be expected to be a common case. For Elk Chess it would be annoying if you have to write 32 case labels of the dark squares for the N move, and the other 32 case labels for the R move.

Using wild cards, it could look like this:

[aceg][1357]: [bdfh][2468]: R; *: N;


🕸💡📝Fergus Duniho wrote on Thu, Jul 18 04:38 PM UTC in reply to H. G. Muller from Wed Jul 17 08:08 PM:

I looked into whether JavaScript has wildcard support, and I did not find any native function that supports it. But I did find an article called Wildcard Pattern Matching in JavaScript with a short function that does wildcard pattern matching by converting a wildcard pattern into a regular expression and then doing a regular expression match. Here is the function:

function wildcardMatch(text, pattern) {
    const regexPattern =
        new RegExp('^' + pattern.replace(/\?/g, '.').replace(/\*/g, '.*') + '$');
    return regexPattern.test(text);
}

To test it, I wrote a pair of loops to generate all the coordinates on a Chess board, and I had it display each coordinate only if it matched the pattern. Then I tested it with the patterns "a1", "*", "[abcd]?", [e-h]?", and "[aceg][1357]", and I got correct results each time. Since it's actually doing a regular expression match with some slight changes to the pattern, I also tested "([aceg][1357]|[bdfh][2468])" and got it to display all the black spaces.

But I guess that in the context of the I.D. we should above all ask ourselves the question "where will it be displayed, and what is the intended audience. The Diagram definition would normally be invisible to viewers of the page. And if this info would be displayed at all, it would not have to be displayed in the same format as in the Diagram definition.

There are two types of people who would be interested in looking at it. The first is someone with a knowledge of Betza code who finds it helpful for learning the rules of a game. The second is a programmer who wants to understand how it was programmed in order to be able to do something similar.

But if the board is represented as a FEN he would know exactly where to find the square, as a FEN is basically an image.

For each type of person who would be interested in looking at the code, I think that using a FEN-like representation of the board will add an extra layer that requires some interpretation for a full understanding. For most games that give the same piece different powers on different spaces, short wildcard patterns (or just regular expressions) could be used to distinguish light and dark squares, one side of the board from the other, or isolated sections of the board from the rest of the board. Only a game like Smess or Storm the Ivory Tower would need the whole board spelled out, and the code could be made more compact by grouping together squares on which the same piece has the same powers of movement. This could be done with a switch-case structure as I first suggested, or it could be done as a single regular expression that includes all relevant spaces. A switch-case structure, though, would still be helpful for providing a default value without the need to devise a wildcard pattern or regular expression to match the remaining spaces. It could just be applied to any space that had not matched any previous pattern in the sequence.

Note that by select-case in earlier comments, I meant switch-case, though it does look like BASIC does call it select-case instead, and I do also have background in BASIC.


Avatar Riff Riders. (Updated!) Overcome the reef on an Avatar basis. (11x11, Cells: 110) [All Comments] [Add Comment or Rating]
💡📝Gerd Degens wrote on Thu, Jul 18 07:19 PM UTC:

New proposal. Could be ready for review.


Radioactive Queen Chess. White has a little diff in setup, but great diff in the game. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
🔔Notification on Thu, Jul 18 08:33 PM UTC:

The author, Lev Grigoriev, has updated this page.


Imitating Chess. Pieces move as the last moved piece.[All Comments] [Add Comment or Rating]
HaruN Y wrote on Fri, Jul 19 07:23 AM UTC:

I once created a similar variant to this and shared it on 03/05/2023. The only difference is that the King also imitates.


Avatar Riff Riders. (Updated!) Overcome the reef on an Avatar basis. (11x11, Cells: 110) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Fri, Jul 19 12:28 PM UTC in reply to Gerd Degens from Thu Jul 18 07:19 PM:

It is not explained wel how the barrier works. It stops sliding moves from crossing it?

Why put the same image there three times?


💡📝Gerd Degens wrote on Fri, Jul 19 03:22 PM UTC in reply to H. G. Muller from 12:28 PM:

Yes, of course. A chancellorrider cannot pass the barrier on the same file. Applies to the cardinalrider and amazonrider in the same way with regard to diagonal movement.
 

Why put the same image there three times?

Which image three times?


FOOD FIGHT!!!. Game Courier preset for FOOD FIGHT!!! (12x12, Cells: 144) [All Comments] [Add Comment or Rating]
💡📝Bob Greenwade wrote on Fri, Jul 19 03:52 PM UTC:

Besides the compound icon problem already mentioned, I'm also finding that the Pie's znDD move isn't working in the present.

@Fergus and/or @HG, could I get a little help with those two things?


Avatar Riff Riders. (Updated!) Overcome the reef on an Avatar basis. (11x11, Cells: 110) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Fri, Jul 19 04:35 PM UTC in reply to Gerd Degens from 03:22 PM:

Which image three times?

That of the initial position.


💡📝Gerd Degens wrote on Fri, Jul 19 05:22 PM UTC in reply to H. G. Muller from 04:35 PM:

OK.
The first is the setup, which can't be superfluous.
The second shows 'Play It!'; what's superfluous about that?
The third shows Game Courier as a picture. My way of pointing this out. Can be turned into a gray mouse by inserting a simple sentence, e.g. 'play it on Game Courier'.
OK.


H. G. Muller wrote on Fri, Jul 19 06:33 PM UTC in reply to Gerd Degens from 05:22 PM:

Well, if the first diagram shows the same setup as the second, but without the 'Play it' option, I would say the first diagram is superfluous. Which information exactly would not be conveyed to the reader if it was omitted?


💡📝Gerd Degens wrote on Fri, Jul 19 07:00 PM UTC in reply to H. G. Muller from 06:33 PM:

Well, you have to say what is part of a complete presentation.

Can the setup be omitted if the 'Play it' item follows under 'Notes'? Mind you, under 'Notes', i.e. at the end of the presentation. That doesn't make sense, does it?

The setup is the opening for a reason. Everything that follows can be understood as a supplement that serves as further explanation.

Incidentally, we shouldn't think the reader is so stupid that he can't sort the information provided correctly.

A German saying goes: 'Doppelt hält besser' or twice is better than twice - it should be no different in English.


H. G. Muller wrote on Sat, Jul 20 05:06 AM UTC in reply to Gerd Degens from Fri Jul 19 07:00 PM:

There might be contexts where this proverb applies, but articles explaing game rules are not amongst those. In principle every added sentence or image make those worse, and have to justify their presence by providing essential new information.

The setup section is intended for presenting an image of the initial position. So the 'Play it' Diagram can go there. As it does in the large majority of articles we have here. Then there is no need for having a second, redundant image.

Like there is no need to repeat a number of times that there is no morphing on the f-file...


💡📝Gerd Degens wrote on Sat, Jul 20 06:38 AM UTC in reply to H. G. Muller from 05:06 AM:

Okay, I've rearranged it.


@ HaruN Y[All Comments] [Add Comment or Rating]
HaruN Y wrote on Sat, Jul 20 07:08 AM UTC:Poor ★

Thorndale by Stuart Spence, AKA Zulban_tyr

files=7 ranks=6 promoZone=1 promoChoice=Q graphicsDir=https://chessvariants.com/cgi-bin/fen2.php?s=50&w=b16067&b=5113a3&p= /graphics.dir/alfaeriePNG/ squareSize=50 graphicsType= symmetry=none royal=K shuffle=NBRQKIF borders=0 firstRank=1 rimColor=#040201 coordColor=#87622d darkShade=#3a3115 lightShade=#76061b pawn:P:ifmnDfmWfceF:pawn:a2,b2,c2,d2,e2,f2,g2 knight:N:N:knight:b1,f1 bishop:B:B:bishop:c1 rook:R:R:rook:a1,g1 queen:Q:Q:queen:e1 amazon:Z:QN:amazon: Beholder:F:(mpa)2cF:ferz:,,e6 irongeneral:I:fhK:irongeneral:,,a5,b5,c5,d5,e5,f5,g5,a6,b6,c6,f6,g6 morph=Z white king:K:KisO2:king:d1 black king:K:K:king:,,d6

But with shuffle.


how do you program a non-capture move[Subject Thread] [Add Response]
wdtr2 wrote on Sat, Jul 20 09:48 AM UTC:
This message is mostly for @fergus The elephant to me is a diagonal mover. It may leap 1 or two squares. I want to make a variant of the elephant that has the ability to change its diagonal color (checkered board). The changing of color is a special move. This special move is 1 leap backward in the South direction only and it can only be done as a non-capture move. I attempted to program this move, but I can't figure out how to do it. I am hoping someone can help me out. This is my elephant move right now:

def White_Elephant checkleap #0 #1 2 2 or checkleap #0 #1 1 1 ; def White_Elephant-Range mergeall leaps #0 2 2 leaps #0 1 1 leap #0 0 1;

set White_Elephant-Desc "The %s may leap two spaces in any diagonal direction, or go backwards 1 space if the space is empty.";

def Black_Elephant checkleap #0 #1 2 2 or checkleap #0 #1 1 1; def Black_Elephant-Range merge leaps #0 2 2 leaps #0 1 1; set Black_Elephant-Desc "The Elephant may leap two spaces in any diagonal direction, and may move one space backward if the square is empty.";

*** What do I need to do to make a non-capture move that is 1 square south?


25 comments displayed

EarliestEarlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.