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

Later Reverse Order EarlierEarliest
Megalomachy. A huge game with 2x80 pieces, some able to jump over many others. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote at 03:53 PM UTC in reply to Aurelian Florea from 03:06 PM:

You must also put

set opaque (EA FA BA SM AR ea fa ba sm ar);

there to make the flying pieces block each other.


💡📝H. G. Muller wrote at 02:59 PM UTC in reply to Daniel Zacharias from 01:53 PM:

I suppose that would heve worked, if you did that as first thing in the Post-Move sections. But I have already changed the betza.txt to use different arrays for the capturer and the victim. So now you have to put in Pre-Game:

set protected (T t);
set restricted (EA T ea t);

Play Chess Variants with Jocly. Missing description[All Comments] [Add Comment or Rating]
H. G. Muller wrote at 01:30 PM UTC in reply to A. M. DeWitt from 12:25 PM:

Edit: Also, Hectochess doesn't have the 3d Queen, Marshall, and Cardinal for some reason...

Indeed, I noticed that too. I did upload a newer fairy-sprites file, and that made the Champion and Wizard appear.

[Edit] OK, that should be fixed now too. Hectochess was using the proper-*.js files for these 3d pieces, which differ from the original ones by a scale factor, to give them a more natural size. But these were not present on CVP.

[Edit2] I now moved a lot of the new 3d pieces to the CVP Jocly install as well. I had never payed much attention to the version here as far as updates go, because the CloudFlare caching made it pracically impossible to see any changes. But now that Fergus has exempted Jocly from this, it makes sense to bring the version here up to date as well. Makromachy already works. For Minjiku Shogi some of the promoted pieces seem to be still missing.


H. G. Muller wrote at 12:17 PM UTC in reply to Jean-Louis Cazaux from 11:48 AM:

As the matter of fact, why don't you update that page "Play Chess Variants with Jocly" which was listing all available games until last year?

The problem is that it is a matter of taste what 'available game' means. The Jocly applet itself allows you to select any game that is implemented, through the 'other jocly games' link. But this applet is not able to show rule descriptions or credits, which are also available for most of these games in the Jocly source package.

Therefore Fergus created separate HTML pages for individual variants, which embed the Jocly applet preconfigured to run the corresponding variant, with a rule description. The overview page you refer to contains links to those individual game pages.

In general the reason for there being no link to a certain variant in this overview page is that there doesn't exist such a separate HTML page for that game yet. Someone would first have to create those pages.


H. G. Muller wrote at 11:21 AM UTC in reply to A. M. DeWitt from 10:37 AM:

Apparently the jocly.game.js was still the original one from 2017. The addition of LetsTwist (to make the Mersenne Twister random generator available to the game-specific code) is the only modification I ever made in the Jocly core. I have now replaced that file with the one on my website; this should make it work.


Megalomachy. A huge game with 2x80 pieces, some able to jump over many others. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote at 09:58 AM UTC in reply to Aurelian Florea from 09:44 AM:

Oh, that seems a lot of work. But I'll do it in the evening!

Not really. You should just select the Completely Custom set, and then paste the set definition the PTA suggests into the preset.


💡📝H. G. Muller wrote at 08:43 AM UTC in reply to Aurelian Florea from Mon Apr 22 12:07 PM:

I have made an attempt to support fast castling in the betza.txt GAME-code include file. I could not test it in the context of your preset, though, because there seems to be a mismatch between the labels used in the I.D. that youconverted, and the piece set you use in the preset. So it still crashes because of an unknown piece 'E'. I suppose you would have to use the custom set as the PTA suggests it to make it work.

Anyway, to try the fast castling you should replace the lines

2 99  1  0    88
   1  9  0    25
2 99 -1  0    88
   1 -9  0    25

at the end of the legdefs array by

1 -3  1  0 FastCastle
1 -3 -1  0 FastCastle

This uses the existing mechanism for invoking dedicated routines for generating piece moves. But the routine FastCastle, which is invoked by this, is already supplied in the betza.txt include file.

I still have to adapt the PTA to generate these lines automatically, when encountering a fast castling.

 


Play Chess Variants with Jocly. Missing description[All Comments] [Add Comment or Rating]
H. G. Muller wrote at 07:56 AM UTC in reply to Jean-Louis Cazaux from 05:18 AM:

Where can your work on Jocly with François, HG, can be found?

That depends on what exactly you want. The source code is in my on-line git repository, but it is currently not possible to view that interactively on line because the hosting company disabled the viewer for that ('GtitWeb'), and I haven't had time to fix that. It is still possible to pull from the repository with 'git', to view the source code locally. And I suppose François has a mirror of it on GitHub.

If you want to see a running install featuring the newly added games, you can use the one on CVP (just select any of the dedicated variant links on the Jocly overview page, and then click 'other jocly games' at the bottom right to select a game), or the one on my website, which are old Jocly installs that I hacked to add some variants. I suppose that François has put up a version directly compiled from the most recent source code somewhere.


H. G. Muller wrote at 07:31 AM UTC in reply to A. M. DeWitt from Mon Apr 22 10:33 PM:

You also have to add a line to /play/jocly/dist/browser/jocly-allgames.js to make Jocly notice the files that you placed in /play/jocly/dist/browser/games/chessbase/ . I think Fergus exempted the Jocly files from CloudFlare caching, so you should see new games immediately after flushing your browser cache. To do that I sometimes have to access the modified .js files (including jocly-allgames.js) directly with the browser.

Unfortunately the wikipedia-fairy-sprites.png file on CVP is not entirely compatible with the one that is now in the source repository.


Megalomachy. A huge game with 2x80 pieces, some able to jump over many others. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Mon, Apr 22 03:12 PM UTC in reply to Aurelian Florea from 11:30 AM:

The correct query for opening the preset in Edit mode is &submit=Edit, not &edit=true.

The problem appears to be the fast castling, and now that I think about it, I believe I never implemented fast castling in the betza.txt GAME-code include file. So the entries in the legdefs table that would be interpreted by the JavaScript powering the Interactive Diagram as fast castling are mistaken for something that makes the GAME code crash.

For now I recommend commenting out the four lines that define the fast castling at the end of legdefs, like:

1  1 -1  1     3
//2 99  1  0    88
//   1  9  0    25
//2 99 -1  0    88
//   1 -9  0    25
0);

The King will then not be able to castle, but at least you can continue implementing the other aspects of the variant in the preset. In the mean time I will try to support fast castling in betza.txt. And when I have done that, you can uncomment the lines again.

 


💡📝H. G. Muller wrote on Mon, Apr 22 12:06 PM UTC in reply to Aurelian Florea from 11:30 AM:

link?


💡📝H. G. Muller wrote on Mon, Apr 22 07:42 AM UTC in reply to Aurelian Florea from 07:10 AM:

I get this error:

Cannot make a diagram with 0 pieces on an 8x8 board!

It probably means that you copy a lot of invisible stuff together with the Diagram definition; the line below the quoted error message makes an attempt to show you what you actually pasted. If I copy-paste directly from your latest comment into the PTA, I also get the error message, and for the pasted text it says:

<main><article id="maincontent"><div class="commentgroup"><div class="Comment"><div><table><tbody><tr><td class="line-content">satellite=megalo</td>...

So there is an enormous amount of HTML garbage prefixed and interleaved with the actual definition, and the PTA chokes on it. What exactly corrupts the Diagram definition might depend on your browser. I made the PTA resistant to the garbage that is added by copying from a FireFox Page Source (but you might have to flush the browser cache to benefit from that?)

Anyway, the safest method is to first paste the Diagram definition into NotePad;this will cleanse it of most invisible stuff. Then you can copy-paste it from there into the PTA.


💡📝H. G. Muller wrote on Mon, Apr 22 06:31 AM UTC in reply to Aurelian Florea from Sun Apr 21 06:57 PM:

Strange that it doesn't work for you. When I copy-paste the I.D. definition into the PTA directly from the Page Source (from the line satellite=megalo to the line king::KispO9::k1) I do get a 16x16 board with the Megalomachy setup. It doesn't look very well, because even the specified squareSize of 33x33 is too large to fit it on the PTA page, and the I.D. in the Megalomachy article uses the 50x50 alfaerie pieces. Because it also uses betzaNew.js it automatically shrinks those images to fit the squares, but the PTA still uses betza.js, which doesn't do that, but clips the pieces instead. But that should not affect the generation of GAME code.


💡📝H. G. Muller wrote on Sun, Apr 21 04:22 PM UTC in reply to Aurelian Florea from 08:08 AM:

You must only paste the name=value and piece lines, which normally are between HTML <div> and </div> tags. The script line is not part of the Diagram definition; it specifies to the browser what script to run to create an I.D. on  the page. Something the GAME code would never have to do.


💡📝H. G. Muller wrote on Sun, Apr 21 07:08 AM UTC in reply to Daniel Zacharias from Sat Apr 20 09:33 PM:

I think it did, at least partly. But it is not obvious, because the I.D. does pseudo-legal highlighting, and the capture restriction on Terrors is a context-dependent rule that results in some pseudo-legal moves to be illegal. If I set up a position where the AI can gain a Queen by trading Terrors (TxT, QxT, BxQ), it does not capture.

The I.D. in the article had configured the rule the obsolete way, though, through a protected=32 parameter. This could not specify the 'asymmetric' version of the rule, which forbids Eagles to capture protected Terrors, but not Terrors to capture protected Eagles. I changed that now by using the captureMatrix for specifying the forbidden cases by marking those with a % sign.

The betza.txt include file currently also doesn't support asymmetric anti-trading; the I.D.'s anti-trading through the protected parameter is implemented there by initializing an array

set protected (...);

which lists the labels of all pieces mentioned in protected parameters. But it then bans all captures of the mentioned pieces by each other (when protected). So if both the Terror and Eagle go in there, T x protected E would also be forbidden. I suppose I could fix this by having the betza.txt include use two attays, 'protected' and 'restricted', and then ban only the captures of a piece mentioned in 'protected' by one mentioned in 'restricted'. When the PTA translates an I.D. that contains protected= parameters to GAME code, it could then define both arrays with the same pieces in them (where it now only defines 'protected' in the Pre-Game code).

More precise definition of what can capture what will have to wait for full implementation of the captureMatrix in the generated GAME code. But in most case (including Megalomachy) such a temporary fix would be sufficient.

[Edit] I now modified the betza.txt include file to support these changes. So in Pre-Game you would have to define an array 'opaque' with the flying pieces and those that can shoot them down, an array 'protected' with the Terror, and an array 'restricted' with Terror and Eagle.


💡📝H. G. Muller wrote on Sat, Apr 20 08:47 PM UTC in reply to Daniel Zacharias from 08:09 PM:

Might it work to use the generated code for most of it and manually define the pieces that wouldn't work?

I suppose this would be an option; the 'Custom Pieces' section of the 'Wizard for GAME-code generation' article described how to add pieces that would need explicit programming. I think the Terror would not be problematic for the automatic conversion; it is the flying pieces that would need separate coding, in particular their jump-capturing moves. I suppose you could define thir moves in the I.D. as QK, RW and BF, and then replace the K, W or F moves by a routine for generating jump-captures in the described way.

But it might be simpler to clone the betza.txt file, and modify the move generator there with some dedicated code for this variant. And then use this modified version instead of the standard betza.txt in the preset. All that would have to be done is to insert some code at the point where it now is decided that an encountered piece can be hopped over by a test whether both pieces belong to the set {bat, eagle, raven, archer, spearman}, and abort the generation of that hopping move when they do.

Since this code would only be invoked when a hopper move hits a potential mount, it would not slow down the move generation very much, and I could even insert that in the standard include file. Then all what would have to be done is defining the pieces that cannot hop over each other in the Pre-Game code, like

set flying (...);

where the ... would be the list of labels of all the pieces (of either color) to which this applies.


💡📝H. G. Muller wrote on Sat, Apr 20 07:56 PM UTC in reply to Daniel Zacharias from 07:36 PM:

Don't count on automatic conversion of the Interactive Diagram to GAME code, though. There are some aspects of this variant that are not supported yet by the betza.txt include file that powers such GAME code. In particular the captureMatrix, which is used to make the flying pieces block each other.


Chu Seireigi. Variant of Chu Shogi playable with drops. (12x12, Cells: 144) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sat, Apr 20 07:39 PM UTC in reply to François Houdebert from 07:29 PM:

It should be explained in the commit message of the drop model. Unfortunately that is not easy to access now that GitWeb is disabled on my website (I haven't had time to fix that yet). But if you have pulled the pullreq branch you should be able to see it on your local machine.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sat, Apr 20 06:28 PM UTC in reply to Fergus Duniho from 04:01 PM:

The coloring is very splotchy, though more so on curved surfaces than on flat surfaces, as can be seen in this color image of a color scan of my Likebook Mars:

Conventional solution for this problem is to apply 'dither' to the image: add white noise to the brightness of the individual pixels, randomly chosen from a homogeneous distribution that has the width of one brightness quantum.


Chu Seireigi. Variant of Chu Shogi playable with drops. (12x12, Cells: 144) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sat, Apr 20 06:21 PM UTC in reply to François Houdebert from Fri Apr 19 09:22 AM:

If HGM has the time and the possibility to add the parametrisation of the hand space in the drop model, of course I'll use it, but I don't know if it's that easy to do.

In the current drop-model.js you can request extra ranks for hand pieces above and below the board, in case there are more piece types that can go in hand than there are board ranks. Does that satisfy your needs?


Bigorra. Game Courier Preset for Bigorra, a large CV, 80 pieces of 34 types on 16x16 sq. board. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Apr 18 06:26 PM UTC in reply to Jean-Louis Cazaux from 05:31 PM:

I discovered a bug in the GAME code I added in my attempt to fix the problem. (writing 'task' instead of '#task'). I think it should be solved now.


H. G. Muller wrote on Thu, Apr 18 04:16 PM UTC in reply to Jean-Louis Cazaux from 02:46 PM:

Sorry, I was out of town for a few days, and had no time to figure out the answer on this one.

The presets you compare with were not automated through the PTA, so there is no reason why these should behave the same.

Are you sure the game ends when the King moves out of check? Normally an illegal move should not terminate the game; it should just be refused (in this case with the message you quote), and then through using the browser 'back' button you should be able to retry another move. This is also what happens if you insist moving a piece to a non-highlighted destination.

If this is the case the only thing that isn't working exactly as it should is the highlighting: the King jumps get highlighted even if they are forbidden because of check. But there is no way to exploit this; in the end legality is enforced by refusing the move.

The way the PTA-generated GAME code enforces 'not out of check' rules is by having the potentially forbidden moves generate e.p. rights on the square of origin. Using such a move then would allow the opponent to capture the moved piece (i.e. the King) en passant, making the move illegal.

Unfortunately the 'accelerated check test' used for determining the legality of the moves to highlight (in order to prevent this from becoming excruciatingly slow for large games) doesn't detect this: it generates all opponent moves from the current position to mark squares that are under attack on the board. And then only rejects King moves that go to such an attacked square. And in this case the problem is not that the destination is attacked, but that the origin is attacked.

I suppose I could solve this in the accelerated check test by suppressing the virginity of a King that is in check during the generation of the highlights.

[Edit] I now changed the move generator to suppress initial moves of a piece that should not move out of check, when it is in check during the accelerated check test. Please test if this solves the problem.


Betza notation (extended). The powerful XBetza extension to Betza's funny notation.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Sat, Apr 13 07:59 PM UTC in reply to Jean-Louis Cazaux from 04:49 PM:

Well, the bracket notation is simpler. This is why I would like to switch to it.

But when chaining moves into a single path it cannot be avoided that you would have to specify the bending angle at each point where two legs connect with the aid of directional modifiers (if f is assumed to be default).

And there is the more fundamental problem that oblique paths occur as pairs of mirror images, and that this mirroring swaps the meaning of l and r. To avoid having to specify complex oblique paths twice, there must be a way to encode sideway deflections not as an absolute direction, but in a relative way. And this is what z and q do.


💡📝H. G. Muller wrote on Sat, Apr 13 01:33 PM UTC in reply to Daniel Zacharias from 01:13 PM:

It would probably have been clearer if I had used a hyphen or slash instead of an a. But it all started as aaK for the area move of Tenjiku Shogi, and caK for the Chu-Shogi Lion. But the hyphens seem to group the atoms in the wrong way, when you don't also use brackets around the individual moves.

In (not-yet-implemented) bracket notation the Betza Rhino would be [W(?fzK)], shorthand for [W?fzK?fzK?fzK?fzK?fzK?fzK?fzK...], a W leg followed by any number of alternating fl and fr K steps.


💡📝H. G. Muller wrote on Sat, Apr 13 01:02 PM UTC in reply to Jean-Louis Cazaux from 11:52 AM:

You should consider the a as a chaining symbol, separating the modifiers for the legs of a multi-leg move. So in afsafzafzW you see 3 a, which means the move has 4 legs. The modifiers for these legs are none, fs, fz and fz, respectively. So the first leg is a W move in all directions (no modifier). From there it continues forward-left or forward-right (because s = l or r), i.e. a diagonal step in the second leg. Then for the third leg it again deflects 45 degrees, but in the opposit direction as in the second leg, as this is what z means. Etc. So afsafzafzW is a shorthand for aflafraflWafraflafrW, two crooked trajectories that are each other's mirror image.

Haru's notation (afz)W is shorthand for WafzWafzafzWafzafzafzW..., a set of ever longer crooked trajectories. Every additional afz adds a new leg, which deflects in the opposite fl or fr (relative) direction as the previous leg did. (Which is the hallmark of a crooked move; if they would all deflect in the same direction, which you could do with fq, you would get a circular piece.)

The second leg in every sequence should really have been specified as fs, however, to indicate it can deflect in both directions, rather than only in one that is specified relative to the previous one. The first z or q occurring in such a sequence (i.e. before it is clear what 'opposit' or 'the same' direction means for the deflection, because there was no previous deflection) is always interpreted as s. You could see this as a special rule for expanding the parentheses into paths with different lengths.


25 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.