Comments/Ratings for a Single Item
if match old r b n m a c v s w:
setelem reserve old inc elem old reserve;
endif;
reserve is an associative array that is keeping track of the number of pieces of each type that is in reserve. When a piece of one of these types is captured, the number associated with that type in the associative array is incremented. This is for implementing the promotion rules where you are allowed to promote by replacement to pieces of yours that have been captured.
I though about castling for a while but it does not seem a good thing. It would have involved one step diagonally back which is also uncomfortable. Any thoughts are appreciated.
For this reason I did start the King in Elven Chess on the back rank, and put one of the unorthodox pieces (the Lion) in its place next to the Queen.
And another question for Fergus, if I may.
in the gross chess code there is a line (to the end of post move code)
if match old r b n m a c v s w:
setelem reserve old inc elem old reserve;
endif;
I think it supposed to increase the values of pieces in reserve once captured, But I don't understand how and why, as for example there is no captured keyword. Thanks!...
A final question for the community about my 2 apothecary chess variants.
A few have played the games , and I'm remembering those that there was no castling in the games, as there is none in Grand Chess. I though about castling for a while but it does not seem a good thing. It would have involved one step diagonally back which is also uncomfortable. Any thoughts are appreciated.
As an update things are going decent with the automation. The king and joker are not yet done!... Thanks for any opinion or help!...
I'm not sure if anyone helped, but things seem ok now. I am sorry for any false alarm. Have fun everybody!
@Fergus,
The knights are fine. It is just how these games work.
I'm not sure what could be wrong with the griffin and aanca code. I think I had just copy pasted what you had written a while ago. And we had talked about this before. But there could be the biggest trouble. Maybe tomorrow I'll take a look :)!
On comparing the post-game code in the two presets, there are some piece label differences, and in the Post-Move 1 code for the second preset, there is an endif without a semicolon after it.
In the one with the infinite loop, there are complicated piece functions for the G and A pieces, and the N function has some more code in it. One of these functions might be at fault. I would recommend that you get the second one working, then introduce these functions back into the script one at a time and see what happens. I do not think that anything in the post-move code is involved in the infinite loop, since it happens before I have the opportunity to make a move. But to rule that out, you could try deleting the post-move code temporarily to see if it makes a difference.
When I try to use the first preset, it repeats "Please report any bugs or errors to Fergus Duniho" on the screen endlessly. In looking more closely at the code, I see that they are not the same. I guess I was not using the Compare plugin properly. I've tried it again, and this time it is showing differences. But I have not determined what is causing this infinite loop.
When I tried to move a Pawn in the second preset, I got the error "Call to P subroutine got misrouted."
Looking at your code as it is displayed below the error message, I do not see a P subroutine defined anywhere. So, it appears to be calling a subroutine that is not defined in your code. Looking at the code you have written in your pre-game section, you have
commented out. This is the include file that would have the P subroutine defined in it. So, including it should eliminate this error.
include chess3
Returning to the code displayed below the error message, this code is properly indented, and anywhere the indentation seems incorrect, you may find an error. On line 85, you have an endif without a semicolon after it. You have the same error on line 114.
By doing automated comparisons with the Compare plugin for Notepad++, I determined that the code in these two presets are the same. Although you say that they display legal moves, they do not. They presently lack any post-game code, but that is where code for recording the legal moves should go. What errors in particular have you been seeing?
Apothecary 1 is already on the list. When we know who is playing, we will vote on which games from the list are included. Each inventor can only list one game though.
@Greg
Would you agree the inclusion of the upgraded apothecary 1&2 into this years tournament provided that I can do (with Fergus's help) the rules enforcement and move displays in time?
@Fergus
Hello
This preset: https://www.chessvariants.com/play/pbm/play.php?game=Apothecary+Chess+1&settings=Apothecary1working
still has errors as we had discussed before (an infinite cycle).
This one is virtually the same but lack the erros of the first one.
https://www.chessvariants.com/play/pbm/play.php?game=Apothecary+Chess+2&settings=Apothecary2working
They seem to similar to me and still apothecary 1 has errors. Could you please check? Maybe it is a problem with the system. Could you help? Thanks!...
It has been pointed to me that the promotion rules make for the possibility of not having the needed physical material for when playing on physical boards :)!
My stance on that was always that today chess is most of the time played over the internet where physical material it is not a concern as with software you can always "cast" 10 queens :)!
Official competitions are held this way mostly for tradition and cheating protection reasons.
In 50 years physical boards will probably become fringe and understood only to the very curios as is for a modern audience medieval western European poetry, for example :)!
I never liked Christian Freeing's Grand Chess promotion rules. It just makes a good game worse. Fergus Duniho has done better in Gross Chess (the game in the I have in the meantime remember I got the idea of such complex rules) gives the extra possibility, with respect to Cristian Freeling's game, of promotion to more queens, rooks, bishops and knights probably under the pretext that such material is more easily obtainable casually and more cheaply in the market. That is a big help. I will make such rules myself but not because it makes the game better (it does not make it worse and after you read the rules you would see why this practically cannot happen) and I'm not worried about the material as my way still requires plenty of physical pieces, which will make individual boards cheaper, nor will help or hinder eventual clubs who should anyway need to have extra boards with extra pieces. But as a respect for the reach history of the art of chess boards and pieces I will insert the following restrictions:
A player can have at a time a maximum of:
4 rooks
3 queens, knights, champions, siege elephants,mamelukes, wizards and bishops
2 griffins,marshals,archbishops and aancas
and as stated in a previous comment 1 joker
I had also decided to scrape the extra initial moves of the pieces starting on the bruhaha squares.
In his initial game of Bruhaha Greg Strong has done this in order to have extra opening possibilities.
But in these games it is not that needed. Only the champions has to suffer as he cannot jump to the 3rd rank during his first move. So maybe he will be moved twice in the opening :)!
Hello again folks,
While reading Fergus's "How to enforce rules in game courier" I rethought the idea of castling (which did not exist until now) in the 2 apothecary games. Even if the game starts with connected rook,s tucking the king to more safety while plunging the rooks into action seems a good extra choice. And I figured as the board is wider I could allow more options, and giving the fact that moving the king closer to the edge is usually more desirable I decided for two sub options in the closer to the middle castles. A specific choice of castling will be available only if the king path to it's destination will be unobstructed, the rook's path to it's destination is unobstructed by anything else than the king and both the rook to be moved and the king have not been yet moved; also the king needs not to cross a checked square in it's path :)!
The king's path is given by a diagonal step back towards the rook and the horizontal steps until destination.
The six castling options are:
1. King side long castle: The king moves (for white) through g1&h1 and lands on i1. The king side rook then jumps on h1.
2. Opposite side long castle: The king moves (for white) through e1&d1 and lands on c1. The king side rook then jumps on d1.
3. King side short castle: The king moves (for white) through g1 and lands on h1. The king side rook then jumps on g1.
4. Opposite side short castle: The king moves (for white) through e1 and lands on d1. The king side rook then jumps on e1.
5. King side short spread castle: The king moves (for white) through g1 and lands on h1. The king side rook then jumps on f1.
6. Opposite side short spread castle: The king moves (for white) through e1 and lands on d1. The king side rook then jumps on f1.
Actually there was an extra error. The first line did not end in semicolon. Now it does :)!
Tricky thing, is that after I have written the semicolon in the proper place, my tests yielded a zero for the first six times. "Lucky" I was confident enough and the 7,8 and 10th test were ones. And that's fine. I just wanted to point out the statistical peculiarity :)!
@Fergus
Ok, Got it!...
Sorry for the trouble :)!
@Fergus
Ok, Got it!...
Sorry for the trouble :)!
When you need the value of a variable in an expression, you have to prepend a # to its name or precede it with the var operator. In "if coun1", "coun1" just returns the string value "coin1". Likewise, in "if coin2", "coin2" just returns the value "coin2".
I did save it the way you suggested. The way it was was obviously wrong. The problem is still in the set instruction as far as I can see :(!
Yes, this was one of my later atempts, it does not work without the paratheses :)!
25 comments displayed
Permalink to the exact comments currently displayed.
That's correct. Thanks for saving me the trouble, Greg.