Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Ratings & Comments

LatestLater Reverse Order EarlierEarliest
Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
Aurelian Florea wrote on Mon, Feb 6, 2023 12:00 AM UTC in reply to Kevin Pacey from Sun Feb 5 07:49 PM:

I have not looked there in a while! Why do you ask?


Kevin Pacey wrote on Sun, Feb 5, 2023 07:49 PM UTC in reply to Aurelian Florea from 11:44 AM:

@ Aurelian

Off-Topic, a quick question:

Have you looked at the following link in the past (hopefully extensively) when searching for CVs to play on Game Courier at some point in time? - I'm thinking if I have preset(s) out there, one day, that haven't been published, maybe, hopefully, there's at least a small chance people might find them by using this link (if not my personal Settings files link). That's since I have a large backlog of ideas for CVs that might take ages to publish:

https://www.chessvariants.com/play/pbm/listgames.php


💡📝H. G. Muller wrote on Sun, Feb 5, 2023 06:43 PM UTC in reply to A. M. DeWitt from 03:46 PM:

There is something wrong with the diagram for Desert Pub Chess.

This is fixed now. (Flush browser cache!) I had already fixed a similar bug in the betzaNew.js. Actually it was two bugs. One that it used the last square in the move array as the center of a burn, while the destination is always the second square. This only manifests itself on moves with locust squares.

The more subtle bug is why it would think it has to burn here at all. This was because the 512 bit in the promotion code that is used to request burning is used in the on-board pieces to indicate the piece is non-virgin. At some point the 512 bit in a promotion code has to be translated into extra locust squares, and normal promotions have to get ther 512 bit set to prevent they have their initial moves. This is done just before execution of the move, in the routine that calculates the score gained by the move. The problem was that the moves obtained from the AI have already been performed once, during the search. While for moves entered by clicking this still have to be done after the move is selected. The result was that moves from the AI were scored twice. So that a normal promotion got its 512 bit set the first time, and the second time than made it into a burn. And the Pawns appeared because some of the burn squares were actually empty, which for locust squares is interpreted as an unload of teh captured piece...


Variants playable against the diagram's AI. Index of variants that can be played against the interactive diagram.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Feb 5, 2023 05:04 PM UTC:

(Same as old page, but with the hyphen removed)


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Feb 5, 2023 03:46 PM UTC:

There is something wrong with the diagram for Desert Pub Chess. When the AI moves, it seems to spuriously remove pieces from the board in unpredictable ways. Furthermore, this bug also affects the desert pieces, causing them to not capture properly when they capture more than once.

Normal Move Bug Replication

Move each pawn forward one at a time, you should see the opponent's pawns add locust squares (the dull red highlights) when moving. Eventually the AI will make a Knight move that removes a friendly pawn. 

Desert Piece Bug

Make the following moves manually:

1. e2e4 f2g4 2. Fc8d5

Then open the AI dashboard and move a white piece. You will see some very strange behavior (only one white pawn gets captured and the other is "moved" to a different square).


Aurelian Florea wrote on Sun, Feb 5, 2023 11:44 AM UTC:

There are times I think you are a magician, HG!


💡📝H. G. Muller wrote on Sun, Feb 5, 2023 11:37 AM UTC:

An Interactive Diagram using the new scripting interface is now available in the alternative script betzaNew.js. (Which, after sufficient testing, will replace the current betza.js). As a test case I used it to create the Ultima Diagram in the previous posting.

Ultima required a fair amount of scripting. Only the Long Leaper and the Withdrawer can be done purely with XBetza. The Immobilizer can be done with the aid of the new trackPieces=N and curse=freeze parameters. Pinching is a kind of burning, but since it is dependent on the burn victim being sandwiched, this has to be tested in a script before a 'selective burn' promotion can be issued. Coordinator capture needs to be performed entirely by the custom script (using the coordinates of the tracked King), by adding locust squares to Coordinator moves.

The Chameleon is of course a disaster; it needs to be able to do what all other pieces do, but in a type-selective way. Only the replacement capture can be implemented in XBetza, as kK, because the King happens to be royal. The other captures that can be described with XBetza need to be vetted for whether they capture the correct victim. I only did that for Long Leapers, and add capture of a Withdrawer as an extra locust square 'by hand'. The standard script now supplies the routine AddVictim(move, file, rank, mask, target) to facilitate that; the mask and target arguments are optional, and when omitted the square (file, rank) is only added if it contains an enemy piece. By setting mask = 0x4FF you can test for a specific colored piece type (the test is (board[rank][file] & mask) == target), and other pieces would not be affected.

The curse=freeze option would only freeze enemy neighbors of an Immobilizer, not the Immoblizer itself (of course). But if a Chameleon is frozen, it reciprocates the favor. So the custom script has to test the board for adjacent enemy Chameleons, and mark the Immobilizer square as freezing too when any are found. Al in all this gave me the following custom script:

  var myNodes = 1e8;
  function ultimaTinker(m) {
    var s, p, v, k, x, y, xx, yy, type = m[-6] & 511, col = m[-6] & 1024; // mover and its color
    if(nodes != myNodes) { // new node; update burn map first
      myNodes = nodes;
      var q = loc[col+6], x = q & 7, y = q >> 7;       // friendly immobilizer?
      if(q >= 0 && (board[y][x] & 0x4FF) == col + 6) { // yes!
        var l = (x ? x-1 : 0), r = (x == 7 ? 7 : x+1); // left and right boundary of surrounding
        for(var i=l; i<=r; i++) { // detect enemy chameleons next to it
          if((board[y][i] & 0x4FF) == 1029 - col) neighbor[q] = nodes;            // on same rank
          if(y && (board[y-1][i] & 0x4FF) == 1029 - col) neighbor[q] = nodes;     // on next-lower rank
          if(y < 7 && (board[y+1][i] & 0x4FF) == 1029 - col) neighbor[q] = nodes; // on next-higher rank
        }
      }
      if(neighbor[q] == nodes && type == 6) { freeze = 100; return 1; } // the current move should have been frozen
   }
   if(type == 1) {        // pincher moved
     var p = 0, x = m[2], y = m[3], xcol = 1024 - col; // destination and enemy color
     if(x > 1 && (board[y][x-1] - 1 & 0xC00) == xcol && (board[y][x-2] - 1 & 0xC00) == col) p |= 0x40; // W
     if(x < 6 && (board[y][x+1] - 1 & 0xC00) == xcol && (board[y][x+2] - 1 & 0xC00) == col) p |= 0x04; // E
     if(y > 1 && (board[y-1][x] - 1 & 0xC00) == xcol && (board[y-2][x] - 1 & 0xC00) == col) p |= 0x10; // S
     if(y < 6 && (board[y+1][x] - 1 & 0xC00) == xcol && (board[y+2][x] - 1 & 0xC00) == col) p |= 0x01; // N
     if(p) m[-1] = p | 512; // request a selective burn through the promotion code
   } else if(type == 5) { // chameleon moved
     // long-leaper victims
     for(k=2; k<m[-2]; k++) { // at this stage all locust squares are long-leap captures
       v = board[m[2*k+1]][m[2*k]];
       if((v & 0x4FF) != 1027 - col) return 1; // victim not long leaper; reject this move
     }
     // withdrawer victims
     x = m[0] - m[2]; y = m[1] - m[3];         // calculate unit step (should really be table lookup...)
     k = (x ? x : y); if(k < 0) k = -k;
     xx = x/k + m[0]; yy = y/k + m[1];
     if(!((xx | yy) & 8)) AddVictim(m, xx, yy, 0x4FF, 1026 - col); // add withdrawer victim if on board
     // pincher victims
     if(!(x & y)) { // only on orthogonal moves
       p = 0, x = m[2], y = m[3], xcol = 1024 - col;
       if(x > 1 && (board[y][x-1] - 1 & 0x4FF) == xcol && (board[y][x-2] - 1 & 0xC00) == col) p |= 0x40; // W
       if(x < 6 && (board[y][x+1] - 1 & 0x4FF) == xcol && (board[y][x+2] - 1 & 0xC00) == col) p |= 0x04; // E
       if(y > 1 && (board[y-1][x] - 1 & 0x4FF) == xcol && (board[y-2][x] - 1 & 0xC00) == col) p |= 0x10; // S
       if(y < 6 && (board[y+1][x] - 1 & 0x4FF) == xcol && (board[y+2][x] - 1 & 0xC00) == col) p |= 0x01; // N
       if(p) m[-1] = p | 512; // request a selective burn through the promotion code
     }
     // coordinator victims
     k = loc[col + 7];  // king location (128*rank + file)
     AddVictim(m, k & 7, m[3], 0x4FF, 1028-col); // add locust square for coordinated coordinator
     AddVictim(m, m[2], k >> 7, 0x4FF, 1028-col);
   } else if(type == 4) { // coordinator moved
     k = loc[col + 7];  // king location
     AddVictim(m, k & 7, m[3]);  // add locust squares for coordinated enemies
     AddVictim(m, m[2], k >> 7);
   }
   return 0;
  }

Issues in the interface that could still be improved:

  • The standard script tests for freezing / burning before the custom script is consulted. So when the custom script adds a freezing or burning square, like it does here when the freezing is 'reflected' by a Chameleon, the move that consulted the script would have already passed the test if it happened to be the first move generated. The Ultima script above has to explicitly test for that.
  • The standard script now automatically marks the 'blast zone' around the tracked piece (controlled through trackPieces=N). But it now always uses K steps for that. It might be useful to make this user-configurable, through an option blastZone, so that the default burning could take place only on W or only on F squares, or perhaps even on N squares.
  • It could be useful to define the meaning of the bits in the promotion code for a selective burn (and the marking of the blast zone) relative to the player. That would allow asymmetric burning (e.g. only forward) to work the same for black and white.
  • Perhaps it should be possible to specify 'shooters' expicitly. Entering the Withdrawer and Coordinator moves in the Ultima Diagram below feels a bit queer, as you have to specify the victim first. This will always happen with locust victims added by the script; you will have to click those in the reverse order from which they were added. The Long Leaper obviously is a 'trampler', so it is less strange there (and the locust squares were generated from the XBetza move). But since all these capture are all implicit side effects, it is silly they would have to be clicked at all. Perhaps there should be a third class of pieces ('burners'), that can only be defined by the user, which would then autocomplete after origin and destination are clicked.

Ultima. Game where each type of piece has a different capturing ability. (8x8, Cells: 64) (Recognized!)[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Sun, Feb 5, 2023 11:02 AM UTC:

pieces are tramplers

satellite=ultima files=8 ranks=8 promoZone=0 maxPromote=0 stalemate=win graphicsDir=/graphics.dir/alfaeriePNG/ squareSize=50 graphicsType=png lightShade=#ffff80 darkShade=#bf998c rimColor=#077208 coordColor=#ffff40 symmetry=rotate borders=0 firstRank=1 useMarkers=1 newClick=1 trackPieces=6 spell=freeze pincher::mR:templar:a2-h2 withdrawer::mocabyafmKdaubyafmK::e1 leaper::mQ(cyafyaf)2cafmQ:longleaper:b1,g1 coordinator::mQ:coordinator2:h1 chameleon:X:mQkK(cyafyaf)2cafmQ::c1,f1 immobilizer::mQ::a1 king::K::d1


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sat, Feb 4, 2023 10:33 PM UTC in reply to Maurice Dekker from 06:34 PM:

That happened to me too when I signed in after trying to change my password by email. Email is not working, and I didn't get the email it sent. When I signed in from the same page where I had tried to send an email for changing my password, it said "Cannot continue, because no row in the Person table could be identified." To change your password, do it within five minutes of signing in, or ask for assistance. Since you were able to sign in to post this, you should be able to do it within five minutes of signing in. Just click on the link with your name, or select "Personal Information" from the menu with your name, and then click on Change Password.


Diagram Designer. Lets you display diagrams without uploading any graphics.[All Comments] [Add Comment or Rating]
Edward Webb wrote on Sat, Feb 4, 2023 07:47 PM UTC:

The set groups Chushin Shogi and Taishin Shogi have no working graphics for any of the sets listed.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
Maurice Dekker wrote on Sat, Feb 4, 2023 06:34 PM UTC:

Problem when trying to change password: "Cannot continue, because no row in the Person table could be identified."


🕸📝Fergus Duniho wrote on Sat, Feb 4, 2023 04:38 PM UTC in reply to A. M. DeWitt from 12:34 AM:

I thought of one more thing that could be going on, and I updated update_row to return a warning when it happens. This function now reads the row from the database and checks its values against the values you want to update, and it adds to the SQL query only those values that are different from what is already stored in the database. So, if you tried to update a comment without changing anything, it wouldn't add any values to the query. In case this happens, it will now exit early with a warning.


Riftwalker Chess. A 4 dimensional game on a 3x3x3x3 board. (3x(3x(3x3)), Cells: 81) [All Comments] [Add Comment or Rating]
💡📝Nick Fletcher wrote on Sat, Feb 4, 2023 02:36 PM UTC in reply to Ben Reiniger from Sun Jan 29 02:01 AM:

The queen and wizard don't slide then, correct?

That is correct.

Checkmate might be rather difficult here, but I haven't thought too much about it; the pieces are weaker than many 4D variants, but it's also a very small space.

It's been possible in my testing, but I'm not super good at chess, so I could be missing something.


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sat, Feb 4, 2023 02:07 AM UTC in reply to A. M. DeWitt from 12:34 AM:

I successfully tried updating a couple of my comments, including one on this page, and I successfully updated the comment you referred to, though that was with a different script than you would use. So, I have not been able to repeat what you did.

Looking at the PHP error log, I see multiple errors looking like this:

Failed to prepare SQL in update_row: UPDATE `Comment` SE WHERE `CommentID` = :keyvalue

This was added to the error log by a catch clause I have in update_row().

That "SE" shouldn't be there, but there should be the word "SET" followed by a series of parameters being assigned to table columns. Since we appear to be in the same time zone, these were just over an hour and a half ago, and I was not doing any programming then.

Looking at the individual lines modifying $sql, most lines just append to it, and one uses substr to delete the last two characters. That points to one thing that happened. The $sql string could have this value if it were passed an empty array. After appending nothing to "UPDATE Comment SET ", it chopped off the last two characters and appended " WHERE CommentID = :keyvalue". I added some code to update_row to catch this error before this happens, but I'm still not sure why it happened. This is about what arguments were passed in the function call and not about how the function operated.


A. M. DeWitt wrote on Sat, Feb 4, 2023 12:34 AM UTC:

Also, I am getting this error whenever I try to update my previous comment:

Attempting to update comment.

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `CommentID` = ?' at line 1

Update of Comment with ID of 46749 failed.


How to Design and Post Your Own Game. A reference for those who want to post their own games here.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Fri, Feb 3, 2023 10:48 PM UTC in reply to Thomas from 06:20 PM:

Editors can do it with the editlink.php script, but we currently have no script for letting authors do it. So, add a comment to your page about what you want the description to say, and someone will add it for you.

update test


Suzumu Shogi. 16x16 variant based on Tenjiku Shogi. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝A. M. DeWitt wrote on Fri, Feb 3, 2023 10:08 PM UTC:

Suzumu Shogi is ready


How to Design and Post Your Own Game. A reference for those who want to post their own games here.[All Comments] [Add Comment or Rating]
Thomas wrote on Fri, Feb 3, 2023 06:20 PM UTC:

How can I edit the description of a page already created? I mean the description that shows in the listings of pages.

Specifically I want to add a description to Square Attrition Chess so that it does no longer show the bold "Missing description".


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, Feb 3, 2023 04:35 PM UTC:

To make life easier for those who want to extend the Interactive Diagram with custom JavaSCript, I added a second argument to xxxTinker(): this gets passed the distance to last rank, corrected for piece color. Almost every WeirdPromotion() function I have ever written required calculation of that.

I added functions in the standard script to aid with other tasks: AddVictim(move, x, y) adds a locust square (x, y) to the specified move. And VetChoice(promoPiece, d) tests whether chess-like promotion to promoPiece would be allowed (as per promoZone and promoChoice) when you are d steps removed from last rank. You might want to fake a d within the zone in cases where the user script requests a promotion outside the zone.

The moving piece will always be stored in move[-6]. As an example, when you want to allow piece type 2 to promote when it arrives on last rank from the fore-last one, but not from a larger distance, you could use

function xxxTinker(m, d) {
  if(d != 0) return 0;             // not to last rank
  if((m[-6] & 511) != 2) return 0; // not piece type 2
  if(m[3] != m[1] + 1 && m[3] != m[1] - 1) return 0; // not a single step
  if(!m[-1]) return 4;             // choice not yet made, request one
  return VetChoice(m[-1], 0);      // return whether choice is forbidden (1) or not (0)
}

If under the same conditions a shogi-like promotion to piece type 12 (different from what promoOffset would specify) should take place, things are simpler:

function xxxTinker(m, d) {
  if(d != 0) return 0;             // not to last rank
  if((m[-6] & 511) != 2) return 0; // not piece type 2
  if(m[3] != m[1] + 1 && m[3] != m[1] - 1) return 0; // not a single step
  m[-1] = 12 | m[-6] & 1024;       // specify promoted type (adding color)
  return 3;                        // request choice between this and deferral
}

Scripts like this are only needed to make the promotion dependent on the move; if it is just dependent on the square you move to, or what you capture there, the standard parameters morph and captureMatrix take care of the promotion for you. The way I have implemented it now these would have precedence over the user-supplied scripts. That is, when these specify a promotion, ban or game termination, this will be applied without question, and the xxxTinker() script will only be invoked when they don't specify anything special. So the script only has to handle the non-standard cases.

Although the script could now add as many locust victims to a move as it wants, and wherever it wants those, the trick to request burning or atomic capture through promotion code 512 will still work, and the standard script will add the locust squares in that case.


Variants playable against the diagram's AI. Index of variants that can be played against the interactive diagram.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Fri, Feb 3, 2023 09:42 AM UTC in reply to A. M. DeWitt from 12:42 AM:

Link?


Home page of The Chess Variant Pages. Homepage of The Chess Variant Pages.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Feb 3, 2023 03:29 AM UTC:

The Review New Submissions page seems to be skewed towards new submissions now, rather than submissions that have new changes ready for review. This makes approving pages much harder, as you will only see the newest pages rather than the ones that have changes ready for review. Perhaps if the page is sorted by the timestamp of the last action taken on each article this can be rectified without having to worry about the unreliable modification date.

update test


Variants playable against the diagram's AI. Index of variants that can be played against the interactive diagram.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Fri, Feb 3, 2023 12:42 AM UTC:

Mitsugumi Shogi seems to be missing. It doesn't have as many problem pieces as its big brother Suzumu Shogi, so it can be added to the list without much trouble. I've also successfully tested a modified NextLeg function, which relieves the AI from having to use cumbersome recursive functions to vet moves for the range capturing pieces, which I will implement in the CVP articles soon.


Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Thu, Feb 2, 2023 10:34 PM UTC:

I think I will implement the following interface for extending the Interactive Diagram with user-supplied scripts:

The user can supply a JavaScript function xxxTinker(m), where xxx is the satellite name for the Diagram (default value: 'piece'), and m is an array describing the move. This array will contain the board coordinates (which always start counting at 0) for the squares involved in the move, the rank number following the file number of each square. The first square (in m[0] and m[1]) will be the origin, the second (m[2] and m[3]) the destination, and after that will come the locust squares in the reverse order as the XBetza description visited them. The element m[-2] will specify how many squares will be altered by the move. (So if there are no locust squares this will be 2: the origin and destination.) After the locust squares can come squares where e.p. rights are generated; these are not counted in m[-2]. It is not specified how many there are of those, and most moves do not have them.

The element m[-1] contains the promotion piece for the move (i.e. the piece that will appear on the destination square), but it might or might not be initialized.

This xxxTinker() funtion can then modify the m array in any way it wants. Likely modifications are altering or supplying a promotion piece in m[-1], or adding locust squares by writing those in the appropriate m[] elements, and increasing m[-2] correspondingly. When it is done tailoring the move, it should return a value to indicate to the standard script what it should do with that move. Possible return valueas ar:

-2 Terminates game immediately, as a win for the player that can do the move (as if the move captured a King).
-1 Terminates the game as a win if the player making it survives the reply of his opponent (as with Shatranj baring).
 0 Take the move as we now prepared it (which could be unaltered).
 1 Discard the move; it is forbidden (e.g. due to zonal confinement, or improper promotion piece).
 2 Suppress deferral of normal Shogi promotion (as per maxPromote and promoOffset).
 3 Take the promotion we specified in m[-1], but also add a move that defers.
 4 Perform a Chess-like promotion. Moves with every possible promotion type will be subjected to xxxTinker(), and can be
   rejected or accepted by it in the normal way (returning 1 or 0).

The value 4 should only be returned when the value of m[-1] was undefined (if(!m[-1])...), to make a move that otherwise would not promote at all offer a Chess-like promotion choice. If m[-1] does have a value > 0 the promotion choice has already been made, and we must only reject or accept it.


Simplified Chess. Missing description (8x7, Cells: 56) [All Comments] [Add Comment or Rating]
David Paulowich wrote on Thu, Feb 2, 2023 04:55 PM UTC:

SHATRANJ BLOCKADE STALEMATE IN 20 MOVES

diagram

Using Zillions, I played out a make-believe game, which ends with the 4 remaining Black Pawns blockaded by 4 White pieces, while a Black King, Chariot, Knight, Counselor, and Elephant are locked in behind the Pawns. Even if the rules allowed Kings to move into check and be captured, Black still has no legal moves in the final position.

NOTE: the initial position had Kings on the d-file. I posted the completely legal game on the Shatranj page way back on [2005-03-08]. Apparently this led to the latest version of Rule [7]. See my previous post for why I am still dubious about the entire rule set.


David Paulowich wrote on Thu, Feb 2, 2023 04:33 PM UTC:

BLACK TO MOVE AND WIN???

diagram

The year is 2023 and the rules for this 8x7 variant still state:

"... 6. A pawn may only promote to a captured piece [QRNB] and not move to the last row unless there is a piece to promote to. 7. If a player can only legally move his King or can not legally move any pieces (a very rare situation), then he loses."

So Rule [6] encourages me to play Black King f1-e2-d2-c2-b2 and start promoting pawns. But the always infuriating rule [7] makes this a lost position for Black. The question remains: What is going on here?


25 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.