Check out Modern Chess, our featured variant for January, 2025.


[ 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 by HGMuller

EarliestEarlier Reverse Order LaterLatest
Betza notation (extended). The powerful XBetza extension to Betza's funny notation.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Wed, Feb 28, 2024 07:40 AM UTC in reply to Bob Greenwade from Tue Feb 27 10:31 PM:

[R?uW-cW-bpafW]

You are mixing XBetza with bracket notation. You cannot do that; a in bracket notation would mean 'all directions', not continuation. You should have written [R?uW-cW-bpW-fW].

But your original [R?ufW-cfW-bD]  is wrong in the first place. It specifies an unload on the start square of two consecutive W steps, and then a D step back. Which would end up on the same square as the unload. What you really want after the Rook move is step to the unload square (fmW), from there swap with the enemy piece (fucW) and step two back (bD). That is [R?W-ucW-bD]. (But note that this makes the attarction of the enemy piece optional; it could stop after R even if there is an enemy piece two steps further.) The D step would have to be split up in XBetza, and not being a 2nd leg the bracket preprocessor won't do that automatically. But it probably would handle [R?W-ucW-bpW-W] correctly.


Diagram testing thread[Subject Thread] [Add Response]
H. G. Muller wrote on Wed, Feb 28, 2024 07:56 AM UTC in reply to Kevin Pacey from 02:55 AM:

Note that the PTA also has a button for creating a HTML verbal piece description that you only have to copy-paste into the Pieces section, in order to save time when creating entirely new variants. For regular pieces this should work quite well.


Play Chess Variants with Jocly. Missing description[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Wed, Feb 28, 2024 08:09 AM UTC in reply to Fergus Duniho from 12:14 AM:

You can use /play/pbm/showpiece.php?set=motifshogi&piece= and /play/pbm/showpiece.php?set=alfjapanese&piece= with the labels used in Game Courier sets for Shogi as the piece names.

Showpiece.php-generated pieces are not useable in the Interactive Diagram, as they distinguish the armies by case rather than prefix. The underlying files offer a better bet, as there the armies are distinguished by an extra 'Flip' suffix in the filename, and by defining them all as 'extraneous pieces' in the I.D. we can indicate where in the pathname of the file the 'color-prefix' should go. And then define blackPrefix=Flip and whitePrefix the empty string.

[Edit] I now set it up so that the non-believers can try it. Because of the incompatible piece names I had to make different applets for Motif tiles and Alfaerie, and to prevent you can see the piece flip when a slightly altered position in the same representation is shown, it now sets up a new random position of 40 randomly chosen sente pieces on a 9x9 board, and then changes one of those to gote.

You find the applets here: Alfaerie Motif Tiles


Betza notation (extended). The powerful XBetza extension to Betza's funny notation.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Wed, Feb 28, 2024 10:09 AM UTC in reply to Niels van Ham from 09:08 AM:

There is no such thing as a 'regular keyboard'. Each country has its own national version, and that you happen to have these symbols, doesn't mean that others have them. (Have you ever been in Taiwan?) I do have í on my PC, but not on my laptop.

Grouping of atoms was also proposed by Bob (in various forms, either by enclosing them (and then I would not use parantheses but braces { }), or by connecting them with some infix operator like |.


@ Gerd Degens[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Wed, Feb 28, 2024 01:45 PM UTC in reply to Gerd Degens from 11:11 AM:

I see one problem, which is probably not what is bugging you, and perhaps somewhat my fult. The I.D. defines separate pieces for the King to morph in (good), but these are not marked as royal. There should have been a line royal=KJLMO in the description, but it turns out the new PTA is not so finished yet as I thought, and that the text entry for defining royal pieces is still ignored. (That is what you get if you take a long pause in developing something...)

So the I.D. doesn't understand these morphed Kings are royal, and as a consequence also has not passed that info to the GAME code. This could be fixed directly in the GAME code by adding lines in the Pre-Game section

set wroyal (K J L M O);
set broyal (k j l m o);

About the label-image assignment: you should be able to use a custom set that uses exactly the limages that you want for the labels of your choice. Select a Set Group 'Custom', and then a Set 'Completely Custom' in the preset Edit page, and paste the text the PTA suggests for this section. (Oh, problem: the new PTA does not suggest this yet, as it is a feature that was only introduced after I made that. But you can use the old PTA to generate that, and only use the custom-set output from it.)


Play Chess Variants with Jocly. Missing description[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Wed, Feb 28, 2024 01:49 PM UTC in reply to Fergus Duniho from 01:46 PM:

OK, my mistake then. I have never used showpiece.php, and I would not know how to do that. But I already managed by using the raw gif images.


H. G. Muller wrote on Wed, Feb 28, 2024 03:41 PM UTC in reply to Fergus Duniho from 02:57 PM:

It went more quickly with Alfaerie, because it's easier to spot differences in color than differences in orientation. However, while doing it with Alfaerie, I was not taking any time to get any sense of the position, yet I would certainly have to do that if I were playing Shogi. Also, Shogi does not progress from one random position to another. The position changes incrementally, starting from a position where I already know where everything is without even looking at it. So, I would be able to use my knowledge of previous positions to understand what the slightly new position is.

Yeah, sure. Who needs the reminder of pieces? You might as well play blindfold... Well, for GM players that is actually true.  When they think far ahead they intentionally don't look at the board, because it just distracts them with the current position. But for mortals like us playing blindfold is a huge handicap. The sole purpose of having a board and pieces is to constantly remind us of what stands where. And the test shows that Alfaerie des a better job at that.

Recognizing the piece type is of course at least as important as recognizing the color. (Some servers offer an interesting 'semi-blindfold' mode, where you can see the side pieces are on, but not their type, like playing with blank tiles or checkers.) This was never contested. Coloring the pieces does not have any effect on the ability to recognize the type symbol, though. (I hope we agree on that, rather than having to prove it with a 'Spot the Queen' applet...) So it isn't really relevant that you also have to recognize the type; there is no need to degrade the side recognition for improving the type recognition. (And it will probably also not be contested by anyone here that for westerners kanji are doing a poorer job at that than pictograms, as far as type recognitiion is concerned.)

From whatching Chu-Shogi games by experience Chu-Shogi players, I noticed that these frequently blunder in an elementary way (such as overlooking a discovered attack on a high-value piece), and that I, as a non-player, could almost always predict when they were going to blunder. Because I was viewing the game with mnemonic pieces on my bot, while they were using the standard kanji pieces of the client. So it was obvious to me they suffered a iszable handicap by not seeing the board and pieces as I did it. It will of course make a great deal of difference how much time you have available. In correspondence play, where you think perhaps an hour per move, chances are good that after some time it will start to dawn on you that you misidentified a particular piece, and when you do you have every opportunity to think again. In real-time games you often will move before realizing your mistake.

As to the auhenticity... Seems to me you pretty much threw that out of the window when you abandoned the kanji. No Japanese would ever agree that there is any authenticity in these pieces. In fact I noticed they tend to even deny that you are playing Shogi, when you use non-kanji pieces.


H. G. Muller wrote on Wed, Feb 28, 2024 06:37 PM UTC in reply to Fergus Duniho from 05:49 PM:

Coloring the pieces of each side differently can limit the use of color in distinguishing between types of pieces.

Not really, because there are more than two colors. It is very possible to pick two different dark colors (black and blue), and two different light colors (white and yellow) where for each pair the "Spot the Intruder" game is just as easy, and then use blue and yellow for promoted pieces.

Most Shogi sets I have seen do not have red kanji for the promoted pieces, btw. They just write different kanji on them. (Well, people tell me they are really the same kanji, but in different fonts. But they look different enough.)

It's not for you to say what Japanese people would think, and it is not for Japanese people to judge whether one of my experiences feels more authentic than the other.

I am just relaying what Japanes people said, on the Shogi forums I visited, and at the OTB Shogi tournament in Kanazawa and Yokomama that my Shogi engine participated in. And you surely give a whole new twist to the concept 'authentic'.

I have not had any communication with them on this, but it would be as objectively false as saying that you are not playing Chess if you don't use Staunton pieces.

This has puzzled me too. We have no trouble recognizing a game with, say, Star Wars puppets as Chess. For Shogi that would be unthinkable. The Japanese seem to consider the physical representation just as much part of the game as the rules for how to move the pieces. That explains why the Japanese Shogi Association is so conservative in endorsing any kind of on-line play. They insist that the experience behind the computer screen must be as identical as can be technically expected to playing over the board with the prescribed equipment. Including the possibility to play illegal moves.

I suppose it must be that way, because the over-the-board equipment, being subject to physical limitations, is inferior to what you could do on a computer screen. (Funny story: when I was playing in Kanazawa, my program was of course showing the position as pictograms, even though the official board on which I had to perform the move used of course kanji tiles. And it puzzled many people, both opponents and audience, that I used different color pictograms for both sides. The said ro me: "How can this work? When you capture a piece, it has the wrong color." It did not occur to them that a computer can change colors at will.) So if they would allow people to use arbitrary representations, these would quickly move away from the traditional representation, and use one that doesn't hurt their rating so much. If they would have been confident that kanji tiles were the superior representation, they would not have little reason to forbid anything else. But as it is, they consider it cheating.

This is one of the most important reasons that a good game like Shogi has failed to conquer the world: people that try to popularize it usually have as their main agenda to spread Japanese culture. No to spread a good game.


@ Gerd Degens[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Wed, Feb 28, 2024 07:30 PM UTC in reply to Gerd Degens from 03:57 PM:

@Fergus: I ran into something strange. The include file for automation with the PTA uses an identifier piececount, like it is an associative array that tells for each piece label how many there are on the board. It is used like

set nr + #nr elem #type piececount;

I cannot find a desciption of it in the GAME-code tutorial, though. Did it ever exist, and is it deprecated? Or has it been a figment of my imagination all the time? I cannot print it either; printr piececount; just prints the word 'piececount'.

The strange thing is that elem #type piececount evaluates to 1 if type has the value K or k. (Which is usually the only value it gets, as it is in a loop that has the purpose of counting the number of royals left, and K is usually the only royal type.) I would not expect that from an undefined variable, and indeed there is one King on the board. If type has the value of a piece label that is not on the board, the value does seem undefined. And apparently 1 + undefined equals 0, which is also strange. But nr ends at 0 because of this, leading to a win claim...

[Edit] For piece types that are on the board, piececount indeed appears to work as one should guess from the name. But for piece types not on the board elem #type piececount appears to evaluate to something strange, rather than 0. I now assigned it to a variable a, and print #a then produces output '#a'. Now I have seen this before for undefined variables, so I expected if not #a: set a 0; endif; to solve the problem, assuming 'undefined' would be interpreted as false. (Or is this a JavaScript expectation?) But not so; the if-statement does not trigger, and adding the undefined variable to a variable nr that already has a non-zero value appears to reset it to 0.

[Edit2] It does work as intended when I do this:

    set a elem #type piececount;
    set b 0;
    if var a:
      set b var a;
    endif;
    set nr + #nr #b;             // count them

Using #a instead of var a it just keeps interpreting that as a literal. Can this be simplified to set nr + #nr var a; ? I am afraid to try it, because I already spoiled one GC game by experimenting...


Game Courier Logs. View the logs of games played on Game Courier.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Wed, Feb 28, 2024 09:00 PM UTC in reply to Jean-Louis Cazaux from 08:41 PM:

Sorry, this is my fault. I was debugging the GAME code include file, and to that end apparently put some code in there that was not so innocent as I thought. I already removed that code, (it was only there for a few seconds), but I don't know how to fix an erroneously declared game end.


@ Gerd Degens[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Wed, Feb 28, 2024 09:45 PM UTC in reply to Gerd Degens from 02:26 PM:

That seems to be the case, because the I.D. works as intended.

Not when I tried it. When I morph my King the AI claims victory. It really needs a royal=... specification. As should be expected, as otherwise only the last piece in the table is royal. When you look at the piece table and click the header of the 'move' column, the royal pieces should have '(c00)' behind their piece value, and J,L,M,O do not have that.

The suggested lines [set wroyal (K J L M O);
set broyal (k j l m o);] I have tried several times before - and just now again. The following happens: as soon as a white piece is clicked, the game stops immediately and the message 'White lost by absence of royalty!' appears.

It appears I have now solved this.

The matter with the custom set is new to me - I'll have a look at it. Many thanks in the meantime.

There is a problem here: When a Diagram is pasted in the (old) PTA, and you generate GAME code from it, piece types that are not on the board won't be mentioned in the custom set that is generated. I won't manage to fix that today. But it is not very difficult to fix it directly in the preset: just copy the suggested code, and then duplicate the line that defines the Kings 4 times, altering the K/k in these copies into J/j, L/l, M/m and O/o respectively. Then all these labels should get a King image. (Well, beware of commas. Each line should end in a comma, except the last!)


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Feb 29, 2024 07:21 AM UTC:

I don't see anything unusual on these pages. Not even when I refresh the browser cache.


@ Gerd Degens[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Feb 29, 2024 07:54 AM UTC in reply to Fergus Duniho from 03:07 AM:

@Fergus: OK, so it is what I thought. But it only contains values for pieces that are present; labels of pieces that are not on the board do not get value 0 associated. This makes it tricky to use.

What is the best way to test whether an associative array contains a given key? In JavaScript I would just copy array[key] to a variable, and then test if that variable is undefined.

But testing for an undefined value seems to be difficult in GAME code. In seems that variables to which you assign an undefined value disappear, and that #name for nonexisting variables evaluates to the string literal "#name". Is this guaranteed behavior? I.e., would it make sense to write

if != #name "#name":

to only process a variable when it does exist / was not assigned an undefined value?

Or can the problem be avoided by reading the value of the variable using var rather than #? Is there any guaranteed behavior for using var on a non-existing / undefined variable?

If not, it seems to be useful to have an operator (let's call it number) that would evaluate to the numerical value of its operand, but to zero if the operand was not numeric, or undefined. So that I could write something like number elem #key piececount, which would give me the expected 0 if #key was not a valid key in the piececount table.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Feb 29, 2024 08:02 AM UTC in reply to Daniel Zacharias from 07:29 AM:

Ah, indeed. I can confirm that the menus in GC presets have transparent background. I don't see any of the other strange effects reported here, though. Except perhaps that a zero in the Comment I posted before this looks a lot more than a lower-case oh as I seem to remember.

We might have reverted to another (default?) font; when I select a line in a displayed Comment with the mouse, the highlighting of the selected words does not overlap neighboring lines. It did used to do that, presumably becouse a line spacing was forced through CSS that was not native to the font that was used.


@ Gerd Degens[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Feb 29, 2024 08:19 AM UTC in reply to Gerd Degens from 07:28 AM:

I just wonder how it can be that the game ends with 'I win' when a king on a5 is captured with a move from a9.

I am not sure what exactly you tried here, in particular, what you mean by 'king'. It should not be possible to have a King on a5; it should have morphed to a Royal Pawn when it got there.

Did you move the King to a5 through an illegal move? The I.D. allows you to play illegal moves, (if these are non-captures), but these are considered part of a position setup, and would never be subjected to promotion rules. They just move a piece from one square to another. So if you play Ke1-a5, it would not morph into a Royal Pawn, and stay a King. (But due to your choice of images, you cannot see that!) As a consequence you have not lost yet, and if it can the AI would capture your King and claim the win.

If I play, from the start position, Ke1-a4, switch on the AI, and then play Ka4-a5, it does claim the win. (A bit strange here is that the King appears to promote to an enemy non-royal piece; I still have to figure out what causes that.)


H. G. Muller wrote on Thu, Feb 29, 2024 11:53 AM UTC in reply to Gerd Degens from 09:25 AM:

This is not code; it is HTML text for pasting in the Pieces section of your article about the variant, if you want to present that as an auto-generated table (e.g. such as I used for Makromachy.)

For defining a custom piece set you need what the (old) PTA prints in the section "Custom sets (only needed with non-standard piece set):" after you press the GAME code button. Something like this:

{
"custom": {
  "dir": "/graphics.dir/alfaeriePNG35/",
  "pieces": {
    "P": "wpawn.png", "p": "bpawn.png",
    "N": "wknight.png", "n": "bknight.png",
    "B": "wbishop.png", "b": "bbishop.png",
    "R": "wrook.png", "r": "brook.png",
    "Q": "wqueen.png", "q": "bqueen.png",
    "K": "wking.png", "k": "bking.png"
  }
}
}

 


H. G. Muller wrote on Thu, Feb 29, 2024 03:39 PM UTC in reply to Gerd Degens from 01:44 PM:

But what does this HTML sequence have to do with the Pieces section of my description of the variant?

The Piece Table button in the PTA is an aid for those writing an article about a new variant, to save them the work of writing a description of the pieces by hand. If they use the PTA for creating an Interactive Diagram they can copy-paste to the Setup section (after using the Show HTML button), they can use the Piece Table button to get the Pieces section as a free side effect, as a nice table showing the images of the pieces. The Pieces section in my Makromachy article was made that way.

The highlighting problem in the preset should now be solved too. The preset was using the "accelerated legality test" (by default), and this was testing only for attacks on the first royal type in the wroyals/broyals arrays (i.e. K or k in this case). I now changed that to the first royal type that is actually on board.


H. G. Muller wrote on Thu, Feb 29, 2024 05:58 PM UTC in reply to Gerd Degens from 05:09 PM:

In my opinion, however, move diagrams provide a more rapid overview, both for the description of the variation and for the presentation of the rules in Game Courier.

This is apparently a matter of taste, because I hate articles with many move diagrams. Especially of large games. The diagrams dillute the information density by about a factor 20, and you have to scroll like mad to find the information you want. Awful. A simple sentence like "moves 1-4 squares orthogonally" tells me all I need to know, seeing a move diagram with a piece centered on an 8x8 board tells me hardly anything (as the leaps reach the board edge). And for complex pieces a static diagram often cannot really illustrate what the move does (e.g. Chu-Shogi Lion).

For those who want to see move diagrams the I.D. offers plenty of opportunity. You can summon a diagram for every piece without scrolling, either by clicking on the name of the piece (which I usually display to the right of the Diagrams), right-clicking the piece in the Diagram, or clicking in the pieceTable after you opened that.

If I see it correctly, the correct transfer of the piece table when creating a custom piece set in the preset is still missing. Or have I overlooked something. Anyway, I am grateful  for your doing.

I am not sure what you mean here. A 'transfer' is something you do, so how can it be 'missing'?


H. G. Muller wrote on Thu, Feb 29, 2024 06:32 PM UTC in reply to Gerd Degens from 06:26 PM:

That is because you still have the HTML text that is supposed to go into an article's Pieces section in the Custom Sets text entry of the preset, rather than the description of a custom set.


H. G. Muller wrote on Thu, Feb 29, 2024 07:14 PM UTC in reply to Fergus Duniho from 07:04 PM:

Great! That is just what I need to avoid auxiliary intermediate variables and testing those with if-statements.


Betza notation (extended). The powerful XBetza extension to Betza's funny notation.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, Mar 1, 2024 06:48 AM UTC in reply to Bob Greenwade from 03:35 AM:

I don't see the problem of not being able to reverse the leg. Betza notation is for boards with a translation-invariant 8-neighbor topology, and that it would not work for other boards is normal and unavoidable.

If a modifier for self-unloading was necessary, I think that u' would be the obvious choice.


💡📝H. G. Muller wrote on Fri, Mar 1, 2024 08:00 AM UTC in reply to Bob Greenwade from 07:41 AM:

yafsR should be no problem (yafscabyaifzR). y(a)5K is not valid XBetza (as it includes yK), but I suppose you mean some kind of area move. If there is more than a left-right choice it is indeed not possible to retrace the path using q and z. This could also be solved by a new directional modifier that would do what i does for the range of a continuation leg: mimic a previous deflection.

It doesn't seem obvious to me, but that's probably just me.

Well, you unload something that disappeared elsewhere. And if p' means friendly hopping, it seems natural to make u' mean friendly unload, i.e. that you don't unload the captured piece, but the moving one.

(the "load" spot won't always be the end)

I don't get that. A moving piece would always have to follow the entire trajectory; that is the basis of XBetza  notation. So how could it end up anywhere else than at the end?


💡📝H. G. Muller wrote on Fri, Mar 1, 2024 08:14 AM UTC in reply to Niels van Ham from 07:44 AM:

This i find a very good idea, 31 new symbols,

Well, I don't know. The success of Betza notation lies in its simplicity. The meaning of most modifiers is obvious (f, b, l, r as directions m, c as move/capture), and for those who are slightly familiar with unorthodox pieces, most atoms as well (standard symbols for orthodox chess pieces, plus W, F, A and D). Perhaps they have to learn a handful of other symbols (v and s, but outside Shogi pieces tend to be fully symmetric, and directional modifiers are only very rarely needed in the first place, p and g.)

Having to know the meaning of '31 new symbols' pretty much destroys that. There is very little benefit in introducing symbols that hardly anyone would know the meaning of.


💡📝H. G. Muller wrote on Sat, Mar 2, 2024 08:59 AM UTC in reply to Daniel Zacharias from Fri Mar 1 06:32 PM:

The q and z modifiers cannot be used in their original Betza meaning of circular / crooked in a multi-leg move. Their meaning in the latter context has been redefined as a directional modifier meaning the same as l or r, but in the same or opposit direction of deflection as the previous one.

The circular and crooked moves were hard to fit into the scheme according to which other moves are handled by the Interactive Diagram. I added a special case of move generation just for those, where a tabulated sequence of legs of a multi-leg move doesn't have to be traversed in its entirety for the move to be valid, but is allowed to stop at any point along the trajectory. This can be combined with (grass)hopping; normally the trajectory would not continue after an occupied square, but would exercise its c or d right there. But in combination with p or g it must continue on the first such encounter, in the latter case exactly one leg. Continuing after capture, or on any other path than the indicated circular/crooked trajectory is not implemented for this type of move generation.

The introduction of parentheses in principle would allow specification of circular and crooked paths in the context of normal multi-leg move generation. But the way parentheses are implemented is very inefficient, which especially hurts the AI. In theory (af)W is the sane as R, but in practice it is expanded to WafWafafWafafafWafafafafW..., which is WnDnHnWXnDX..., a squence of ever larger lame leaps. And for each next leap it will test all squares leapt over, even though the previous lame leaps already tested those. So if the W and D leap in a certain direction are valid non-captures, but the H leap is blocked, it would still try to generate thw WX, DX... leaps, and test the W, D and H squares they pass through for each of those, before coming to the conclusion that these are not possible. The special case of storing only the longest trajectory, and allowing termination at any step along the way, solves this problem. But it is not compatible with straying from the path.

BTW, the I.D. currently does not implement moves with more than one pair of parentheses on an atom. The implementation through pre-processing would really make the length of the XBetza string that results explode if there would be multiple pairs.


💡📝H. G. Muller wrote on Sat, Mar 2, 2024 09:07 AM UTC in reply to Bob Greenwade from Fri Mar 1 03:30 PM:

I had no idea that the i could be that far separated from the long move it's supposed to imitate.

The official definition says "as many steps as in the previous slider leg". It would never make sense to mimic the length of a leaper leg, as this is known to be 1. So intervening leaper legs are simply ignored.

It would make sense to slightly alter that definition in the case of multiple iso legs, to "the previous slider leg that is not iso itself, and has not yet been mimicked by an intervening iso leg". This is not how the I.D. currently implements it though. Which probably does make the current implementation useless for multiple iso legs, as it does something I cannot imagine you would ever want.


25 comments displayed

EarliestEarlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.