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
Apothecary chess preset error[Subject Thread] [Add Response]
Aurelian Florea wrote on Fri, Sep 4, 2020 07:56 AM UTC:

@Greg, I have done what Fergus has guided me to do. Any improvement?


Apothecary Chess-Modern. Large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
💡📝Aurelian Florea wrote on Fri, Sep 4, 2020 07:54 AM UTC:

@Fergus, I have followed your instruction and all is fine now. Thanks for the guidance!


🕸Fergus Duniho wrote on Wed, Sep 2, 2020 05:24 PM UTC in reply to Aurelian Florea from 04:51 AM:

As long as you're using drop with any, you should change coin1 and coin2 back into variables, since using them as constants is changing the sequence of random number generation, which is changing the spaces picked to drop pieces on.

To store the position, you should be able to set a constant to the value of $space. To use that constant, you should be able to set the system variable space to its value. You should run your randomization code only if your constant is not already set. If it is set, just use the recorded position. As a proof of concept, I modified Brand X Random Chess to work like this, though I kept in some backwards compatibility with the old way it worked for past games.


🕸Fergus Duniho wrote on Wed, Sep 2, 2020 01:51 PM UTC in reply to Aurelian Florea from 04:51 AM:

When I tried looking into it, it gave me the error "ILLEGAL: N i2-h4 on turn 3". Random setups make it harder to test and debug code, and I generally do not recommend them. In this case, your log has constant values for coin1 and coin2, but your backup does not. So, you began this game before you started using constants to store your random values. Since the only values for coin1 and coin2 should be 0 or 1, I tried all four combinations. They were initially set to 1 and 1, which gave the error "ILLEGAL: Q e2-h5 on turn 5", but all other combinations gave the error "ILLEGAL: N i2-h4 on turn 3".

Looking at your code, I see you are using "drop any". This introduces an additional random element that is not stored in any constant. So, there are more than just four possible initial positions. If you are going to use "drop any", then what you should store in your constants is the position of the pieces.


Mad Mate A game information page
. Wooden set for chessgi: captured pieces change hands and can be used as reinforcement.[All Comments] [Add Comment or Rating]
Greg Strong wrote on Wed, Sep 2, 2020 05:48 AM UTC:

Dead. Will delete this page in a couple days unless someone has some good reason why it should stay.


Apothecary Chess-Modern. Large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
💡📝Aurelian Florea wrote on Wed, Sep 2, 2020 04:51 AM UTC:

@Fergus In a game of Apothecary Chess modern I play I cannot move due to an error. The preset used to work fine. Have you done anything that could make this preset not work anymore. Please take a look at the game: https://www.chessvariants.com/play/pbm/play.php?game=Apothecary+Chess-Modern&log=catugo-cvgameroom-2020-235-237


Kar OukA game information page
. A variation of Khmer Chess (.rar unix archive file).[All Comments] [Add Comment or Rating]
Greg Strong wrote on Wed, Sep 2, 2020 03:31 AM UTC:

This link is dead, and since it is a link to a RAR file, it is not captured on archive.org.

Per Wikipedia, however, this is a variant of Cambodian Chess, which is itself a variant of Makruk. Cambodian Chess probably deserves a page (we have a Zillions file and a Java file, but not a game page), so I will make one. This variant should be mentioned on said page, but I do not think deserves a page of its own. When I have made that page, I will just delete this one.


Double Chess. FIDE Chess x 2(with extra queen replacing what would be an extra king).[All Comments] [Add Comment or Rating]
Greg Strong wrote on Wed, Sep 2, 2020 03:13 AM UTC:

I just tested this preset and it seems to mostly work. I tried all four castlings (king-side and queen-side, close-rook and far-rook) and they all worked. Moves often weren't displayed correctly, though. Queen-side castling with the close rook displays and works fine. King-side castling with the close rook does not display as legal, but it will work if you tell it to try anyway. King-side castling with the far rook does not display but will work. Queen-side castling with the far rook (a) does not display the legal move, but it will work anyway, and (b) displays a king move to the g-file as legal that should not work, but does.

Kevin also previously noted a castling in a real game that should have worked but didn't. This is Antoine's preset and he is no longer active. I will try to look at it in a few days if no one else does, but it would be great if someone else could take a look.


Double Chess Game with analysis. Sample game with analysis.[All Comments] [Add Comment or Rating]
Greg Strong wrote on Wed, Sep 2, 2020 02:43 AM UTC:

I have updated this page to replace the position diagrams, previously drawn as ASCII graphics, with images dynamically generated by the Diagram Designer.  I also added a link to download the game as a ChessV saved game file to facilitate further analysis. 

I've always been a fan of David Short's Double Chess (16 x 8).  This is both the first time I have seen a game go this long, and the first time I have seen a player castle with the far rook.


Apothecary Chess-Modern. Large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
Greg Strong wrote on Mon, Aug 31, 2020 06:49 PM UTC:

I did it. How does it work?

Unfortunately, that did not solve the issue.

As an editor, you should be able to edit the values of $constants["coin1"] and $constants["coin2"] in your log. Since there are only four possible combinations, you can do a little bit of experimenting to find the correct values. If only one combination lets the game play through without error, that is the correct combination.

I did this, but it turns out the random placement is not the problem.

I removed all the moves from the log starting with the bad one.  It turns out that there really was an illegal move that for some reason was allowed before...  The next move was f4-g5.  Sorry for the false alarm!


🕸Fergus Duniho wrote on Mon, Aug 31, 2020 03:24 PM UTC in reply to Greg Strong from 03:01 PM:

As an editor, you should be able to edit the values of $constants["coin1"] and $constants["coin2"] in your log. Since there are only four possible combinations, you can do a little bit of experimenting to find the correct values. If only one combination lets the game play through without error, that is the correct combination.


💡📝Aurelian Florea wrote on Mon, Aug 31, 2020 03:22 PM UTC:

I did it. How does it work?


💡📝Aurelian Florea wrote on Mon, Aug 31, 2020 03:10 PM UTC:

Yes, Sorry!


Greg Strong wrote on Mon, Aug 31, 2020 03:01 PM UTC:

Can you also make the modification to settings ApothecaryChess-Modern? That might solve the problem with my log.


💡📝Aurelian Florea wrote on Mon, Aug 31, 2020 01:27 PM UTC in reply to Fergus Duniho from 12:54 PM:

I have made the modifications.


Apothecary Chess-Classic. Large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
💡📝Aurelian Florea wrote on Mon, Aug 31, 2020 01:19 PM UTC:

Thanks, Fergus!


🕸Fergus Duniho wrote on Mon, Aug 31, 2020 12:57 PM UTC in reply to Aurelian Florea from 08:07 AM:

Do not use code like this for random values:

set coin1 rand 0 1;
set coin2 rand 0 1;

if == #coin2 0:

Instead, use code like this:

setconst coin1 rand 0 1;
setconst coin2 rand 0 1;

if == @coin2 0:

Apothecary Chess-Modern. Large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Mon, Aug 31, 2020 12:54 PM UTC in reply to Aurelian Florea from 08:07 AM:

You should set your random values to constants, not to variables, since the same random values have to be re-used throughout a game. The setconst command will assign a new value only if the constant's value is not already on record. Unlike variables, constants will get stored in the log. If a constant's value was written to the log at an earlier time, it will be retrieved and reused instead of setting the constant's value again.


Apothecary Chess-Classic. Large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
💡📝Aurelian Florea wrote on Mon, Aug 31, 2020 08:07 AM UTC in reply to Aurelian Florea from Thu Jul 23 08:41 AM:

May any editor look at this article for submitting a preset?


Apothecary Chess-Modern. Large Board variant obtained trough tinkering with known games.[All Comments] [Add Comment or Rating]
💡📝Aurelian Florea wrote on Mon, Aug 31, 2020 08:07 AM UTC in reply to Aurelian Florea from Thu Jul 23 08:40 AM:

May any editor look at this article for submitting a preset?


Apothecary chess preset error[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Mon, Aug 31, 2020 04:19 AM UTC in reply to Greg Strong from Sun Aug 30 08:57 PM:

Would editing the settings change the seed?

Not usually, but it could change the order that random numbers are generated in, the range of random numbers, the number of random numbers, or how random numbers are used. Using the same seed preserves things only so long as everything else regarding random number generation and usage remains the same. Since we cannot count on PHP continuing to use the same randomization algorithm, it is best to store the final result in a constant and to use that.


Grand Chess. Christian Freeling's popular large chess variant on 10 by 10 board. Rules and links. (10x10, Cells: 100) (Recognized!)[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Mon, Aug 31, 2020 02:13 AM UTC in reply to Greg Strong from Sun Aug 2 11:45 PM:

My game against the interactive diagram. I played White and won.

  1. f5 Nh7 2. Nh4 Ng5 3. e4 Cf7 4. Nc4 Rag10 5. g4 Nc7 6. Bf4 h6 7. Ng6 Nce6 8. Nge5 Nxf4 9. Cxf4 Ch8 10. h4 Nf7 11. Nxf7 gxf7 12. Cxh6 Rg7 13. Rjg1 Rg8 14. g5 Cg7 15. Cxg7 Rxg7 16. f6 Rg6 17. d4 Rjg10 18. e5 R6g8 19. Bf5 d7 20. Rg3 e6 21. fxe7 Bxe7 22. Rf1 Rg7 23. Nb6 Bxa3 24. Nxa8 Be7 25. Rgg1 R10g8 26. Ra1 Qe8 27. Nc7 Qd8 28. Ra9 Ke10 29. Rxf9 Kxf9 30. Nd5 Ba3 31. Qa2 Be7 32. Qa9 Kg10 33. Ra1 Rg9 34. Qa10 Kf9 35. Ra9 Ke8 36. Qc10 Rd9 37. Qe10 Re9 38. Rxe9 Qxe9 39. Qxc8 Bd8 40. Bxd7

Is there any way to replay past games with the interactive diagram?


📝Greg Strong wrote on Mon, Aug 31, 2020 12:24 AM UTC:

I made significant updates to this page. It was at least 15 years since the last updates. I updated the graphics, updated the information about which computer play and equipment options are available, added notes about the rules - history and implication, and edited the introduction to be more current. (The previous page said "Since it's conception in 1984 it continues to grow in popularity", which may have been true at the time, but I think it is fair to say that the popularity of Grand Chess has peaked, at least for the time being.)

The old page can still be accessed here: https://www.chessvariants.com/large.dir/freeling_old.html


Apothecary chess preset error[Subject Thread] [Add Response]
Greg Strong wrote on Sun, Aug 30, 2020 08:57 PM UTC in reply to Fergus Duniho from 08:48 PM:

I suspected this could be the issue. The log file does contain:

$seed = 488750628

but I don't know how this is used. There is a BAK file from the last move, but it shows the same seed.

EDIT: This part worked until Aurelian changed the settings to try to fix a Joker problem and it introduced this problem. Would editing the settings change the seed?


🕸Fergus Duniho wrote on Sun, Aug 30, 2020 08:48 PM UTC:

I think the main problem is the random setup. When you randomize the setup, you have to take measures to keep it the same throughout the game. This used to be done by reusing the same seed. But ever since a change in PHP's randomization algorithm screwed this up, the preferred method has been to store the random factors or results in a constant. If the relevant constants exist, use the values already stored in them. Use random values only on the very first time, set the constant values immediately, and then just use the constants.


25 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.