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

Comments by HGMuller

LatestLater Reverse Order EarlierEarliest
Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, Jan 27, 2023 09:13 PM UTC in reply to A. M. DeWitt from 07:59 PM:

True. But I have always had the feeling that XBetza notation should be the vehicle to specify that, not the promotion. What I am missing in XBetza is the possibility to specify a side effect that is mandatory when possible, but not blocking the move when impossible.

How about this: the modifier t is a leg separator like a, except that the actual piece move terminates at that point, and the remaining legs only describe the path of its 'influence'. If this is not a unique continuation, all possible realizations will be combined with the move. So where yacabQ would describe a Queen that (by virtue of the y) does a single King-like burn of an enemy, ytacQ would burn every enemy adjacent to the square it lands on, and can even land there if there is no adjacent enemy at all. An Ultima Pincher Pawn would be ytacfapR, where the captureMatrix would be used to forbid the piece (and its influence) to hop an enemy. Unlike actual moves, the last leg of the influence can be a 'hop-on' leg.

If you are prepared to use JavaScript there are many ways you could interfere with the standard operation of the Diagram. There is for instance a routine ScoreMove(move, predecessor), to prep the 'raw' moves coming out of the move generator by determining the piece types of the capture victims, storing those in the array describing the move, and calculating the effect these captures (and promotions) would have on the score. ('predecessor' is the move preceding it, only used to enforce anti-trading rules). Interfering there to add a few burn victims is not very difficult; you just replace the function by a wrapper for it, like:

var OriginalScoreMove = ScoreMove; // remember the standard routine
var burnX = [ 1, 1, 1, 0, -1, -1, -1, 0 ];
var burnY = [ 1, 0, -1, -1, -1, 0, 1, 1 ]; 
function ScoreMove(m, last) { // and redefine it
  var x = m[0], y = m[1];     // origin
  var piece = board[y][x];    // moving piece
  if(IsBurner(piece)) {
    var n = 4; // 0-3 are the coordinates of origin and destination
    for(var k=0; k<8; k++) {
      var xb = x + burnX[k], yb = y + burnY[k]; // coordinates of neighbor square
      if(IsEnemy(xb, yb)) { // this is assumed to return 0 when (x, y) is off board
        m[n++] = xb; m[n++] = yb; // add a locust victim
        m[-2]++; // this counts the number of squares in the move
      }
    }
  }
  return OriginalScoreMove(m, last); // call the standard routine on the modified move
}

💡📝H. G. Muller wrote on Fri, Jan 27, 2023 04:13 PM UTC in reply to H. G. Muller from 11:11 AM:

The ShowMoves problem is now fixed: I reverted to including the loop directives in the compiled move descriptors even when newClick=1, and made the code that performs the click swapping for shooters resistant to their presence. As far as I could see this appears to work.

I now also made promotion to empty square ('kamikaze capture') possible; it can be specified in the captureMatrix by a 0 (zero), and requested from the WeirdPromotion() custom script by returning 251 for the promotion piece. This means that it would now also be possible to implement the passive burning ability of a Tenjiku Shogi Fire Demon, by detecting in WeirdPromotion() whether a move lands next to an enemy Demon, and return 251 in that case.


Gothic Isles Chess. Fictional historic variant, with Dragons, Wizards and Champions. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Fri, Jan 27, 2023 12:05 PM UTC in reply to David Paulowich from 02:00 AM:

Positions like this suggest that promotion to colorbound pieces is a poor design choice.

One could also argue that promoting to the weak, color-bound Ferz enriches Shatranj with an interesting strategic theme: one has to plan Pawn manoeuvres such that you won't promote all your Pawns on the same shade. And definitely do not leave the opponent a defender on the other shade when you are playing for a win. This is already true in orthodox Chess, where unlike Bishops can draw even against a majority of 2 Pawns, despite the fact that these would promote to Queen.

It is true that Shatranj is quite drawish, but I think this is more a consequence of the Ferz being such a weak piece than of its color-binding. I doubt that promoting to Wazir would be much of an improvement.


Betza notation (extended). The powerful XBetza extension to Betza's funny notation.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, Jan 27, 2023 11:45 AM UTC in reply to Ruei Ching Hong from Thu Jan 26 11:40 PM:

Kamikaze pieces are a form of promotion (namely promotion to an empty square). The Interactive Diagram does support mechanisms for indicating unusual promotions (like the captureMatrix), but unfortunately promotion to empty is not amongst those. The problem is that promotion code 0 (the code of an empty square) is used to indicate there is no promotion, and the piece remains itself.

It should be possible to use another code for indicating promotion to empty, though, and recognize that as a special case in the routine that performs the moves.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, Jan 27, 2023 11:11 AM UTC in reply to H. G. Muller from 08:31 AM:

The ShowMoves problem appears to occur because this still uses the old highlighting routine. And now that I leave out the loop directive from the internal move descriptors this cuts non-final slider legs with m rights (which should continue after a succesful try) to their first step. I should make the highlighting in ShowMoves also be done with NewClick(); I guess I didn't do that because it never has to deal with a double locust capture, as hovering gives you at most a single potential victim.

A reasonably cheap method for tracking pieces (of all types!) would use an array location[] indexed by (colored) type, where the square numbers (calculated as 128*rank + file) where pieces of a given type sit would be stored in location[type] and location[type+512]. This can be updated in MakeMove() like

function TrackMakeMove(m) {
  var p = m[-6] & 1535; // moving piece (stripped of marker flags and virginity)
  if(location[p] == 128*m[1] + m[0]) location[p] = -1; // mark first entry as invalid when it was for the moved piece
  p = m[-1] & 1535; // promoted type (could be same as mover)
  if(location[p] < 0) location[p] = 128*m[3] + m[2]; // put destination in first entry when the latter was unused
  else location[p+512] = 128*m[3] + m[2]; // otherwise it must have been for the other piece of this type, so this piece uses second entry
  OriginalMakeMove(m);
}

and similar for UnMake(). It would not take account of capture of the pieces, (which would be cumbersome because of the possibility of locust capture), so when using the locations for a type it should always be tested whether a piece of that type is actually there; it could still indicate the square where a piece of that type was captured, but which now is occupied by something else.

Limitation is that it would only work if there are at most two pieces of the types of interest. Which for Suzumu Shogi would not be the case, as there could be four Tetrarchs. But somehow it doesn't seem wise to adapt a general feature to a very exceptional case; in virtually every variant there are only two pieces of each type. One could always artificially make the Diagram use two different Chariot Soldiers and Tetrarchs, each present as a pair. After all, we already artificially distinguish a Lion Hawk obtained through promotion from a primordial one, just to maintain a homogeneous mapping from piece to promoted form.

With the aid of this you would only have to look for enemy Tetrarchs in 4 locations, rather than 256. You would do that in BadZone() when you find 'nodes' increased, and for every Tetrarch you find this way you would set the square surrounding it to 'nodes' on an auxiliary board. Moves starting from a thus marked square would then be suppressed, as that piece would be frozen.


💡📝H. G. Muller wrote on Fri, Jan 27, 2023 08:31 AM UTC in reply to A. M. DeWitt from 12:25 AM:

The point of paralyze is that figuring out whether a piece is frozen is a rather expensive part of BadZone(), as it has to probe 8 board squares, and that doing this once per piece before the move generation relieves you from doing it for every move of the piece. So you would just be moving that expensive part from one call to another, with a little overhead added for figuring out which type of call you are dealing with:

if(piece == 0) {
  return IsFrozen(x, y);
}

And when the piece is frozen you would also safe the time for attempting to generate its moves. Whether this gains anything would depend on the typical ratio of the number of moves versus the number of pieces. In the Tenjiku setup many pieces start in a smothered position, but the pieces you tend to develop first have an extrordinary large number of moves. So my guess is that it would still be beneficial, because for almost the entire game you would have more moves than pieces.

But it is true you could achieve similar, or perhaps even better savings by remembering which piece you are testing for between BadZone() calls:

var latestPiece = -1;

BadZone(x2, y2, piece, color, x1, y1)
{
  var s = 16*x1 + y1; // unique square number of origin
  if(latestPiece != s) { // new piece
    latestPiece = s;
    frozen = IsFrozen(x, y); // recalculate frozen for new piece only
  }
  if(frozen) return 1;
  ... // other tests for non-frozen pieces
}

This doesn't require extra calls to BadZone(). It would still generate all moves for a frozen piece to discover only afterwards that they should be rejected if the piece was frozen. But since pieces would almost never be frozen (especially in Suzumu Shogi,where you can get Tetrarchs only by promotion), I suppose this only wastes negligible time in practice.

More could be saved by using a more efficient algorithm for IsFrozen(). But that would require knowing where the Tetrarchs are. But even the most stupid way to know that, scanning the entire board in every new position before move generation, might be competitive: there are only 256 board squares to test, while scanning the individual piece neighborhoods examines 8 squares per piece that has moves. So once you have 32 pieces that have moves, the whole-board scan becomes cheaper.

I wonder if I should build in a standard feature to trach the location of pieces of a certain type (enabled through a parameter like track=N). The AI uses a global variable 'nodes' that counts move generations, and could be used in BadZone() to know hen a new move generation has started by comparing it to the value at the previous call. If the Tetrarch locations would be somehow available, it could use these to mark the squares adjacent to each Tetrarch in a frozen[y][x] board-sized array by the current value of 'nodes' when this value changed, and the test for being frozen would just be

if(frozen[x2][y2] == nodes) return 1;

Tracking would cause some overhead, but variants that do not track any pieces could be protected from that by replacing the NewMakeMove() and UnMake() functions by special tracking ones only when tracking is requested.


💡📝H. G. Muller wrote on Thu, Jan 26, 2023 09:45 PM UTC in reply to H. G. Muller from 12:31 PM:

OK, I uploaded a new betza.js script. This classifies pieces as shooters during compilation of their XBetza moves (i.e. when the Diagram is initialized), and only messes with the click order for those. I think this should be safe.

The Lion Dog now seems to work, although I used a slightly different description to prevent the 2-out-1-in move being generated twice:

KADGHcavKabKmpafcavKcafcmpafK

The difference is the final f, which in your description was a v. As the Lion Dog has tramplings (e.g. cafK) it is not classified as a shooter, so you have to enter a double capture through 2-out-1-in by first clicking the distant victim, and then the adjacent one.

I also have implemented a new parameter paralyze. When set non-zero it will cause BadZone(x, y, piece, color) to be called for every piece before move generation for that piece starts, with the 'piece' argument equal to 0, and (x,y) the piece location. Returning non-zero in that case will cause no moves to be generated for that piece at all.


💡📝H. G. Muller wrote on Thu, Jan 26, 2023 12:31 PM UTC in reply to A. M. DeWitt from Wed Jan 25 03:24 AM:

Indeed, there is a problem here. When the last two squares of the 2-out-1-in move are swapped because they constitute a rifle capture, the click order becomes the same as that for a 2-out trampling. I suppose the lesson is that it cannot be determined just on the basis of a move itself whether it should be treated as a shooting; it depends on which other moves are there. Perhaps the whole idea of automating this is a folly, and it should be made subject to a parameter shooters=1 to enable it.

I will make one more attempt: during compilation of the XBetza decriptor each part can already be classified as a trampling or shooting (or a normal move), and a piece is classified as a shooter only when it has shootings and no tramplings. Then moving up the destination click to before the locust captures will only be done for pieces classified as shooters. It will take me some time to implement this.

Another issue: would it be helpful to not only call BadZone() after a move is generated, in order to allow or forbid it, but also before generating any moves for a piece (indicated by an invalid destination, e.g. x2 = -1), to decide whether any moves should be generated at all for that piece? That would make 'freezing' of pieces more efficient.


Stone's Chess. Chess variant with the addition of two Archbishops. (10x8, Cells: 80) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Jan 26, 2023 09:48 AM UTC in reply to Greg Strong from Wed Jan 25 02:37 AM:

Greg Strong wrote on 2023-01-25 UTC

Is that right or are there any differences I missed?

In Janus Chess castling with the far Rook makes the King move 4 steps.


Empress Chess. Members-Only Help your Empress win her battle. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Tue, Jan 24, 2023 05:27 PM UTC in reply to A. M. DeWitt from 04:43 PM:

I am wondering whether I should make hop-restrictions a standard feature of the Interactive Diagram. This could for instance be done through the captureMatrix parameter. That already has a symbol for 'capture forbidden' (the !), that can be used to outlaw captures of one specific type by another. A symbol ^ in the location of AxB could mean that A is not allowed to hop over B, and a 0 that it can neither hop over nor capture B. A ban on hopping could also be applied to locust capture.

Of course the capture matrix for a game like Suzumu Shogi would be horrendously large. But most rows could be left empty, as most pieces neither hop nor locust-capture, and there are no bans on normal captures.

As to freezing: a much faster way to do implement that is to have NewMakeMove() and UnMake() keep track of the Tetrarch locations (which I understand are the only freezers). This could for instance be done by having arrays next[] and prev[] indexed by square numbers, that link all Tetrarchs of the same color in a doubly-linked list that is also accessible by square number. To remove a Tetrarch on square sqr from the list (because it moves away or is captured) you would just do

next[prev[sqr]] = next[sqr]; prev[next[sqr]] = prev[sqr];

To place a Tetrarch (because you moved it there or promoted to one) you would do

next[sqr] = next[-1]; prev[sqr] = -1; prev[next[-1]] = sqr; next[-1] = sqr;

Most moves would not move or capture a Tetrarch, so the overhead is limited to testing if they did. But it would allow you to quickly loop through the Tetrarch locations by following the next[] links starting at next[-1] (and the other color would use next[-2]). Most of the game the list would be empty anyway (i.e. next[-1] = -1). You could do that at the start of move generation, and when you find a Tetrarch, replace every adjacent enemy piece by a dummy without moves to freeze them. You would of course have to undo that immediately after move generation.

[Edit] I now implemented piece-type-selective exclusion of hopping through the capture matrix, using ^ (for outlawing hopping for that piece combination) and $ (outlawing both hopping and capture, like for the Cannon in Janggi). This can also be done independently for friendly and enemy pieces.


💡📝H. G. Muller wrote on Tue, Jan 24, 2023 12:12 PM UTC:

OK, I think I fixed it. The Betza compiler now refrains from inserting these 'loop directives' in the legs sequence when the NewClick move-entry method is used. I had to change some tests in the assignment of click sequences (which already relied on the presence of these directives) too. Distant or sliding rifle captures do not require the click to the final destination. This might be a folly, though, as it causes ambiguity when both the rifle and normal capture are allowed on the piece. Perhaps I should make this subject to a Diagram parameter autoComplete, and in general require all clicks, but consider the move entered when there is only one matching move left in the list, and at least two clicks have been given.

I am not even sure that swapping the order of locust victim and destination is always harmless, or whether it could lead to ambiguities too.

Anyway, I uploaded the fixed betza.js. (Flush browser cache!) It seems to make double and single burns as I intended them, clicking the destination first, and then 'picking off' the burn victims. Where clicking the same victim twice does a single burn. This was in combination with a Demon that moved like:

cabKcabacabKshQshmpyacabQshmpyacabmpacabQ

It did not forbid burning of a Demon with the killsZone() routine you had made. But when I made my own, that only cares about this aspect of the rules, it did work:

function killsZone(x2, y2, piece, color, x1, y1, ex, ey)
{
  if(kills == 0 || x1==x2 && y1==y2) return 0; // normal move or igui always allowed
  if((board[killY[0]][killX[0]] & 511) == 35) return 1;
  return (kills > 1 && (board[killY[1]][killX[1]] & 511) == 35);
}

So it is probably because your routine is not yet adapted to the new situation.

The extensive testing you do in BadZone() slows things down enormously. It is questionable whether this variant can ever be played by the Diagram's AI, (it outlasted my patience even at 2 ply), but this extra processing certainly doesn't help. If you need this amount of programming to make it work, it might be simpler to just replace some functions of the original script by slightly modified ones of your own. JavaScript allows you to redefine a function.

E.g. the function NextLeg(), which is the core of the AI's move generator, contains a line

      if(f & 16) NextLeg(ff, fr, x, y, rg>1?len:iso, d+1); // p/g leg never final; do nothing here and continue

which takes care of continuation of a hopper move (the 'hop off') when the current leg has hit a mount, which at that point is stored in the variable 'victim'. You could clone that routine, and supplement the condition f & 16 with a test whether the piece types allow the hop:

      if(f & 16 && jumpClass[victim&511] < jumpClass[board[fr][ff]&511])
        NextLeg(ff, fr, x, y, rg>1?len:iso, d+1); // p/g leg never final; do nothing here and continue

when you have initialized an array jumpClass[] for all the piece types. That would releave you from all the checking after the moves are generated.

The way you treat freezing only seems to work if you generate moves for a single piece, and it is not clear how 'frozen' ever gets reset. I suppose you could make use here of the fact that the move generator generates moves piece by piece, and only redo the scan of the surroundings of the piece when the current piece is different from that of the previous call. If there are only few freezers, it might be much faster (considering the large number of pieces in this variant) to first locate the freezers, scan the board for their enemy neighbors, and temporarily replace those for dummies during the move generation. (This would require you to provide your own modified version of the (very small) routine GenAll().)


💡📝H. G. Muller wrote on Mon, Jan 23, 2023 09:04 PM UTC:

OK, I see. There is something very wrong with NewClick(). The XBetza compiler inserts a dummy leg at the end of a non-final sliding leg with m rights, to act like a loop directive. The old interpreter needed that, to remember from where it had been attempting the subsequent legs, so that it could resume elongating the sliding leg for another move when it was done. The AI's move generator doesn't need that, and just ignores these dummy legs, recognized by the mode flags being set to -1. But the classification of moves in NewClick() mistakes it for a genuine leg of the move, and since -1 has all flag bits set, it mistakenly thinks that it is dealing with a castling for the myacabQ part (which the compiler already separates from the pyacabQ part, for the purpose of inserting the loop directive in the former, while the latter doesn't need one). Thinking that it is a castling makes it eliminate the request for some clicks which are really needed to distinguish different double burns from an empty square. The (af)0 notation doesn't suffer from that, because none of the moves to which it expands contains any slider legs.

I will try to fix this tomorrow.


💡📝H. G. Muller wrote on Mon, Jan 23, 2023 09:27 AM UTC in reply to A. M. DeWitt from 01:20 AM:

The 'kills' data is only valid during move generation. Which is where BadZone() is called to vet the generated moves. Otherwise it is undefined (the data for the latest move that was generated remaining there). Apart from during move generation, BadZone is only called from the Highlight() routine. But when using the NewClick entry system the Diagram should never attempt to highlight the destination of a move that was already suppressed at the generation stage. Perhaps for safety this call to BadZone() should be suppressed when newClick=1; it belonged to the old entry system.

The problems with single/double burning appear to be a case of "works as designed" not being the same as "works as desired". The point is that the heuristic for classifying a locust capture as a shooter (swapping the order of the locust and the destination click) only works for the last locust victim. Any earlier victim will always be treated as trampled, and has to be clicked before the final destination. So clicking destination and then a locust victim unambiguously indicates the single burn, while a double burn first has to click one of the locust victims to trample it. Then it will highlight the destination in cyan,and when you click that you can pick a second locust victim, which completes the move by shooting it.

The way the NewClick system works is that for each move it determines a click sequence required to select that move. Normally this would be the origin, all locust victims in the order XBetza specifies those, and finally the destination. There are exceptions for e.p. capture and castling, which in general require only two clicks even though their move encoding involves more squares. And for shooters, where it swaps the final two clicks. Detecting whether a move is castling, e.p. or igui can only be done during generation of the move, when the move descriptor from which the move results is still known and can be consulted. From the internal encoding of the move it cannot be concluded whether it was a trampling or a shooting; mpafsmpacabW (Forest Ox) and mpafcaW can both move from e3 to f5 while capturing e5, but only the first would be considered a shooter (because the final leg always retraces the one before it) and require click order e3-f5-e5.

I suppose I should put the code that moves the destination click earlier inside a loop, so that it is able to pass locust vctims as lon as the preceding two legs have a cab structure. Then the double burnings could be entered by first clicking the destination, and then picking off the burn victims until you run out of victims, or click the destination again to terminate the move. That would be a much more intuitive way for entering multiple burns.

Some other remarks: You use (af)0 to force a slide on a K atom, but this is not recommended. Because (af)0K is expanded by pre-processing to KafKafafKafafafK..., as if every distance is a separate move, which would be attempted independently. So if the slide is blocked at the second square (so that afK would fail to produce a move) it would still keep trying afafK etc. And when afafafK was a valid non-capture, it would still again check the first four squares for emptiness when attempting afafafafK and longer paths. The equivalent plain Q would do much more efficiently, and probe each square on the path only once, and stop after it finds an occupied one. You can turn the Q into K for the burning by using ya to specify a range toggle. E.g. mpyacabQ would describe a Queen burning one enemy adjacent to her destination.

It is also important to take the replacement victim only on the final leg, and hop over it when positioning for the next shoot, to prevent it being added as a spurious locust victim. I think you already do that.

[Edit] I now uploaded a new betza.js, which suppresses the BadZone() call in Highlight() when newClick=1, to make sure it cannot interfere when kills is not valid. (Flush the browser cache!)


💡📝H. G. Muller wrote on Sun, Jan 22, 2023 08:54 PM UTC in reply to A. M. DeWitt from 02:30 PM:

There definitely is something wrong in NewClick, that doesn't seem related to the BadZone() issue. If I define single and double burns on the same piece, it will always select the single burn. If I only define a double burn, that works as intended. (And it also excludes burning other Demons as it should.)

I will debug it further tomorrow.


Desert Pub Chess. A game where Desert Wazirs & Desert Ferz capture by jumping. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Jan 22, 2023 11:56 AM UTC in reply to Gary Gifford from 02:03 AM:

I fixed the Pawn move in the Diagram, and added Prince to the promoChoice. (Now indicated by the letter M to distinguish it from Pawn.)

I think promotion to Prince is an improvement, because 2M vs N or 2M vs M are general wins (when stalemate is a win), while any other combination of two pieces cannot beat a lone N or M. So the advantage of a single Pawn can now be enough to force a win. And a lone K is already enough to beat a lone desert piece. So this should remove most of the drawishness, if there ever was any.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Sun, Jan 22, 2023 10:32 AM UTC:

The NewClick entry system is still experimental, and in general I try to avoid auto-completion. But there is one exception: I put in a heuristic that classifies a locust capture eaither as 'shooting' or 'trampling' (depending on whether the leg after it goes back to the square the previous leg came from), and swap the click order of the two legs in that case. So that you can first click the final destination, and only then what you shoot. This seemed more naturally, e.g. in the case of the Forest Ox of Odin's Rune Chess.

Perhaps this now interferes with what you are trying to do, and needs some refinement. Can you be more specific on what goes wrong?

With BadZone() you should be able to restrict the list of moves that is generated, suppressing the burns you don't want. If this will lead to a list from which the NewClick() algorithm cannot properly select the one you want, this should count as a defect in NewClick(). Not as a problem with using killX/Y in BadZone().


💡📝H. G. Muller wrote on Sat, Jan 21, 2023 04:26 PM UTC in reply to A. M. DeWitt from 03:20 PM:

The NewClick entry system is based on the AI: it uses the move generator of the latter to create a list of moves, and then after each click eliminates the moves that do not correspond to the clicks received so far, until only a single move is left. So getting it done in the AI's move generator is all that is needed. But indeed this does not use the 'clicks' array, as during thinking no one is clicking.

The AI's move generator uses a routine StackMove() to add a move to the list, and this calls BadZone() to vet the move for user-supplied restrictions on the Betza notation. This StackMove() gets the origin and destination squares passed as arguments, but not the locust squares. These are 'passed' as global variables: 'kills' indicates how many locust squares there are, and arrays killX[i] and killY[i], 0 <= i < kills contain the coordinates of these squares. For backward compatibility killX[0] and killY[0] are passed to BadZone(), but not any additional locust squares.

BadZone() can access these global variables just as easily as StackMove() does it, so you could base your move vetting on those.

A complication is that e.p. squares are also passed in the kill array (a variable 'eps' indicates how many of the kills are e.p. squares). But I guess that you won't have any e.p. capture in Shogi variants, so you won't have to deal with that.


Desert Pub Chess. A game where Desert Wazirs & Desert Ferz capture by jumping. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sat, Jan 21, 2023 09:23 AM UTC:

If the Princes are not royal, then why should these not be available as promotion choice? It would certainly be helpful in reducing the alleged drawishness of this variant. Kings are very efficient in chasing Ferzes and Wazirs to their doom; I don't think Knights can do that as easily. The desert pieces have a weakness in attacking pieces at the edge or in a corner.

That total extermination is a win condition that is often difficult to achieve is mainly caused by the participation of powerful pieces. The pieces in Desert Pub Chess are all quite weak; the Prince is probably the strongest in the end-game, and we know from Chess that a bare King is easy to checkmate (and then will get captured, if the game would not end at checkmate).

The article doesn't specify what the game result is in case of stalemate; I configured the Diagram to make that a win. After all, losing all your pieces is just one way of being stalemated. The Diagram limits the number of captures in one move to four.


How to Enforce Rules in Game Courier. A tutorial on programming a rule-enforcing preset in the GAME Code language.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Jan 19, 2023 11:50 AM UTC in reply to Daniel Zacharias from 05:04 AM:

If this is 'Post-Move' code, the Pawn has already landed on the to-square, so that it is no longer empty? Try

verify == captured @;

For my understanding: why is it necessary to copy the screen to a variable, before testing it. Is there a problem with writing

capture screen;

?


Diagram testing thread[Subject Thread] [Add Response]
H. G. Muller wrote on Thu, Jan 19, 2023 10:57 AM UTC in reply to Kevin Pacey from Wed Jan 18 10:49 PM:

Considering the WA a weak version of the Q is a stretch of the imagination. The value difference alone makes it a completely different piece, in the way you have to use it. On 8x8 the opening value of the FA is hardly different from that of a Bishop. On larger board the Bishop gains value, but the FA stays similar in value to a Knight. As the WA would. Each of those is, after all, an 8-target leaper.


Duck Chess. A Duck that must be moved by both players can block your moves. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
📝H. G. Muller wrote on Thu, Jan 19, 2023 09:49 AM UTC in reply to H. G. Muller from Tue Jan 3 09:54 PM:

The AI of the Diagram now also understands the trick of reserving a square for your next move by playing the Duck there, as you can verify by setting up a position through h7-h6, g7-h4, h2-h3, Ke8-h5, Qd1-d3. If at that point you switch on the AI, and play a useless move for black (e.g. a7-a6, Duck to a7), the AI will reply with Qf5, Duck to g5, and announce mate. (Which in this case does not end the game yet, but should be interpreted as announcement of King-capture in 2. In general the Diagram will allow you to play on when you are checkmated; if you do a pseudo-legal move there it will capture your King an announce "I win".)


Diagram testing thread[Subject Thread] [Add Response]
H. G. Muller wrote on Tue, Jan 17, 2023 08:52 PM UTC:

It is good that you also include extra light pieces. But why use the Elephant-Ferz? It is so similar to a Bishop that it adds very little to the game. So why not use the Elephant-Wazir (aka Phoenix) instead? That is a very interesting piece, but you hardly ever see it in western chess variants.


Blue Chip Chess. A chip, moved each turn by the players, denotes a square where pieces may not go to. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Mon, Jan 16, 2023 09:59 AM UTC:

I now also succeeded in making the Interactive Diagram's AI play Blue Chip Chess. This was quite a bit harder than Refusal Chess, because of the obligation to move the Chip, and consequently the possibility to 'reserve' the target square of your best continuation move. This rule causes each FIDE position to have two scores: one for when you can place the Chip where it maximally hinders the opponent, the other for when you cannot do that, because the Chip is already there. So you cannot unconditionally ignore the best move in every position (like in Refusal Chess), and not even only ignore it when it is a non-capture (as captures cannot be hindered by the Chip). In any position you can be hindered by two Chip placements: when the Chip is blocking your own best FIDE move, or when the Chip is preventing your best Chip placement because the opponent already put it there. The search will have to figure out which of the two would be better, as well as which move is best. (Which can be a different move for each of the Chip placements.)

This all appears to work now. E.g. setting up a mate threat by Rh8-a6, Ng8-b6, Bc8-b5, h7-f6, d2-d6, f2-f6, Rh1-b3 (threatening 1. Rh3 ... 2. Rh8#), and playing a useless move 1... Ra5, Chip to a4, the AI (at 3.5 ply or more) indeed plays Rh3, and reserves Rh8# by placing the Chip on h8. (Of course black could have staved off the mate by playing the Chip to h3, keeping the Rook from the h-file. This would not work forever, though, because white can then play Rg4, Chip h4 to reserve his access to the h-file. So it would be better if black starts ply placing the Chip on h8 himself. This time not to reserve a FIDE move, but reserve the Chip placement he will need on his next turn. He can keep that up forever.)

You might have to append the URL with ?nocache=true to see the modified page rather than the version cached by CloudFlare. (Or click this link.)


The Fairychess Include File Tutorial. How to use the fairychess include file to program games for Game Courier.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Jan 12, 2023 08:42 AM UTC:

@Fergus: Very nice that you can simplify your stalemate routine in the fairychess include file, but please don't do it in such a way that it breaks presets of others through changing the underlying behaviour of GAME code or Game Courier. If you do not maintain backward compatibility at all times, you are bound to break stuff.

So if you want an array that contains the legal moves as text rather than coordinates, and also contains special moves, just give it a new name, and use it by that name in the user code you want to simplify, so that existing presets that use the method you want to deprecate continue to function.


ChessVA computer program
. Program for playing numerous Chess variants against your PC.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Jan 8, 2023 07:05 PM UTC in reply to Daniel Zacharias from 06:34 PM:

Ah, I see. That is 79%, which is way outside any statistical error bar.


H. G. Muller wrote on Sun, Jan 8, 2023 09:05 AM UTC in reply to Daniel Zacharias from 12:24 AM:

This is an anomalous result; if the games were really independent, the statistical error should decrease as 1/sqrt(numberOfGames). So for 106 games it would be around 4%, so that the 62/106 (=58.5%) score is about two standard deviations above equality, while the other score pointed to equality with a 3% standard error. The standard error in the differens of the two results should be about 5%, so the 58% is off a bit more than you would expect, but not extremely so.

What I often did to make the games more independent is play them as shuffle games. If you shuffle white and black independently (as seems natural for CwDA) you can create a lot of starting positions even when you leave King and corner pieces in place.


Grand Cavalier Chess. The decimal version of Cavalier Chess. (10x10, Cells: 100) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Jan 8, 2023 07:20 AM UTC in reply to Greg Strong from Sat Jan 7 11:09 PM:

Well, beware that I was not really playing Grand Cavalier, but was using Half-Maos instead of full Maos for the Cavaliers. It is not implausible that this made a lot of difference: no possibility for Cavalier back an forth movement.


H. G. Muller wrote on Sat, Jan 7, 2023 05:02 PM UTC in reply to Greg Strong from 04:18 PM:

I now put an Interactive Diagram in the Grand Cavalier Chess article.

The piece values guessed by the Diagram were Cavalier = 239, Cannon = 275, Nightrider = 520, Queen = 1080. (This is not exactly reproducible, as the value guessing involves random sampling of positions). If I sneak in a Rook amongst the pieces, it gets a value very close to that of the Nightrider.

This seems to confirm the Xiangqi wisdom that a Cannon is slightly better than a Horse. (The Diagram uses a 25% filled board for determining piece values, and at that stage there would still be plenty of mounts.) And that each of those is only worth about half as much as a Rook.

Trading Cannon for Nightrider would then be equivalent to gaining a Cavalier.


Stone Garden Chess. The animal statues in the stone garden came to life and attacked the two rival kings! With the help of a policeman each, they…. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Fri, Jan 6, 2023 07:28 PM UTC in reply to Diceroller is Fire from 06:47 PM:

Well, your images were still insanely large. I edited the article a bit to show them at a size that is more in line with what we have on other pages. For some that meant I had to shrink them by a factor four!

It is still not clear to me how turning of the Raven works. You say once in N moves. But are these moves of the Raven, or moves of the player to which the Raven belongs?

If they were moves of the Raven, I could implement it for the purpose of an Interactive Diagram as (hidden) promotions: there would be a number of different Ravens, one that can turn, another (Raven1) that cannot turn, but automatically promotes to Raven whenever it moves, a Raven2 that promotes to Raven1 on every move, etc. And then when the Raven turns, demote it to the Raven that still has to promote N times.


Grand Cavalier Chess. The decimal version of Cavalier Chess. (10x10, Cells: 100) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Fri, Jan 6, 2023 06:42 PM UTC in reply to Aurelian Florea from 04:56 PM:

Indeed. So I used Half-Cavaliers instead of Cavaliers. These only have the four forward Mao moves. I already explained why. I don't expect that to affect the piece values much. (Except of course that it has a different value itself.)


H. G. Muller wrote on Fri, Jan 6, 2023 02:47 PM UTC:

You get many draws. I hardly had any.

When white had 3N+C vs black 3C+N (setup below), white won 101 games, black 26, and 1 draw (79.3%).

With reversed colors black won 73 games, black 20, and 3 draws (77.6%)

Total result: Nightriders vs Cannons 176-48 (78.6%). Statistical error 3.3%.

I used C=350, N=460, Q=851, Half-Mao = 74. In my experience there are no self-fulfilling profecies here: if you let the engine believe the wrong piece is the more valuable, the better piece would still win. Because no matter whether their believe is correct or not, one of the players would still avoid they would be traded for each other. So the imbalance stays around a long time, during which you measure how much damage the pieces do to others. (Unless you go to extremes like Pawn > Queen, then it will of course quickly sac its Queen for a Pawn, as Pawns are way to weak, abundant and exposed to avoid such a trade.)

In fact the performance of the piece that the engine thinks is most valuable would suffer from this, ('leveling effect'), whether the believe is correct or not. Because its deployment will get hindered by the need to avoid 1-1 trades, from which the piece that is believed to be worth less does not care about that.


H. G. Muller wrote on Fri, Jan 6, 2023 11:36 AM UTC:

I have started a test with Fairy-Max. It is not exactly Grand Cavalier, because Fairy-Max did have some problems with that, which did not seem worth solving. (Only start positions with a completely filled rank of 'pawns' and all pieces on the back rank can be configured. So I put the Cannons in the corners, and Cavaliers in front of them on 3rd rank. The Cavaliers that the Cannons then attack in the opening position are protected anyway, and such minor details in the opening position should not affect piece values. Worse was, unexpectedly, that since I handle promotion through a table (to allow square-dependent promotion like in Grant Acedrex) Fairy-Max also promotes 'pawns' on their own back rank! Normal Pawns of course can never get there, but I could not afford replacements like Cavaliers that can move backwards. So I replaced those by forward-only Half-Maos.)

Of course the piece values are a bit uncertain at this time, and I used the standard values for 10x8 board for the pieces. Except that I never measured the value of a Half-Mao. But that should be close to that of a FIDE Pawn. (A full Mao is worth half a Knight in a FIDE context, so a half-Mao is probably less than a Pawn, but the fact that it can promote gives it again something extra.)

For one player I replaced a Cannon by a Nightrider in the nominal start position, and for the other I did the opposit. So the imbalance is two Nightriders vs two Cannons, where each player still has one Nightrider and one Cannon in addition to that. From these positions I then play a long match, at 40 moves per minute (classical time control).

As the test is running, I can already conclude that the Cannons gete crushed. The player with the 3 Nightriders scores around 80%. I will report the exact results when the test finishes.


Compromise Chess. Propose five moves and your opponent selects one for you. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Jan 5, 2023 09:58 PM UTC in reply to Adrian Alvarez de la Campa from Thu Mar 16 2006 10:00 PM:

And the Diagram here is really the same as that for Refusal Chess, except that it announces in advance what his second choice is.

Perhaps this gives away too much? Even though it is usually quite obvious what the best move is that you should not allow it to play, it might be better to randomly decide which move it will play automatically, and which it presents as an alternative.


Refusal Chess. Refuse your opponent to make certain moves. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Jan 5, 2023 09:43 PM UTC:

Now that I am into refusal variants, it was of course easy to also make an Interactive Diagram for the simplest of those.

As for the interface: the AI just takes back the move you play when it wants to refuse it, printing a message above the board in red. The user can refuse the AI's move through a button.


Grand Cavalier Chess. The decimal version of Cavalier Chess. (10x10, Cells: 100) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Jan 5, 2023 03:03 PM UTC in reply to Fergus Duniho from Wed Jan 4 09:53 PM:

Zillions-of-Games values the Cannon more than the Nightrider. The main advantage of the Cannon is that it can attack other pieces without being attacked back by them. The Nightrider can do that from a distance, but up close, many pieces it attacks could capture it.

I seriously doubt that not being able to attack from close distance (which is peculiar to this variant, where almost every piece has Knight moves) is a larger handicap than not being able to attack without a mount. The BN, RN and Equus Rex are worth more than a Nightrider anyway, so you could still attack those from close by when protected. And Nightriders have enormous forking power, from close by as well as from a distance, (and can also skewer pieces), so the Knight compounds (plus Queen) are very vulnerable targets for most of the middle game. A Cannon has very poor forking power, with only a single forward ride instead of four.

That an occasional mate position exists, which cannot be forced, has no impact on piece value at all. Even mating potential (i.e. the ability to force checkmate against a bare royal from almost any position) in general contributes very little to piece value. Because there usually remain enough promotable pieces around to provide such mating potential, and the main value-determining trait is how well the piece can support those on the way to promotion.

Without using zugzwang an Equus Rex cannot be driven to the edge so quickly, so I doubt that even Equus Rex + Cavalier can be beaten by Equus Rex + Cannon from most positions. The Cavalier would usually promote to Queen in time to launch a counter attack (and win easily). A Cannon alone would be powerless to stop such promotion. So statistically the advantage might even be with the player that has the Cavalier. With a piece stronger than Cavalier it would be very easy to prevent being 'cornered'; you would just aim the piece at the square where the attacking Equus Rex could take opposition. If it is not Cannon vs Cannon (which by symmetry should in general be a draw), the Cannon would probably be massacred very easily.


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Jan 5, 2023 07:46 AM UTC in reply to Fergus Duniho from 02:21 AM:

The file labels still seem to be positioned incorrectly.


Grand Cavalier Chess. The decimal version of Cavalier Chess. (10x10, Cells: 100) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Jan 5, 2023 07:39 AM UTC:

There seems to be a conflict between the width derived from the FEN and whatever you import from the preset, which completely messes up the diagrams you posted.


Duck Chess. A Duck that must be moved by both players can block your moves. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
📝H. G. Muller wrote on Tue, Jan 3, 2023 09:54 PM UTC:

I made a first attempt to make the Diagram play this. At the moment it still doesn't know the rule that you cannot leave the Duck where it is, although it effectively enforces that rule on the opponent, because its moving is triggered by moving the Duck.

This simplification makes it possible to treat it similar to Refusal Chess: the search just keeps track of the two best moves (in absence of the Duck), and only uses the score of the best if that is a contact capture (assuming the Duck would block it otherwise). In Refusal Chess you would always ignore the best move, assuming it will be refused. A refinement is that moves that have the same blocking square as the best move cannot become second-best (because then both could be blocked simultaneously). It only considers blocking on the first step of a slide, so it will overlook 'cross blocking' (where the Duck would block two moves going over the same square in different directions, and these happened to be best and second-best).

It will also overlook the possibility of 'reserving' your next move, as this cannot be done when moving the Duck is not mandatory. This will be hard to implement without making it very complex. Only moves with a single blocking square can be reserved, and it only makes sense to reserve a move that would refute the opponent's best reply to your current move. This would be an alternative method of 'disarming' his best move, which can be used when it is not possible to block that move. If it was blockable, so that both methods are available, it would make no difference which method you used, as both would make him fall back on his second best move. Unless the move you reserve refutes that move too. The chances that several moves are refuted by the same (reservable) move are a lot larger than those that you can block several independent moves (i.e moves that are not part of the same slide): you only need a hefty threat (like a check), and most of his moves are out. It must be possible to design a not-too-complex algorithm based on that idea.


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Tue, Jan 3, 2023 06:07 PM UTC in reply to Jörg Knappen from 05:28 PM:

Yep, good enough for me.


Tenjiku Shogi. Fire Demons burn surrounding enemies, Generals capture jumping many pieces. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
📝H. G. Muller wrote on Tue, Jan 3, 2023 04:36 PM UTC in reply to A. M. DeWitt from Sun Jan 1 03:59 PM:

Adam DeWitt wrote on 2023-01-01 UTC

Do you want to update this page to remove the rule that the jumping Generals cannot jump-capture royalty?

Note: My presets for Tenjiku Shogi and Nutty Shogi follow the rules described in their respective Rules pages, so they will not be changed unless you update them.

Well, I don't want to have any discrepancy between what is in Wikipedia and on CVP, so I would then also have to change it in Wikipedia. To not run into an edit battle there, this would have to be done with care.


Betza notation (extended). The powerful XBetza extension to Betza's funny notation.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Mon, Jan 2, 2023 09:49 PM UTC in reply to Daniel Zacharias from 09:34 PM:

It is a consequence of the Betza parser not printing any error messages. In [W?fB] the f and B are conflicting input: f says you should keep moving in the same direction as the W step, while B says you must move diagonally. So it is an invalid specification, with undefined result.

What happens in practice is that the [...] notation is implemented by a pre-processing step that replaces it with the original XBetza notation using the a modifier. It thus uses the first step as the atom, tests whether a range-toggle is required for deciding it should be prefixed with a or ya, and takes the modifiers on the second leg. So [W-fB] becomes yafW, which is what [W-fR] would become too. The B or R are simply ignored (apart from detecting that they are sliding moves, so that the y will be prefixed). The preprocessor is not smart enough to understand directionality of the second-leg atom, nor that non-matching directionality would require addition or removal of an s to get the correct bend. It treats all second-leg atoms like they are K or Q, and you have to supply the s yourself.

Perhaps this can be improved one day.


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Mon, Jan 2, 2023 03:39 PM UTC in reply to Jean-Louis Cazaux from 01:40 PM:

Beside this, how do you do to embedd images of diagrams in your comments? Is there a trick?

Yes, there is a trick, and this is what the discussion is about. Just write a FEN of the position you want to show as part of your text, and surround it by 'tags' [ fen] and [/ fen] (without the internal space, which I just added here to prevent the word 'and' will be interpreted as a FEN of a 3x1 board).

E.g. [ fen]nqkrb/ppppp/5/PPPPP/NQKRB[ /fen] would give you:


Chess on a Really Big Board. Chess on multiple chess boards. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Mon, Jan 2, 2023 01:51 PM UTC in reply to Jean-Louis Cazaux from Sun Jan 1 03:23 PM:

Jean-Louis Cazaux wrote on 2023-01-01 UTC

To HG: Sorry to insist, I had no answer/reaction.

I think that it is not correct to change the name of the pieces of someone else's game, even for an editor.

Here Dog/Jolly Jumper/War Elephant have not been given by Betza.

If you don't want to remove those names in this page, you should at least insert a comment explaining for the readers who has named the pieces as such.

Well, this did not have a high priority, and I have been quite busy.

Although I admit that 'Jolly Jumper' was perhaps over-doing it, some of what you say here is not so obvious. Betza's contributions to the chessvariants community have been immense. But assigning names to pieces was not really his forte. And it is not uncommon at all for CVP editors to object to publication of new submissions because of improper naming of the pieces in their variant.

In the article at hand, Betza gives the move of the pieces, and refers to them by that. He does not give names, nor images. If, for the purpose of making a better diagram, I have to assign images, why not assign names as well. Especially in cases where the pieces with that move are well known, and do have established names. Like FD = Kirin, and NJL = NCZ = Bison.

Referring to the pieces like "FD (Kirin)" doesn't make much sense in the context of the Diagram, as the Betza notation for their move is already in another column of the piece table. I also do not list the Archbishop as "BN (Archbishop)".

So I will probably change the names to Kirin and Bison (is there a commonly used name for KA?), and perhaps add the remark that the diagram calls pieces by their usual names.


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Mon, Jan 2, 2023 01:10 PM UTC in reply to Fergus Duniho from 02:09 AM:

I would prefer that too.

OK, I moved the SVG sets that I created recently to /graphics.dir/svg/magnetic/, /graphics.dir/svg/motif/ and /graphics.dir/svg/utrecht/. The XBoard SVG pieces were in /graphics.dir/svg/xboard/ already. I made an index page with an overview of the Utrecht SVG set.


Duck Chess. A Duck that must be moved by both players can block your moves. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]
📝H. G. Muller wrote on Mon, Jan 2, 2023 10:18 AM UTC:

OK, I created a Duck Chess page. I think it is ready for publication, but even though I am an editor I consider it bad form to publish my own articles. So perhaps another editor could judge it.


Terminology: Names for some square boards, extending decimal and dozenal[Subject Thread] [Add Response]
H. G. Muller wrote on Mon, Jan 2, 2023 06:42 AM UTC in reply to Jörg Knappen from Sun Jan 1 09:41 PM:

Is there a technical limitation that tags should start with a letter? If not, why not just have tags 10x10, 10x8 etc.?


Duck Chess are everywhere, but why not there?[Subject Thread] [Add Response]
H. G. Muller wrote on Mon, Jan 2, 2023 06:11 AM UTC:

I thought about adding a Duck Chess article. I even uploaded a Duck image with the XBoard set. But the Interactive Diagram is not able to play it yet, so I deferred that plan to when I had an idea for how to adapt that.

BTW we have an article about a very similar variant, called Blue Chip Chess.


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Jan 1, 2023 09:54 PM UTC:

Almost all pieces from the 'small' set are now available as SVG, in /graphics.dir/utrechtSVG .

Perhaps we should take the opportunity to better organize the file system? I think it would be better if all SVG pieces resided in a directory /graphics.dir/svg/<setname>/ , rather than just slamming a suffix SVG on the setname. Once the images are in common use it would be too late to do that.


H. G. Muller wrote on Sun, Jan 1, 2023 09:19 PM UTC in reply to Greg Strong from 06:25 PM:

EDIT: I mean one outline around the whole board, not an outline around each square

The problem with an outline is that there could be irregular boards (like Omega Chess). The DD suppots this by interpreting a hyphen as a 'hole', in the color of the rim. But the outline would then not follow the boundary of the playing area. So it would be nicer if the light squares are distinguishable from the background.


H. G. Muller wrote on Sun, Jan 1, 2023 03:18 PM UTC in reply to Fergus Duniho from 01:32 PM:

So, I'm not coming at this from the perspective that comments need different defaults than articles do.

But we should be aware that the technical possibility exists to use different defaults in both cases. And that this might make sense. After all, we also print the comments on different background color as the articles.


About Game Courier. Web-based system for playing many different variants by email or in real-time.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Jan 1, 2023 12:31 PM UTC in reply to Fergus Duniho from 12:37 AM:

One thing I will note is that I no longer recommend editing the $pieces array. This is a bad practice, and I regret coming up with the idea. I now recommend the use of aliases as best practice.

IIRC the possibility of the $pieces array was created because users wanted to combine piece images from different 'sets' (perhaps even standard sets supplemented by images uploaded by themselves to the /membergraphics/ sub-tree). Aliases don't do that for you; they just allow you to rename the pieces in a given set.

It is indeed inconvenient that expanding a set is done by execution of Pre-Game code. But the alternative, asking an editor to create a new set including the desired extension graphics was even more inconvenient.

It would be good if there was a way to assign arbitrary images (i.e. anywhere in the public_html subtree) to to piece labels without invoking GAME code. Just like you can specify a FEN for a preset, and the corresponding position will already be displayed on the preset's page even before you start running the preset.


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Jan 1, 2023 09:21 AM UTC in reply to Greg Strong from 12:58 AM:

So any posting of new default color schemes is completely inappropriate without first establishing a DEFINITION OF PROBLEM to be solved and a PROCESS for how changes are to be submitted and results are to be measured.

Well, since it seems that I am the one who raised this issue, let me formulate a formal definition of the problem:

I think the yellow/green/blue board colors that are the defaults of the Diagram Designer, although excellently suited for the main diagram in an article, are are to 'loud' for embedded diagrams in a comment (for which my imagined use case would be mainly to illustrate issues in specific positions). With this I mean they would attract more visual attention than they deserve, and thus would become a distraction.

Since we are creating a new feature here for general use, it seemed wise to give its design some serious thought rather than just slamming something together that happened to work. Color schemes were one of the aspects I identified as possible target for optimization. Note that in the context of the 'instant diagram' people are much less likely to customize it than when they use the DD through the design interface in its article, so defaults become a more important issue.

I would prefer somewhat softer colors for the board.

BTW, I consider the khaki/smoke theme presented in Fergus' latest posting excellent.

As to the process: it seems to me this is well under way. Everything said so far has been only a proposal, and all editors that have an opinion on this matter can chime in. I can add that w.r.t. other proposals I have made for improvement of this website, there has been disappointingly little interest from other editors in those.

I will anticipate the response: these changes are forward-only changes and have no effect on the existing content.  Ok, while there is truth to that, the argument is insufficient.  The only reason this forum has any value, (the only reason people are reading it), is because of the established content.  And it only continues because a community drives it forwards.  Almost no one would be here if it wasn't for our foundation.  We stand on the shoulders of giants.

I am not sure what point you are trying to make. Why would creating new features diminish the value of this website? Why would the fact that designing it in a certain way would be the best way to do it be an 'insufficient argument'? I would say it is the only argument.


H. G. Muller wrote on Sun, Jan 1, 2023 12:20 AM UTC in reply to Greg Strong from Sat Dec 31 2022 11:32 PM:

I think those colors are too loud. I would like colors with a somewhat lower saturation, so that the embedded diagrams don't draw all the attention.


H. G. Muller wrote on Fri, Dec 30, 2022 10:13 PM UTC in reply to H. G. Muller from Thu Dec 29 09:03 PM:

Some more 'small' SVG:



H. G. Muller wrote on Fri, Dec 30, 2022 06:43 PM UTC in reply to Greg Strong from 03:38 PM:

I'm sorry, I don't like that one at all.  I think it's too dark and I consider it quite unattractive.

I still don't see what was wrong with the square colors used by Zied's Board Painter. These are quite light:

The first one proposed by Fergus also seemed to have good contrast:


H. G. Muller wrote on Fri, Dec 30, 2022 02:38 PM UTC in reply to Fergus Duniho from 01:57 PM:

I see a Mammoth in addition to an Elephant, but I don't see any alternative Camels. What is the alternative Camel called?

I meant in the old GIF pieces (Auto All Alfaerie). That has a camel2 and an elephant2. The Mammoth, Scorpion, Sabretooth and Owl were added by me to the SVG set, and do not exist as GIF images.


H. G. Muller wrote on Fri, Dec 30, 2022 10:14 AM UTC in reply to Jean-Louis Cazaux from 06:51 AM:

Jean-Louis Cazaux wrote on 2022-12-30 UTC

I don't know where you see the default as Alfaerie-SVG. What I see on this page when I open it is the Set as Abstract 1: Compound & Misc.

I suppose that what Fergus meant is that the use of this set is default in diagrams embedded in comments through use of the fen tag. The Diagram Designer itself cannot change its default set, because this would break all diagrams on the website that rely on the current default (and are using piece names that are only known in that set, or which might mean something different in the new default set).


H. G. Muller wrote on Fri, Dec 30, 2022 09:40 AM UTC in reply to Fergus Duniho from Thu Dec 29 11:59 PM:

While this set should have as many pieces as alfaeriePNG35, alfaerie-many has more than both, as several alfaerie pieces have not been converted to SVG yet.

This should be viewed as a temporary situation. In the process of putting Interactive Diagrams in existing articles, I create new SVG (and corresponding PNG and PNG35) when these use alfaerie-many pieces that had not been converted yet.

I can add that many images in the alfaerie-many set are duplicats or transforms (i.e. rotated or recolored pieces). The latter we don't really need; the DD already supports recoloring SVG, and it could be made to support general rotation of SVG pieces as well. In the CGI rendering engine I did this through allowing > and < characters in the FEN for indicating rotation of the preceding piece. In the alfaerie-many set the rotated pieces have ma,es that end in <number> pluc 'cw' or 'ccw' (for clockwise and counter-clockwise, respectively, the number indicating the rotation angle in degrees). The DD could recognize these character combinations as suffixes, and apply the requested rotation. So that, say, {frog180cw} would give you an upside-down black Frog. The suffix 'rev' is generally used for indicating a horizontally flipped piece. (Unfortunately for piece names that ended in a number, because these were duplicats, the number is again appended to the suffix, so a flipped camel2 is camelrev2 rather than camel2rev.)

As to the duplicats: there are alternative Camels and Elephants. I cannot imagine why a piece theme would need duplicats; I do not consider those Alfaerie pieces. When you start to represent the same pieces by other glyphs you are in fact making another font.

These mostly use letters and sometimes + signs for promoted pieces or numbers.

Because the + prefix is a well-established convention in Shogi, it might be a good idea to allow such prefixes to appear in FEN without the need for enclosing braces. (WinBoard does this, for instance.) So a + would automatically be grouped with the single letter that follows it.


Chess on a Really Big Board. Chess on multiple chess boards. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Fri, Dec 30, 2022 09:10 AM UTC:

Betza's Nine-Board Chess:

Indeed, automatic scaling works! So it seems we now have a trouble-free 'instant diagrams' feature.

BTW, I could not find a 2-letter code for the Nightrider. (Which I only use here as a substitute for the Rose, which is a circular Nightrider, but for which we don't have an image yet.)

For the contrast between blue and green, I noticed that it depends very much on the viewing angle on my display: near the bottom the blue is lighter and the greed darker, and it looks pretty good. At the top, however, their brightness gets similar. If any changes are needed, perhaps the green should be made a little brighter (perserving hue, i.e. multiplying R, G and B by the same factor).


H. G. Muller wrote on Fri, Dec 30, 2022 08:45 AM UTC in reply to Jean-Louis Cazaux from Thu Dec 29 10:08 PM:

Jean-Louis Cazaux wrote on 2022-12-29 UTC

The text on this page says: "here is an ugly ASCII diagram of the setup" And what follows is an Interactive Diagram probably made by HGM!

The text could be corrected.

The project of inserting IDs also keeps the original text and (possibly ASCII) diagram, within <noscript> tags, for the benefit of users that have JavaScript switched off in their browser (so they would not be able to see the ID). In this case I overlooked that there was some text that was still on the wrong side of that noscript tag. I moved it now.

The text of this article in fact needs many corrections. For one, the brackets in the extension of the 'funny notation' he proposes show up as A instead (qAWFAqAFWA where he means to say q[WF]q[FW]). In fact he acknowledges himself that the part about notation does not belong in this article, and that he will move it away at some point. I guess he never got to do that.

Another issue is that this article doesn't describe a single variant, but gives several initial positions on boards of several sizes, which could each use an ID. For the moment I just picked the one I considered most interesting (i.e. the one involving unorthodox pieces).

And yes, I am guilty w.r.t. some of the piece names. Betza did not assign names, but for the purpose of the ASCII diagrams he did assign letters to the pieces: D for FD, J for NCZ, W for KA. So I just picked some names that matched those letters and for which I had suitable images. The NCZ is actually in the Piececlopedia under the name Buffalo, but the page about it was by Charles Gilman, and he seems to live in a parallel universe w.r.t. piece naming.


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Dec 29, 2022 09:03 PM UTC:

I started working on the 'small' set:



H. G. Muller wrote on Thu, Dec 29, 2022 06:59 PM UTC in reply to Fergus Duniho from 06:50 PM:

Something strange is happening: 6 comments ago (in the DD topic) I posted an 8x8 diagram, and as I recall it that looked OK. But now the coordinates run a-l, like there are 12 files (but files i-l stay empty), and the lowest rank with pieces is entirely missing.


H. G. Muller wrote on Thu, Dec 29, 2022 06:10 PM UTC in reply to Fergus Duniho from 05:51 PM:

I do like the third. The pale green contrasts well with both red and blue:


H. G. Muller wrote on Thu, Dec 29, 2022 09:59 AM UTC in reply to Fergus Duniho from Tue Dec 27 02:22 AM:

With that in mind, I think it would be good to have SVG images of other piece sets.

I also found SVGs in the XBoard themes collection for the orthodox pieces in Motif. The unorthodox Magnetic pieces seem to be mostly cut & paste jobs of the orthodox pieces, and should be easy to create that way from the orthodox SVG. I will have a go at it.

[Edit] OK, this is done. The original Magnetic set actually has two kind of pieces: outline and solid. As is usual for XBoard with its native pieces too, the solid pieces are used for black there. But it seems we only use the outline pieces on CVP, and just color those differently depending on whether they are used for white or black. So I did not bother to create unorthodox solid piece.

The entire set is now in /graphics.dir/magneticSVG.

[Edit 2] I now also did Motif. They are in /graphics.dir/motifSVG.


Diagram Editor with scalable graphics. An easy-to-use tool for drawing boards and pieces of any size and color.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Thu, Dec 29, 2022 08:54 AM UTC:

@Fergus - In case you missed the last edit of my previous comment:

Can you have a look at this ScriptAlias issue?


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Dec 29, 2022 08:39 AM UTC in reply to Fergus Duniho from 01:03 AM:

You can also include extra parameters after the fen code, just as you would in a query string, because it's just going to plug your FEN code into a query string.

A smart and convenient trick. This means we really don't need the 'cols' and 'set' shortcodes. The latter doesn't seem to be working anyway.

The purpose, however, is to make it as easy as possible for a noob user, who doesn't know the ins and outs of the Diagram Designer, and probably doesn't even know it exists. We cannot expect such users to know the 'cols' keyword, or query-string syntax, the 'set' keyword or the names of the available sets, etc. So it is important that we invoke the Diagram Designer with the most useful default values. To which we then append &code= plus the string between the fen tags. This would still allow 'power users' to overrule the defaults by adding parameters at the end of the FEN in query-string syntax, as in case of duplicat specification of a key, the one encountered latest will prevail.

set - I think auto-alfaeriePNG35 would be the best default here, (or an equivalent overly large set forced to display at reduced size) because:

  • It has the largest number of pieces.
  • It is small, allowing representation of large boards without problems.
  • Orthodox pieces use their conventional icons, which each chess player will recognize.
  • Pieces can be indicated by {name}. Apart from the orthodox pieces there are no universal single-letter abbreviations for chess pieces, and the alphabet is not large enough anyway, so non-obvious abbreviations would be more the rule than the exception. Users would know that they wanted a camel, giraffe or rhino, but even if these had letters assigned to them, these would not be C (cannon), G (griffon) or R (rook), and the users would be clueless as to what letter to use.
  • For compactness the orthodox pieces and most-common fairies (Archbishop, Cannon, Elephant, Griffon, Marshall) can also be indicated with a single letter.

cols - This still should be automated. I propose to treat a setting cols=10000 (or some other large value that can never be used in practice) on the Diagram Designer as a special value, which would derive the true value from the length of the first row of the FEN in the code parameter. This would not interfere with the normal processing during the first row because it will be large enough to never make the board 'wrap' to the next rank automatically. And when the first slash is encountered, before padding the rank with 'holes', it can set $cols to the current length of the rank if it was 10000, and then proceed as normal. The fen shortcode can then invoke the DD with the parameter cols=10000.

colors - This is more a matter of taste, but I feel that the default colors are a bit 'loud' for embedded diagrams that only serve as illustration for what is explained in the surrounding text. I would prefer 'softer'colors (with a somewhat lower saturation), and a less prominant board margin, like

Other proposals are of course welcome.


H. G. Muller wrote on Wed, Dec 28, 2022 08:17 PM UTC in reply to Fergus Duniho from Tue Dec 27 10:41 PM:

It has always annoyed me that there is no quick and easy way to include a simple diagram in comments, as other Chess forums typically have. You would either have to upload something, or go to the Diagram Designer page to create a HTML image tag, and copy-paste that into your comment after switching it to source code (or know enough to isolate the URL from the IMG tag, and use that in the image-insertion dialog of the CkEditor in WYSIWIG mode). On Talkchess.com I only have to type a FEN of the position in the text of a posting, and sandwich it between [ fen][ /fen] tags.

It would be rather easy to also provide such a facility here. Just let the listcomment.php script recognize the [ fen] tags in the text of the comment, and replace it by an IMG tag referring to a FEN-to-diagram script, passing the latter the enclosed FEN as an argument. During storage in the database, or when editing, the position would retain its text form, so this doesn't interfere with anything.

I have made an adapted version of the listcomment.php script (just adding two lines to the latter) that invokes the Diagram Designer for inserting the image. When you would view this page with comments through that modified script (by replacing 'list' by 'hgm' in the address bar of the browser) the following line would show up as a diagram:

The current version of the Diagram Designer is not really ideal for this, as it is not able to derive the board width from the FEN, but needs a separate parameter for that (as a test further down the comment page shows). It also omits the last rank of the FEN when it is not complete. (The latter seems a bug, as it has no problem completing other ranks if it thinks these are too short?)


Diagram Editor with scalable graphics. An easy-to-use tool for drawing boards and pieces of any size and color.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Wed, Dec 28, 2022 06:12 PM UTC in reply to Fergus Duniho from 05:30 PM:

There must be something in the Apache .conf file that blocks access to this directory. I have no experience with the Apache server (on winboard.nl I use lighttpd), but some googling suggests this file should be called apache2.conf. I could not find it using an ssh connection, so I guess it is in a part of the file system that is not accessible to 'chessvariants' (/etc/webmin/apache/ ?).

Not that it is particularly important to place fen2.cgi in that folder. It would be fine anywhere, as long as CGI files are executed by the server there. This probably also requires some changes in the Apache config file, as by default CGI (or PHP for that matter) is switched off.

[Edit] Could also be /etc/httpd/conf/httpd.conf .

[Edit2] I see you already tried that...

[Edit3] There is a line

    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

in the httpd.conf. Could this be the problem? Perhaps the /var/www should also be changed to /home/chessvariants/public_html here? Or perhaps safer: the /var/www/cgi-bin directory could be made writable for user 'chessvariants', so we can all put files like fen2.cgi there, without running the risk to enabe all kinds of stuff that we no longer know what it does.


💡📝H. G. Muller wrote on Wed, Dec 28, 2022 08:35 AM UTC in reply to Fergus Duniho from Tue Dec 27 09:36 PM:

Fergus Duniho wrote on 2022-12-27 UTC

Okay, I installed gcc and cairo-devel.

Thanks! I still run into a problem when I try to compile the C renderer: at

#include <librsvg-2.0/librsvg/rsvg.h>

it complains that the file cannot be found. Indeed there doesn't appear to be any librsvg sub-directory in /usr/include. While the binary run-time library librsvg.so is present in /usr/lib64. I did not run into this problem in my own installation of Rocky Linux.

Is there some additional rsvg package that we are still missing? (Like rsvg-devel?)

[Edit] The include files for gdk-pixbuf-2.0 were similarly missing. I was able to work around it by copying the /usr/include/librsvg-2.0 and /usr/include/gdk-pixbuf-2.0 subtrees from my own installation of Rocky Linux 8 to the folder where I compile (/home/chessvariants/hgm), and adapt the compilation command to look for the include files there. This still led to an error message from the linker, which was not able to find the rsvg-2 run-time library. It appears to be called librsvg-2.so.2 here, and the command probably choked on the final .2. Mentioning the library pathname explicitly, rather than using the -lrsvg-2 compiler flag, solved that problem, and finally gave me a binary. I don't understand how the system here can be so different from the installation I have on my PC.

There still is a problem left. I tried the binary in /index/fen2.cgi, but when I try to invoke it there from the web it just download the binary. So apparently it does not recognize the .cgi extension as special. Then I tried it in /cgi-bin, where I would expect CGI files to work. But it appears that files there are not accessible from the web at all (not even text files like piclist.txt). So it seems the server is somehow configured to block access to the cgi-bin directory. (Even though there are many files there, including PHP and CGI files.)


💡📝H. G. Muller wrote on Tue, Dec 27, 2022 06:45 PM UTC:

The CkEditor deletes iframes in WYSIWYG mode, so these are not an option for embedding diagrams.

I am now trying to compile the renderer for the Editor with Scalable Graphics on ftp.chessvariants.com using ssh. But it looks like we don't even have a C compiler there ('gcc' as well as 'cc' evoke a "command not found" response).

So Fergus, could you install a C compiler, and the cairo-devel package (a graphics library)?


Submission Test. Members-Only Queens, Rooks, Knights and Bishops change identity every move. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Mon, Dec 26, 2022 05:25 PM UTC:

Could be just a matter of rounding. To the eye the 'non-original' colors that are left look indistinguishable from the original square colors.


Betza notation (extended). The powerful XBetza extension to Betza's funny notation.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Mon, Dec 26, 2022 11:48 AM UTC in reply to Jean-Louis Cazaux from 11:04 AM:

The convention is that X extends the longest dimension of the preceding atom. So NX makes (5,1) from (2,1), not (2,4).


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Mon, Dec 26, 2022 07:42 AM UTC:

And yes, I would call a word processor that gives me boldface when I ask for normal, or proportional spacing when I ask for fixed spacing sabotaged. Such tools should do as the user asks, not as their author pleases.

By rendering on grey you will replace the transparent part of a pixel that was only partly covered by the object gray. While for rendering on a light (say white) square it should have become white. So the pixel gets darker, creating the illusion that the blackness of the object covered a larger fraction of the pixel, and thus that its boundary moved outward. But it doesn't move outward where the boundary happend to coincide with a pixel boundary, and the adjacent pixel will just be pure gray, later converted to transparancy. This is what makes the percieved biundary ragged.

And white / black / grey even is a favorable example; when colors are involved you also get hue differences.


H. G. Muller wrote on Mon, Dec 26, 2022 07:07 AM UTC:

Depends on how much you zoom in. At 100% they look identical (as they should; this is what anti-aliasing by definition does: reduce away the excess resolution that is not representable on the pixel lattice). At 500% (the max of my tablet) the first two look blurred, the third still looks crisp.

The difference is when the anti-aliasing is done: when it is done server side to get 50x50, the info needed to get good 200x200 is not available in the browser. So zooming in makes the image vague. If you leave the anti-aliasing to the browser, the zoomed image still looks good. (But it is the same process, so if you ask for the same resolution it gives the same result.) Because the higher spatial frequency components were sent to it, even when not needed or usable at 100%. But is will start to use them when the zoom factor requires it.


Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Dec 25, 2022 08:32 PM UTC in reply to Fergus Duniho from 08:24 PM:

Does the showpiece.php say in the header that the Content-Type is image/svg, rather than image/png?


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Dec 25, 2022 06:10 PM UTC in reply to Fergus Duniho from 05:19 PM:

The Diagram Designer creates a single graphic image. It does not use tables or CSS to place image files on top of another image. So, there is no way to use height and width of IMG tags to adjust the size of SVG piece images in the diagram it produces.

Sure there is. You should just render the entire image twice (or 5 times) the size you want it, and use the width and height attributes on its image tags to scale it back to the size that was requested. Some comments down I posted a whole-board image generated with the Editor for scalable Diagrams that used that technique. Let me post it again:


H. G. Muller wrote on Sun, Dec 25, 2022 05:58 PM UTC:

There are two independent issues here. One is a matter of taste. Some people like thin borders, other people like fat borders. Those who designed Alfaerie preferred to have borders as they are when the AlfaeriePNG set is rendered the normal way. Those who don't like that should design their own piece set. Not sabotage the use of the original piece designs to alter those to their taste. Just render the SVG with thicker lines and standard anti-aliasing, call it AlfacentauriPNG, and people to which it appeals might even use it.

The second issue is that converting transparent pieces at the boundary to darker ones to create the illusion of fatter borders is a very inferior method, which leads to ugly results. E.g. if you have a boundary that runs nearly vertical, there will be places where it coincides with a pixel boundary, so that there will be no adjacent half-transparent pixels, just a fully opaque one next to a fully transparent one, and the method adds nothing. In other places the border will cut a pixel in two, and make it half transparent, half black. By converting the transparency to black, you push the percieved boundary out there. So the line gets wobbly. If you want to push the boundary out, just move it out half a pixel before rendering, and render it anti-aliasing in the standard way. Which is the way designed to make the line appear as straight as possible.


ChessVA computer program
. Program for playing numerous Chess variants against your PC.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Dec 25, 2022 04:40 PM UTC in reply to Greg Strong from 03:09 PM:

But it should become easier to find cut moves when the evaluation is constant. If all leaves would be evaluated as 0, the first random sequence of moves will be the PV, and every move you randomly pick in a cut node would immediately be a cut move.


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Dec 25, 2022 11:20 AM UTC:

And if you make all board squares black, you would have the ultimate solid borders, which extend all the way to the square edge.

But if you want more solid outlines than a piece was designed to have, it would be better to make the stroke width an adjustable parameter of the Diagram Designer, just like the fill color. This is trivial to do, by doing a text replacement while the image is still SVG, before rendering it.


ChessVA computer program
. Program for playing numerous Chess variants against your PC.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Dec 25, 2022 07:20 AM UTC in reply to Greg Strong from 01:48 AM:

What is the problem with a high branching factor? You can search less deep in a given time, of course, but that also holds for any opponent.

With alpha-beta the EBF only grows as the square root of the typical number of moves. So even if the latter is 6 times higher, the EBF would only go up by a factor 2.5.


Alfaerie SVG Piece Graphics. The Alfaerie set of piece graphics in scalable SVG format.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sat, Dec 24, 2022 08:26 PM UTC in reply to Greg Strong from 08:09 PM:

The images in Jean-Louis last comment do not show up for me on an Android tablet using the Samsung browser. But when I paste their URL directly in the address bar I can see them. It could have to do with the fact that they are on a http site, while CVP is https. Depending on browser security settings links to http on a https page might not be valid.

Anyway, what is seen on Safari is very strange indeed. The Knight part is totally blurred.


Submission Test. Members-Only Queens, Rooks, Knights and Bishops change identity every move. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Alfaerie SVG Piece Graphics. The Alfaerie set of piece graphics in scalable SVG format.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Fri, Dec 23, 2022 08:48 PM UTC in reply to Greg Strong from 08:33 PM:

To me it looks OK. Some of the horizontal Rook lines are antialiased in a bit of an unfortunate way (so that a gray edge results), but if you squint so that you cannot resolve individual pixels this disappears (as it should).


Submission Test. Members-Only Queens, Rooks, Knights and Bishops change identity every move. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Symmetric Chess. (Updated!) Variant with two Queens flanking the King and Bishops Conversion Rule. (9x8, Cells: 72) [All Comments] [Add Comment or Rating]
H. G. Muller wrote on Fri, Dec 23, 2022 07:03 PM UTC in reply to Greg Strong from 06:39 PM:

Well, having board other than 8x8, or piece IDs A or C, is also not compatible with the FEN spec. One has to do some amount of generalization to make it useful for variants. The 'castling field' in fact already is a field that indicates virginity of pieces. But only of those for which it matters, because under orthodox rules only castling is affected by virginity. (One could argue about Pawns, but the double-push is usually explained as a location-depended move rather than an initial one, as evidenced by the rules of Crazyhouse/Bughouse.)

I think it would be bad to have two fields that basically serve the same purpose. In Shredder-FEN notation the letters in this field already identify the piece, so there is no need to make separate fields for Kings+Rooks, Knights, Bishops and Queens. It seems much better to have a unified virginity field.

Likewise, the the e.p. field indicates the last-moved piece, in positions where that matters. So it would be logical to use it for any other type of last-moved piece as well.

I agree that leaving in the right of a non-existing piece is perhaps a bit contrived. But how about the other option: indicating an undetermined right by X? Then you would not have to look at the board. An X in the field means both Bishops are virgin and can convert. One gets captured without moving: the X remains, to indicate all remaining Bishops still have choice. If one moves, the rights disappear altogether when it converts, and change to indicate the file of the Bishop that now must convert.

If you have both converting Camels and Bishops, just use X for the Bishops and Y for the Camels. (Or more generally, adopt the convention that X indicates the outer-most piece type, working your way inwards when stepping through the alphabet.)


Submission Test. Members-Only Queens, Rooks, Knights and Bishops change identity every move. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Betza notation (extended). The powerful XBetza extension to Betza's funny notation.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, Dec 23, 2022 05:11 PM UTC in reply to A. M. DeWitt from 04:46 PM:

... the fact that the rankings could refer to friendly pieces is a rather dubious piece of evidence for allowing jump-captures of royals.

The point is that it makes no sense at all to make a rule that forbids jumping over an enemy King, while allowing its capture. For this reason I always considered the fact that the King was mentioned in the general's ranking as evidence that it must be there for forbidding its capture. (Even though this caused a very nasty inconsistency in the rules, as capture of generals of equal or higher rank are allowed.) This reasoning was flawed, however: the rule could also have been added for preventing generals to jump over their own King. That it would at the same time forbid jumping over the enemy King would not be relevant, as no one in his right mind would want to do that anyway.

The evidence in favor of allowing capture is that the King appears in the ranking without further comment, suggesting it is treated as its rank would suggest, but not special otherwise. The evidence to the contrary now seems to have evaporated. The weakness you mention can in fact be trivially defended; no AI is necessary to to find that, and the 'quick attack' was standard theory from the very beginning. Its main line doesn't provide a very large advantage, though, as it doesn't win in just a few moves, and when sente runs out of steam, gote can mirror its play for a counter attack. This also has been known from the early days.

The smothered mate indeed is the main theme of all openings. It is the only way in which the jumping generals can combat a Fire Demon, and makes Demon sacrifices for 2 or 3 generals (including the GG) playable: in the end the side with the generals can force the opponent to give the Demon back. Otherwise the value of a Demon is close to infinity. It is really a very interesting game that way, and certainly doesn't fuel any reasoning of the kind "they cannot have intended this".


Submission Test. Members-Only Queens, Rooks, Knights and Bishops change identity every move. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Betza notation (extended). The powerful XBetza extension to Betza's funny notation.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, Dec 23, 2022 07:16 AM UTC in reply to A. M. DeWitt from 03:37 AM:

Unfortunately this is not so easy, because BadZone only gets the locust squares passed. Not the pieces jumped over. The non-destructive intermediate squares are not part of the internal move representation. But I suppose BadZone could be made such that it scans the board for high-rank blockers along the path from origin to destination itself.

BTW, I have played Tenjiku at high level according to 'modern' rules, where the King can be jump-captured. To my surprise this was very playable, and not too unbalanced. If you know the correct opening lines. Which my Tenjiku engine was able to determine.

In addition I came to realize that the King has highest rank does not necessarily have to refer to capture. Originally I thought that outlawing jumping over a King only would be pointless, as you would never be interested in doing that when you could also capture it. But it could also refer to your own King. So the evidence that historic rules did not allow King capture is starting to get flimsy.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Thu, Dec 22, 2022 09:25 PM UTC in reply to A. M. DeWitt from 08:23 PM:

Thankfully, this problem can easily be solved by writing the missing legs separately, yielding B(cpaf)2cBcafpafcBpafcafcB.

Ah, OK. This is what I vaguely remembered when I mentioned that combining destructive and non-destructive modes might cause problems. The Betza parser therefore separates those. But since this was written at the time only a single locust square could appear in the move encoding, it doesn't do a very elaborate job at it. The AI's move generator could perform this separation while generating; after every leg it calls itself recursively, for the remaining legs, and it could just call itself two times: once with and once without locust square. (It might not do that, though, because there was no need, as the parser already ensured that the combination would never occur.)

I will have a look at this; it must be possible to suppress the separation by the parser when NewClick is being used, and make the AI's move generator do it in that case. Up to then you indeed would have to do the separation yourself. Or at least part of it, keeping in mind that the parser only separates one of the legs. So you could write mpcafcafcBmpcafpafcB to specify all 4 combinations.

And no, paf should not be equivalent to mpaf in any case. paf must hop, mpaf is completely ignoring the square, 'seemlessly' gluing the legs into a longer leap. mpaf should not be used on slides: logically mpafB would mean mafBpafB, where the first term is the exploding version of B (a 'degenerate hook mover'), and pafB what Betza originally wrote as pB. So BpB would be the recommended notation.


Diagram Editor with scalable graphics. An easy-to-use tool for drawing boards and pieces of any size and color.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Thu, Dec 22, 2022 08:40 PM UTC in reply to H. G. Muller from Wed Oct 5 06:18 PM:

@Fergus: Would it be a good idea to rewrite the SVG renderer (which now is a compiled C program) as a PHP script that invokes the Linux command rsvg to render the SVG piece at the requested size and possibly the requested color (all specified in the PHP arguments), and relay the output to the client? If rendering a FEN rather than a piece is requested it could return a HTML table with in each cell a URL to itself with the proper arguments to display the piece there.


Submission Test. Members-Only Queens, Rooks, Knights and Bishops change identity every move. (8x8, Cells: 64) [All Comments] [Add Comment or Rating]

Since this comment is for a page that has not been published yet, you must be signed in to read it.

Alfaerie SVG Piece Graphics. The Alfaerie set of piece graphics in scalable SVG format.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Thu, Dec 22, 2022 04:40 PM UTC:

@Greg: I believe you had a script for rendering the entire set of SVG pieces as PNG. Would it be an idea to run that at size, say, 250x250, to create a zoom-friendly piece set in an alfaeriePNG250 directory?

(Note that I added some pieces: mastodon, sabretooth, bat, scorpion, owl, plane, thief, general, 3 orientations of spearmen, sissa and diplomat.)


100 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.