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


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

Comments/Ratings for a Single Item

Later Reverse Order Earlier
Apothecary chess preset error[Subject Thread] [Add Response]
Greg Strong wrote on Fri, Sep 4, 2020 01:39 PM UTC:

Yes. As I posted earlier, there was actually no problem with the preset. The problem was that there was an actual illegal move in the game log. The illegal move was originally ignored, but when you fixed it, it would not load the game (which is correct behavior.)


Aurelian Florea wrote on Fri, Sep 4, 2020 07:57 AM UTC:

It seems to me that you have deleted the log!


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?


🕸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.


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.


🕸Fergus Duniho wrote on Sun, Aug 30, 2020 06:38 PM UTC in reply to Aurelian Florea from 05:10 AM:

I updated the die command to print the last move in this situation. This will point you to where the problem is.


Greg Strong wrote on Sun, Aug 30, 2020 05:30 PM UTC in reply to Aurelian Florea from 05:10 AM:

No idea. I tried hacking the log file to switch it to your new settings, but it still give the same 'king may not move into check' error. Can't even replay the moves in a new log because the pieces will start in different positions.

I guess the log will just have to be deleted.


Aurelian Florea wrote on Sun, Aug 30, 2020 05:10 AM UTC:

I cannot figure out what is going on. To me the preset in question works fine. Any suggestions?


Greg Strong wrote on Fri, Aug 28, 2020 07:28 PM UTC in reply to Aurelian Florea from 04:40 PM:

The log is here:

https://www.chessvariants.com/play/pbm/play.php?game=Apothecary+Chess-Modern&log=sxg-cvgameroom-2020-181-765&userid=mageofmaple

It used to open but not allow me to move the joker. Whatever your last change was made it worse because now it will not open. I thinks one of the moves already played is illegal.


Aurelian Florea wrote on Fri, Aug 28, 2020 04:40 PM UTC:

I don't now what you are doing. Please give me more details. Is it a game you play or an older log?


Greg Strong wrote on Fri, Aug 28, 2020 04:30 PM UTC in reply to Aurelian Florea from 04:27 PM:

Now I can't open the log. It says "you may not move into check"


Aurelian Florea wrote on Fri, Aug 28, 2020 04:27 PM UTC in reply to Greg Strong from 02:37 PM:

Please try again!


Greg Strong wrote on Fri, Aug 28, 2020 02:37 PM UTC in reply to Aurelian Florea from 06:15 AM:

I'm afraid not. I still cannot move my joker as a pawn.


Aurelian Florea wrote on Fri, Aug 28, 2020 06:15 AM UTC:

@Greg, Are things ok now?


Aurelian Florea wrote on Wed, Aug 26, 2020 05:34 AM UTC in reply to Greg Strong from Tue Aug 25 08:53 PM:

I think I had solved it. If not I had corrected the error for another Apothecary chess modern preset. So please say that it does not work, if the case.


Greg Strong wrote on Tue, Aug 25, 2020 08:53 PM UTC in reply to Aurelian Florea from Sun Aug 23 04:37 AM:

I still can't move my joker as a pawn. The pawn is attacking him and he needs to move so I'm stuck ...


Aurelian Florea wrote on Sun, Aug 23, 2020 04:37 AM UTC:

I have defined the none range piece type definition with (()()): def None-Range (()()); That because the error I mentioned earlier was that the piece that was the joker imitating was not an array.

@Greg,

The preset you have shown me is an older one. The newest ones are: https://www.chessvariants.com/play/pbm/play.php?game%3DApothecary+Chess-Classic%26settings%3DApothecary_Chess-Classic https://www.chessvariants.com/play/pbm/play.php?game%3DApothecary+Chess-Modern%26settings%3DApothecary_Chess-Modern.

Hopefully I'll have the time today to update the older presets.


Greg Strong wrote on Sat, Aug 22, 2020 05:05 PM UTC in reply to Aurelian Florea from 04:48 PM:

I'm not sure what this means. I can move a rook, and I probably could move the joker if it was imitating a rook, but using a joker to do a pawn capture does not seem to work.


Aurelian Florea wrote on Sat, Aug 22, 2020 04:48 PM UTC:

It looks to me that initializing the joker with none cannot be done. When I had selected rook things work out fine!


Greg Strong wrote on Sat, Aug 22, 2020 02:01 PM UTC:

Something else is wrong. In this log, my joker is imitating the pawn that just moved, but it will not allow me to capture the pawn. It highlights the move as legal, but upon making it, says it is illegal:

https://www.chessvariants.com/play/pbm/play.php?game=Apothecary+Chess-Modern&log=sxg-cvgameroom-2020-181-765&userid=mageofmaple


Aurelian Florea wrote on Sat, Aug 22, 2020 06:43 AM UTC:

@Fergus, As I had said in the previous message on this topic I have an error in my apothecary presets.

https://www.chessvariants.com/invention/apothecary-chess-1 https://www.chessvariants.com/invention/apothecary-chess-2

The for loop in the links above tries to the None piece for checking the legality. I remember the code working. Is it possible that some game code changes hinders this preset? Or is it a regular bug?


Aurelian Florea wrote on Fri, Aug 21, 2020 07:05 AM UTC:

I have a problem with the apothecary presets. The ones that are in their final shape give an error at this code (second line-1061)

1060 for (from piece) fn friends 1061 for to fn join const alias #piece "-Range" #from 1062 if fn const alias #piece #from #to and not fn friend space #to and onboard #to 1063 move #from #to 1064 if not sub checked cond == #from #kingpos #to #kingpos 1065 setlegal #from #to 1066 endif 1067 endif 1068 restore 1069 next 1070 next

Do other presets have the same problem, as I remember mine working the last time I had checked?


23 comments displayed

Later Reverse Order Earlier

Permalink to the exact comments currently displayed.