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
Server crash[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Wed, Sep 22, 2021 06:35 PM UTC:

The new server is running PHP 8. So, I have updated some scripts over there to work with PHP 8, and I have copied the updated versions to the main server. These include the following:

  • 404.php
  • footer.php
  • ads/adlocale.php
  • index/commentsinc.php
  • index/database-funcs.php
  • index/displayusersubmission.php
  • index/fpd-indexing-funcs.php
  • login/header.php
  • play/pbm/play.php

One change is that {curly brackets} may no longer be used to specify characters within a string. [Square brackets] must be used instead, as they are already used for array elements. The other is that parentheses must now be used to specify the order of evaluation for nested ?: statements.

I will check more pages later to see if any more scripts need updating.


Jean-Louis Cazaux wrote on Tue, Sep 21, 2021 08:39 PM UTC in reply to Fergus Duniho from Mon Sep 20 09:09 PM:

Congratulation for this repair Fergus! Happy to see this back!!!


🕸Fergus Duniho wrote on Tue, Sep 21, 2021 12:49 PM UTC in reply to dax00 from 11:18 AM:

I can't access my game that was interrupted. I hope that timed-out games (due to the site being down) will be playable soon.

It appears that the problem with your game affects only Chu Shogi, and it has nothing to do with the game being interrupted, as I encountered the same problem when I tried to simply move pieces in Chu Shogi. What happens is that the page stops displaying partway through the menu, and it doesn't give me any clear indication of what is wrong. It looks like this is going to be a problem for Adam DeWitt to solve, as it stems from his chu settings file.


dax00 wrote on Tue, Sep 21, 2021 11:18 AM UTC:

I can't access my game that was interrupted. I hope that timed-out games (due to the site being down) will be playable soon.


🕸Fergus Duniho wrote on Mon, Sep 20, 2021 10:28 PM UTC in reply to H. G. Muller from 08:32 PM:

Please back it up ASAP!

I copied a backup of the files and the database to the backup server. When I extracted the tar file, it overwrote the .htaccess file, which caused chessvariants.org to go to chessvariants.com. I will have to rewrite the .htaccess file so that the same file can work properly on both servers. Then I'll be able to test that the database and pages are working correctly over there.


🕸Fergus Duniho wrote on Mon, Sep 20, 2021 09:09 PM UTC in reply to H. G. Muller from 08:32 PM:

The server never crashed. I was simply unable to boot it back up after attempting a reboot. For those who don't know, this is because the host's website was down, which left me without the ability to access the control panel for the VPS. The host is now back online, and I now have a second VPS with a different company, which has been assigned to the chessvariants.org domain. I will now work on backing up my websites to the other server.


H. G. Muller wrote on Mon, Sep 20, 2021 08:32 PM UTC:

It seems the server is back in business?!

Please back it up ASAP!

I do have a VPS available (rented up to Oct. 6) where we could practice the process of cloning the website. Apache, PHP and MySQL are installed, as well as ftp and ssh servers. Tell me if you want an account with root access on it.


semi-simultaneous step chess[Subject Thread] [Add Response]
Joe Joyce wrote on Tue, Aug 31, 2021 08:02 AM UTC:

Semi-Simultaneous Step Chess

This is a mutator. It should work across a broad range of variants.

Movement

Players make 1 standard move per turn. However, the pieces only make the smallest step possible each turn but turn after turn, each piece continues making the smallest step possible until it reaches its destination, where it stops and is once again available for movement. Sliders move 1 square/turn. Leapers make 1 leap/turn, so a knight gets to its destination in 1 turn, but a knight rider will advance only 1 knight’s leap/turn until it gets to its destination.

Who Moves First?

At the end of each player turn, each currently-stepping piece is moved in the same time order in which the moves were originally made. An alternate possibility is at the end of each player-turn, only that player’s pieces move, in time order. This change affects captures, see below.

Capture

During the stepping of the pieces, when a piece lands on another piece, the piece landed on is considered stepped on – it is captured and removed from the game immediately. Clearly the question of whether white and black interleave all their current steps, or if each side does all its own steps only, after its current move, has a huge effect on the game.

Discussion

Yes, the rules allow for players to capture their own pieces. And the rules allow players to see things coming and move out of the way just before the attacks will strike their pieces. And they can schedule an attack on the square just after the opponent piece gets there.

So why do any distance moves? Well, the more distance moves you do, the more pieces you can have moving at the same time. So the more attacks you can make in any given turn. You can try “time on target” attacks where you launch attacks over the course of several turns that all land in the same area at or near the same turn.

And that brings up another point. Why not have indeterminate moves? A slider may keep going in the same direction turn after turn until it captures a piece, hits the edge of the board, or is ordered to stop. It is given only a direction in which to move, not a destination.

Comments welcome.


The birth of 3 new variants - part 2 : Grand Apothecary Chess Modern[Subject Thread] [Add Response]
Aurelian Florea wrote on Mon, Aug 16, 2021 07:11 AM UTC in reply to H. G. Muller from Sun Aug 15 06:54 PM:

@HG, Yes, I was thinking about this!


H. G. Muller wrote on Sun, Aug 15, 2021 06:54 PM UTC in reply to Aurelian Florea from 04:47 PM:

Two possibilities:

1) Change the piece IDs in the description of the Interactive Diagram before you paste it into the Play-Test Applet.

2) Edit the GAME code generated by the Applet in order to change the IDs of the pieces you want changed. Piece labels occur in the function definitions and in the arrays behind the legdefs array with step descriptions, in the Pre-Game code.


Aurelian Florea wrote on Sun, Aug 15, 2021 04:47 PM UTC in reply to H. G. Muller from 09:32 AM:

@HG, It seems all well to me so far but the pictures used are the ones from the alfaerie many where the letters in use are from the interactive diagram. So it is difficult to read out. How do I fix this?


🕸Fergus Duniho wrote on Sun, Aug 15, 2021 12:11 PM UTC in reply to H. G. Muller from 09:32 AM:

In the routine below the variable 'sqr' stays 0 for all iterations. Only when I deleted the comma ("for (sqr piece) $space;") it runs through the square labels. Yet the GAME code manual suggest a comma should be present.

The Developer's Guide was wrong. I have corrected it. It uses spaces as separators, and when I used a comma, it added the comma to the variable name, so that this code worked:

foreach (key, var) spaces:
  echo #key, #var;
next;

But this code did not:

foreach (key, var) spaces:
  echo #key #var;
next;

(And thanks for fixing the dash problem; I would never have found that.)

It's important to remember that it was a minus sign, not a dash. When you use the # prefix before a variable name, it rewrites your code by replacing your variable with its value. Because it rewrote your code with a minus sign, your line of code was now trying to do subtraction. This threw a monkey wrench into your code in a way that a mere dash – which would be a meaningless string that was wider than a minus sign – would not have. Inserting the value of variables in this way is mainly intended for using variables with commands that do not process expressions (at all or for a certain argument). Within expressions, it is usually safer to use the var operator, which simply returns the variable value without rewriting your code. I believe functions are now an exception to this, since the following code prints 13, not 17:

set a 8;
def test + 9 #a;
set a 4;
print fn test;

H. G. Muller wrote on Sun, Aug 15, 2021 09:32 AM UTC:

@Fergus: In the routine below the variable 'sqr' stays 0 for all iterations. Only when I deleted the comma ("for (sqr piece) $space;") it runs through the square labels. Yet the GAME code manual suggest a comma should be present.

(And thanks for fixing the dash problem; I would never have found that.)

Yet another question: is there an elegant way to convert internal rank and file number to the square label? For games that need symmetric shuffling I first shuffle the white pieces, and then copy the white setup (color-flipped) to the black camp, and for that I have to derive the label of the mirror square. This is now done by a pretty complex calculation. Which only works if rank labeling is a consecutive range of integers.

@Aurelian: The FEN for your start position has one dash too many at the start. Otherwise it should work now. (At least the shuffling.)


🕸Fergus Duniho wrote on Sat, Aug 14, 2021 11:32 PM UTC in reply to H. G. Muller from 08:20 PM:

Here is the fixed subroutine:

sub GetSquares toshuffle:
  my sqr piece;
  // determine the squares the pieces in the given set are on.
  // the result is left in 3 global arrays:
  set left array;  // on left board half
  set light array; // as well as sorted by shade
  set dark array;
printr $space;
  for (sqr, piece) $space:
print . iter . #piece #sqr;
    if match var piece #toshuffle:
      if < * 2 file #sqr lastfile:  // left half
        push left #sqr;
      endif;
      if == color #sqr 1: // distinguish by shade
        push dark #sqr;
      else:
        push light #sqr;
      endif;
    endif;
  next;
print "got it";
endsub;

The actual fix was changing #piece to var piece in the conditional if match var piece #toshuffle:. There are subtle differences between these two ways of getting the values of variables. The way you were doing it embedded it into the line during pre-processing, and the problem with doing that was that its first value was -, which is also an operator. Changing it to var piece made sure that it treated the value as a string at the proper time and not as the minus operator.

I changed another line to use the color operator, because this might be a better way of doing what you want. This returns the color index associated with the space. Looking at the color values, I figured that the number 1 was being used for the dark squares.


H. G. Muller wrote on Sat, Aug 14, 2021 08:20 PM UTC in reply to Fergus Duniho from 08:00 PM:

When I clicked on that, I saw a listing of all the spaces. So, I presume it is working.

No, that just shows the printr $space before the loop worked. After that list of spaces it prints "iter0"  in the first and only iteration of the loop.

If things worked, you would not see anything printed; You would just see the diagram of the shuffled starting position.


🕸Fergus Duniho wrote on Sat, Aug 14, 2021 08:00 PM UTC in reply to H. G. Muller from 06:49 PM:

This routine is in the shuffle.txt file included in the preset Aurelian posted the link to 5 postings ago in this subject thread.

When I clicked on that, I saw a listing of all the spaces. So, I presume it is working.

Once you have shuffled the pieces, are you storing the results of the shuffling in a constant for later reuse?


H. G. Muller wrote on Sat, Aug 14, 2021 06:49 PM UTC in reply to Fergus Duniho from 06:30 PM:

There isn't that much context; it is in a subroutine, and sqr and piece are 'my' variables, which should pretty much decouple it from the remaining code:

sub GetSquares toshuffle:
  my sqr piece;
  // determine the squares the pieces in the given set are on.
  // the result is left in 3 global arrays:
  set left array;  // on left board half
  set light array; // as well as sorted by shade
  set dark array;
printr $space;
  for (sqr, piece) $space:
print . iter . #piece #sqr;
    if match #piece #toshuffle:
      if < * 2 file #sqr lastfile:  // left half
        push left #sqr;
      endif;
      if & 1 + file #sqr rank #sqr: // distinguish by shade
        push dark #sqr;
      else:
        push light #sqr;
      endif;
    endif;
  next;
print "got it";
endsub;

This routine is in the shuffle.txt file included in the preset Aurelian posted the link to 5 postings ago in this subject thread. That preset calls the routine ShuffleSetup (at the very bottom of the Pre-Game section), which eventually calls this routine. If you click that link it directly tries to execute the preset, which immediately exits after printing the $space array, and "iter0". It never gets to the "got it".

 


🕸Fergus Duniho wrote on Sat, Aug 14, 2021 06:30 PM UTC in reply to H. G. Muller from 02:44 PM:

When I tried it by itself, it did loop through the board. Perhaps something in the outer context is affecting your code.


H. G. Muller wrote on Sat, Aug 14, 2021 02:44 PM UTC:

@Fergus: I don't understand what is wrong with the following GAME code:

  for (sqr, piece) $space:
print . iter . #piece #sqr;
    if match #piece #toshuffle:
      if < * 2 file #sqr lastfile:  // left half
        push left #sqr;
      endif;
      if & 1 + file #sqr rank #sqr: // distinguish by shade
        push dark #sqr;
      else:
        push light #sqr;
      endif;
    endif;
  next;
print "got it";


I would have expected it to loop over the board. But instead it prints "iter0" and then exits. If I do a "printr $space" just before it, it does print the board as expected.


Aurelian Florea wrote on Fri, Aug 13, 2021 11:03 AM UTC in reply to H. G. Muller from Tue Aug 10 09:22 AM:

HG, Have you took any time to take a look on the initial position randomization issue?


Possible bug in Grand Cavalier Chess[Subject Thread] [Add Response]
wdtr2 wrote on Wed, Aug 11, 2021 11:03 PM UTC in reply to Fergus Duniho from 05:55 PM:
ok, great.   Thank you.

🕸Fergus Duniho wrote on Wed, Aug 11, 2021 05:55 PM UTC in reply to wdtr2 from 10:29 AM:

It's not so much that there is a bug here but that this preset was written before I gave Game Courier the ability to move pieces by clicking with the mouse. So, I did not program it to handle partial moves. As long as you enter the whole move at once, which will require some typing, it will allow the promotion. I will eventually get around to updating this preset or replacing it with a new one.


wdtr2 wrote on Wed, Aug 11, 2021 10:29 AM UTC in reply to Fergus Duniho from Mon Aug 9 02:15 AM:
Hi Fergus, thank you for the reply.  I think there is a violation to this rule.  The following is an example:
1. H d3-c5 
1... h g8-h6 
2. I c1-g9 
2... x f10-g9 
3. H c5-d7 
3... x g9-h9 
4. H d7-f8 // - Check! -
4... x h9-i9 
5. C j2-j3 
5... q e10-e9 
6 . H F8-    Can not promote?
=====
This was done in self-play mode. 2 people at the same PC.
In move #6 I thought the Cavalier could pop-into the last rank, and promote to the night-rider it lost.
===

The birth of 3 new variants - part 2 : Grand Apothecary Chess Modern[Subject Thread] [Add Response]
H. G. Muller wrote on Tue, Aug 10, 2021 09:22 AM UTC in reply to Aurelian Florea from 09:06 AM:

1) It seems the checkbox "Do not include moves in code" is not ticked.

2) Something is wrong with the shuffling; I still have to figure out what. When I delete the last line of the Pre-Game code ("gosub ShuffleSetup;") the preset seems to work (but without shuffling, of course).


Aurelian Florea wrote on Tue, Aug 10, 2021 09:06 AM UTC in reply to H. G. Muller from Mon Aug 9 08:06 PM:

The result of one of my 3 games is here :

https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+1&settings=Applet

although it seems I have done something wrong as I don't get normal results. It just says to report any bugs to you HG!


25 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.