The Chess Variant Pages
Custom Search

[ 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 2020-09-04 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 2020-09-04 UTC

It seems to me that you have deleted the log!

Aurelian Florea wrote on 2020-09-04 UTC

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

Fergus Duniho wrote on 2020-08-31 UTC

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 2020-08-30 UTC

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 2020-08-30 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 2020-08-30 UTC

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 2020-08-30 UTC

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 2020-08-30 UTC

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

Greg Strong wrote on 2020-08-28 UTC

The log is here:

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 2020-08-28 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 2020-08-28 UTC

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

Aurelian Florea wrote on 2020-08-28 UTC

Please try again!

Greg Strong wrote on 2020-08-28 UTC

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

Aurelian Florea wrote on 2020-08-28 UTC

@Greg, Are things ok now?

Aurelian Florea wrote on 2020-08-26 UTC

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 2020-08-25 UTC

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 2020-08-23 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.


The preset you have shown me is an older one. The newest ones are:

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

Greg Strong wrote on 2020-08-22 UTC

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 2020-08-22 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 2020-08-22 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:

Aurelian Florea wrote on 2020-08-22 UTC

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

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 2020-08-21 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.