Ratings & Comments
I've added an example, I will do more when I am back home
It seems to work for me: I get a 'Pao version' of the Gryphon. Can you give an example of a constellation of pieces where it doesn't work?
Then there is a bug in the XBetza sandbox
EDIT: Here is the piece at the computer I'm currently using
No, it would not. Betza atoms never describe null moves (unless one would have defined an atom especially for that), and even if the number of steps is variable, such as in B or R, it must at least make one step and cannot stay in place. The use of the 'a' modifier to define multiple legs doesn't alter that: each leg must at least take 1 step (and if it is a leaper leg, that would be the only step). All the moves you specified are bent two-leg moves, (they have 'fs' after the 'a'), and a Rook move isn't.
BTW, I would use gafscF instead of pafscB1; 'g' describes a range-toggle after hop, as in the Grasshopper (slide -> leap) or Contra-Grasshopper (leap -> slide). What you wrote should also work, but is a bit more cryptic. gafscF means an F step to the mount, followed by a Rook slide that can only capture.
I would advise you to move away from using the chess include file to using the fairychess include file. The former is optimized for Chess, while the latter is designed to make it easier to adapt to other Chess variants.
does anyone know why mFyafsmFpafscB1yafscpF also gives the rook squares as capture squares?
So far I have tried this code for fast castling but it seems I'm far from the truth :)! I even have a misplaced return error I can't see!
sub castle;
local ATTACKED RPOS xdir;
if not flag #from:
die A King may not castle after it moves.;
endif;
if capture:
die A King may not castle to an occupied space.;
endif;
set ATTACKED ATTACKEDBYW unless isupper moved ATTACKEDBYB;
if fn var ATTACKED #from:
die A King may not castle out of check.;
endif;
set xdir minus file #to file #from;
if not checkaleap #from #to #xdir 0:
die A King may not castle there;
endif;
if sign minus file #to file #from:
if rank #to 1:
set RPOS a1;
else:
set RPOS a8;
endif;
else
if rank #to 1:
set RPOS j1;
else: set RPOS j8;
endif;
endif;
if not flag #RPOS:
die A king may not castle with a rook that moved;
endif;
move #RPOS #from;
unsetflag #from, #RPOS;
return true;
endsub;
@ Greg:
1) Now that the setup for Opulent Chess has been changed from the original, are there definite plans to change the preset to match the new setup anytime soon?
2) On the piece values offered, the one for the Archbishop being 7.5 (and Q=10) stands out. Does the table of values entirely concur with what Betza himself might have calculated for the piece values of Opulent Chess, for on 10x10, with the given armies in the setup?
wouldn't a 8th nightrider be possible which goes left-right for both vertical and horizontal moves?
I've asked Mayhematics on twitter about the banshee piece
Edit: I've got an answer, he thinks the name was his (George Jelliss) idea@Greg & @Fergus
For now I could not do a fast castle routine by trying the replace the regular routine. I think it is better to start from scratch as this type of castling is less restrictive anyway. I'll try again later.
For reference fast castling involves leaping the king at least 2 spaces towards the rook (regardless of any hindrance) and the rook in the initial king place.
A pseudocode would involve the following steps:
1. Check for the flags (here I have some trouble as I have to work with regular code)
2. Check if the king is in check (copy paste from regular routine)
3. Check if the space if free and 2 squares far
4. Move the king
5. Move the rook
For now I have a few slips but maybe I can do it!...
I'm working on adding piece descriptions to the fairychess include file. One reason for this is to help programmers using the include file find the code for the pieces they want. But instead of putting them into comments, I am creating strings that can be used in error messages to remind players how a piece moves. I started with the Chess pieces while I took the time to hone the code for displaying the messages. The strings use "%s" instead of the piece name in case someone renames a piece. I had thought of using printf, but I ended up using str_replace, which I added to the language. Like the PHP str_replace, its arguments are search, replace, and string.
For reasons unknown, the host went down for almost three hours today. I compensated interrupted games by three hours.
Wikipedia mentions a Banshee (BNN) piece type on more than one occasion. Here's one link:
https://en.wikipedia.org/wiki/Talk%3AFairy_chess_piece#Fairy_piece_values
Long ago (I think I then even mentioned this on CVP), the wiki on fairy chess pieces mentioned the Banshee (BNN) but apparently it has been largely edited out. The only mention of the Banshee currently (that I can see) is that it is sometimes given as another name for a Unicorn - this is said under the Unicorn entry (the one for (3D) Raumschach), which is a bit misleading since earlier elsewhere (before the edit I referred to) the Banshee had been explicitly given as BNN.
Pocket Mutation Chess calls this piece a Cardinalrider.
I have added to the fairychess include file the Shogi and CWDA pieces that weren't already in it.
Yes, Greg! That was what I was trying to say!
The hyphen is in Spider-rider to separate the two adjacent r's.
Since I am updating the GC presets for Opulent anyway for the new array, I am going to modify it to use the new fairychess include file. To that end, I modified the include file to add a few new pieces. I added Half_Duck and Knight_Wazir since Opulent requires those. While I was at it, I added the three new pieces for Kevin's games that Aurelian has been working on: Elephant_Ferz, Elephant_Wazir, and Frog.
For reference, here are all the pieces currently supported by the fairychess include file (the notes in parenthesis are not part of the actual name):
Queen
Rook
Knight
Bishop
King
White_Pawn
Black_Pawn
White_Berolina_Pawn
Black_Berolina_Pawn
Cardinal (BN)
Marshall (RN)
Amazon (BRN)
Cannon
Vao
Wazir
Ferz
Camel
Camelrider
Dabbabah
Dabbabahrider
Elephant
Elephantrider
Nightrider
Dragon_Horse (BW)
Dragon_King (RF)
Eques_Rex (NFW)
Wizard (CF)
Champion (WDF)
Korean_Elephant
Chinese_Elephant
Giraffe (4,1 leaper)
Grasshopper
Short_Rook (R4)
Squirrel (NAD)
Spider (DA)
Spider-rider (DDAA)
Squire
Unicorn (BNN)
Zebra
Elephant_Ferz (FA)
Elephant_Wazir (WA)
Half_Duck (HFD)
Knight_Wazir (NW)
Frog (FH)
Griffon
Aanca
Leo (Cannon + Vao)
Mao
Moa
Murray_Lion
One small nit-pick, the Spider-rider has a dash while the other riders do not. Any objections if I correct this inconsistency?
I have removed $countextrasas from the system variables. It was not used in any settings file, and I could not figure out what it was for. My comments on it were not informative enough. I commented out the code that used the variable, since it appeared to be useless.
I am deprecating the use of global and setglobal as aliases for system and setsystem. I would like to eventually eliminate these from the language, since global variables have a different meaning in the language.
I have limited the power of the system built-in function. While it had prevented people from viewing a password with it, it did allow you to enter "system GLOBALS" to view all the variables, which could be a big security risk. I changed it to return values only from a whitelisted set of system variables. These correspond to the same ones that may be set with setsystem.
I introduced the use of the dollar sign as a system variable designator. When appearing at the beginning of a variable name, it will return the value of the corresponding system variable if it has been whitelisted. I also added support for $old and $moved, which return the values of $lastcaptured and $lastmoved. Since the dollar sign is also the designator for PHP variables, it is basically a way to get the values for some of the PHP variables with the same name. You may also think of the S in $ as standing for system.
Game Courier is already set up to recognize old, moved, origin, and dest as values of system variables, but I don't like this, because it prevents these from being used as ordinary words, and it might make the code more confusing if you don't already know their meaning. The use of $old, $moved, $origin, and $dest should now be preferred, though I can't phase out the old way without rewrting lots of code. I have at least made the changes in the new fairychess settings file for Chess, so that they can be used going forward.
I think we are miscommunicating by using the wrong name. Kevin's game does not have "Free Castling", but "Fast Castling", which is something new. (Castling can occur even with pieces in the way.) So I think it requires new code. Aurelian, give it a shot but if you can't get it working let me know and I will give it a try.
All right thanks, for the tip. I'll keep it in mind! And for everything else!
25 comments displayed
Permalink to the exact comments currently displayed.
Yes, I will be updating the GC presets. I just want to modify them to use the new fairychess include file while I'm at it and did not get that finished last weekend. But we have a 3-day weekend coming up so it should get finished.
That table of piece values is quite old so I wouldn't put any stock in it. Probably doesn't match at all with what I am currently using in ChessV (which gets updated more often.) The Archbishop is too low probably because I was relying on Betza's logic which significantly undervalues it, but I would not claim that these values are what he would have calculated. Also, the table shows the value of sliding pieces going up in the endgame, which made sense since there are less obstructions, but seems to not actually be true in most cases. (The value of the Pawn going up is true, though.)