MBN Questions:
1) Turns out I didn't need it but how would one define a new leaper in MBN? i.e. does @L=(1,4) define a macro for a (1,4) leaper or would one need to define leaping chained leapers?
2) Does the repeated application of range operators give you the intersection of ranges? i.e. if you define @:RA:=[a-f]rR[a-f] is :RA:[f] equivalent to [a-f]rR[f]?
3) Do macros need to be defined above the lines that use them? Or could one put all the piece definitions on top and their helper macros beneath them?
If you want to push C/CIF to the limits the second point is useful in defining Hexagonal chess variants like Glinski's Hexagonal Chess. However since the natural projection of the hexboard onto an 11-11 square board creates a front-back asymmetry and the "slides" move asymmetrically when they cross the middle column you need to define 10 total pieces and lots of macros to avoid super long piece definitions. Even then piece moves are fairly long and aren't very intuitive unless you take out a cheat sheet, look at hexagonal move picture and trace your finger over the various equivalent moves.
https://en.wikipedia.org/wiki/Hexagonal_chess
http://www.chessvariants.com/hexagonal.dir/hexagonal.html
My hex projection onto 11x11 board cheat sheet: https://dl.dropboxusercontent.com/u/14129277/glinski_projected_to_square_board.jpg
Comment; promotion*=[11] FBR is redundant since [11] is last rank for black pawns.
:Glinskis-Hexagonal 11x11 -- 10
5a5/4eak4/3n1a1n3/2s5s2/1fffffffff1/11/5P5/4P1P4/3P1B1P3/2P2B2P2/1PRNQBKNRP1/ w -
b1=P c1=R d1=N e1=Q g1=K b7=F c8=S 9=A e10=E
royal promotion+=[a6,b7,c8,d9,e10,f11,g10,h9,i8,j7,k6] promotion*=[11] forbidden=[a11-e11,g11-k11,a10-d10,h10-k10,a9-c9,i9-k9,a8-b8,j8-k8,a7,k7]
@:RA:|\ diagonal rook move 1|=[a-f]rR[a-f]
@:RB:|\ diagonal rook move 2|=[a-f]lR[a-f]
@:RC:|\ diagonal rook move 3|=[f-k]rbB[f-k]
@:RD:|\ diagonal rook move 4|=[f-k]lfB[f-k]
@:RE:|/ diagonal rook move 1|=[a-f]frB[a-f]
@:RF:|/ diagonal rook move 2|=[a-f]blB[a-f]
@:RG:|/ diagonal rook move 3|=[f-k]rR[f-k]
@:RH:|/ diagonal rook move 4|=[f-k]lR[f-k]
@:RI:|white rook's \ diagonal moves|=:RA:+:RB:+:RC:+:RD:+(m(:RA:[f])--:RC:)+(m(:RD:[f])--:RB:)
@:RJ:|black rook's \ diagonal moves|=:RA:+:RB:+:RC:+:RD:+(m(:RC:[f])--:RA:)+(m(:RB:[f])--:RD:)
@:RK:|white rook's / diagonal moves|=:RE:+:RF:+:RG:+:RH:+(m(:RE:[f])--:RG:)+(m(:RH:[f])--:RF:)
@:RL:|black rook's / diagonal moves|=:RE:+:RF:+:RG:+:RH:+(m(:RG:[f])--:RE:)+(m(:RF:[f])--:RH:)
@R|white rook's moves|=|\ diagonal|:RI:+|/ diagonal|:RK:+|vertical|vR
@S|black rook's moves|=|\ diagonal|:RJ:+|/ diagonal|:BL:+|vertical|vR
@:BA:|sideways bishop move 1|=[a-f](frN)0[a-f]
@:BB:|sideways bishop move 2|=[a-f](blN)0[a-f]
@:BC:|sideways bishop move 3|=[f-k](brN)0[f-k]
@:BD:|sideways bishop move 4|=[f-k](flN)0[f-k]
@:BE:|\ diagonal bishop move 1|=[a-f]rbB[a-f]
@:BF:|\ diagonal bishop move 2|=[a-f]lfB[a-f]
@:BG:|\ diagonal bishop move 3|=[f-k](rbN)0[f-k]
@:BH:|\ diagonal bishop move 4|=[f-k](lfN)0[f-k]
@:BI:|/ diagonal bishop move 1|=[a-f](rfN)0[a-f]
@:BJ:|/ diagonal bishop move 2|=[a-f](lbN)0[a-f]
@:BK:|/ diagonal bishop move 3|=[f-k]rfB[f-k]
@:BL:|/ diagonal bishop move 4|=[f-k]lbB[f-k]
@:BM:|white bishop's sideways moves|=:BA:+:BB:+:BC:+:BD:+(m(:BA:[f])--:BC:)+(m(:BD:[f])--:BB:)
@:BN:|black bishop's sideways moves|=:BA:+:BB:+:BC:+:BD:+(m(:BC:[f])--:BA:)+(m(:BB:[f])--:BD:)
@:BO:|white bishop's \ diagonal moves|=:BE:+:BF:+:BG:+:BH:+(m(:BE:[f])--:BG:)+(m(:BH:[f])--:BF:)
@:BP:|black bishop's \ diagonal moves|=:BE:+:BF:+:BG:+:BH:+(m(:BG:[f])--:BE:)+(m(:BF:[f])--:BH:)
@:BQ:|white bishop's / diagonal moves|=:BI:+:BJ:+:BK:+:BL:+(m(:BI:[f])--:BK:)+(m(:BL:[f])--:BJ:)
@:BR:|black bishop's / diagonal moves|=:BI:+:BJ:+:BK:+:BL:+(m(:BK:[f])--:BI:)+(m(:BJ:[f])--:BL:)
@B|white bishop's moves|=|sideways|:BM:+|\ diagonal|:BO:+|/ diagonal|:BQ:
@A|black bishop's moves|=|sideways|:BN:+|\ diagonal|:BP:+|/ diagonal|:BR:
@:KA:|\ diagonal king moves 1|=[a-f](lfF+rbF)[a-f]+[f-k](rbN+lfN)[f-k]
@:KB:|\ diagonal king moves 2|=[a-f](sW)[a-f]+[f-k](rbF+lfF)[f-k]
@:KC:|/ diagonal king moves 1|=[a-f](lbN+rfN)[a-f]+[f-k](rfF+lbF)[f-k]
@:KD:|/ diagonal king moves 2|=[a-f](lbF+rfF)[a-f]+[f-k](sW)[f-k]
@:KE:|- sideways king moves |=[a-f](frN+blN)[a-f]+[f-k](brN+flN)[f-k]
@:NA:|knight moves 1|=[a-f](lfN+flN+rbN+brN)[-af]+[f-k](rfN+frN+lbN+blN)[f-k]
@:NB:|knight moves 2|=[a-f](blC+blZ+frC+frZ)[a-f]+[f-k](frC+frZ+blC+blZ)[f-k]
@:NC:|knight moves 3|=[a-f](lbZ+lbC+rfZ+rfC)[a-f]+[f-k](rfZ+rfC+lbZ+lbC)[f-k]
K=|\ diagonal|:KA:+:KB:+|/ diagonal|:KC:+:KD:+|sideways|:KE:+|vertical|vW
N=:NA:+:NB:+:NC:
Q|white queen|=R+B
R|white rook|=R
B|white bishop|=B
P|white pawn|=mfW+ce([a-e](lW+frF)+[f]fF+[g-k](flF+rW))+[b1,c2,d3,e4,f5,g4,h3,i2,j1]mfW02 +P==QRBN
E|black queen|=S+A
S|black rook|=S
A|black bishop|=A
F|black pawn|=ce+mfW+[5]mfW02 *F==ESAN
Actually the above omits some hexagonal moves since I forget to include the "mid-leap reflections" for example a white bishops one sideways move to the right from column e would be actually be rD (could then continue with brN0 moves). So for example would need to add +[e](rD+(rD--brN0)) and +[g](lD+(lD--blN0)) to the white bishops "sideways" moves.
Last edit: Trevor Davis 2016-09-14
Updated the setup for Glinksi's Hexagonal Chess (projected into a square board) with all the "mid-leap reflections" I missed. Kind of cool to see Dabbabah, Alifl, and Three-leaper movements popup in some piece's definitions besides the Camel, Zebra, Knight, Nightrider, Bishop, Rook, Ferz, and Wazir movements that were already there. Besides repeated ranges meaning an intersectiion of the ranges i.e. [a-f][f] being equivalent to [f] another thing that would simplify the definitions would be an operator (maybe 'u') that flips all f's to b and all r's to l (and vice versa). Then except for the pawns all the black pieces definitions would simply be the white definition with u applied to it i.e. :H:|Black horse|=u(N) and a person would only need to grok how the white piece's definitions worked. Unfortunately now only the King's movements are the same from both White and Black players perspective so one needs to define 11 pieces.
Last edit: Trevor Davis 2016-09-14
Although much more empty space then my projection his projection makes it
much much easier to specify and verify moves. I'll try in the next couple
days to redo the Glinski example using his projection.
You already defined the prefix notation (and included handy tables showing
which way to apply them) to allow specification of asymmetric base moves
i.e. frN specifies exactly one knight move which is different than the rfN
knight move. I used that feature heavily in my previous projection. I
think his projection makes things symmetric enough that we probably
wouldn't need separate black / white pieces.
Technically a FBR rule wouldn't be necessary for specifying and playing a
hexagonal game but could be useful to tell program to display a different
board (or at least color the relevant squares in a square board) or maybe
more importantly import/export a game log using a more traditional notation.
Definition of a base move is not yet possible, but from a mathematical point of view no problem, this can be added if really required.
The repeated range operator is not yet defined, but if needed, than an intersection is logical.
No, the order of the definition doesn't matter, example:
Here the macro definition of @R would use the macro defined with @B, so this definition is wrong, because @R wants to use the basic piece R.
About Hexagon chess:
Please visit Hexagonal Chess Notation, this page does not only provide a good notation system, it also provides a good idea how to realize piece descriptions.
For hexagonal chess a FBR "hexagonal=glinski" will do the implicit coordinate system mapping between a Glinksi board and a cartesian board. All we need is asymmetric base moves, currently all base moves are symmetric - leap(0,1)=leap(1,0). If we define asymmetric base moves, for example
then (according to 2.1.2 on this web page) a rook can be simply defined as R=D'x+F, and a bishop is B=D'y+C'x. But probably a better syntax style is needed.
An example using your existing MBN and his projection would be the definition for the Glinski bishop using a sideways Dabababarider and vertical Camelrider:
B=sD0+vC0
which is pretty concise. So no need for a B=D'y+C'x style definition, you already have sufficient notation.
What would be convenient but not need is an extension to the range definition to make it easy to specify triangles on the board and/or alternating squares so it would be less tedious to specify the forbidden places on the projected board. I guess the alternating "white" squares wouldn't technically need to be marked forbidden since pieces's moves and starting positions would be such they could never reach them but each of the four triangles on the outisde need to be marked forbidden so pieces don't "jump off the board".
Below is definition of Glinski's chess using DAlmeida's projection onto a square board
Notes:
1) Not entirely sure what hexagonal=glinski is supposed to do (could still play an equivalent game on a square board without it) but I included it.
2) The knight move need vertical (1,5) and (2,4) leaper moves. I used vg(C-D) for a vertical (1,5) leaper and vg(A-D) for a vertical (2,4) leaper. I assume the "-" chain would preserves direction in the correct way for the second dabbaba leap.
3) For forbidden FBR range I cheated and used shortcut terms like (a,k)(1-5,7) which I meant to be equivalent to a1-5,k1-5,a7,k7 and f(1-2,3) which should be eqivalent to f1-2,f3. Done canonically the forbidden range should be much longer (at least two times more characters).
4) I assumed that if I defined @R and @B macros then B R Q by themselves would use them and define the correct movements i.e. by default Q is a macro itself using the macros for R and B and since I have overwritten the R and B macros I will implicitly redefine Q.
Glinskis-Hexagonal
11x21 -- 6
5b5/4q1k4/3n1b1n3/2r5r2/1p7p1/2p5p2/3p3p3/5p1p5/6p6/11/11/11/6P6/5P1P5/3P3P3/2P5P2/1P7P1/2R5R2/3N1B1N3/4Q1K4/5B5 w -
f1=B e2=Q g2=K d3=N c4=R b5=P
royal hexagonal=glinski promotion=[a16,b17,c18,d19,e20,f21,g20,h19,i18,j17,k16] forbidden=[(a,k)(1-5,7,9,11,13,15,17-21),(b,j)(1-4,6,8,10,12,14,16,18-21),(c,i)(1-3,5,7,9,11,13,15,17,19-21),(d,h)(1-2,4,6,8,10,12,14,16,18,20-21),(e,g)(1,3,5,7,9,11,13,15,17,19,21),f(2,4,6,8,10,12,14,16,18,20)]
@R=B+vD0
@B=sD0+vC0
B R Q
K=D+F+vC
N=sC+vg(C-D)+vg(A-D)
@:TS:|squares pawn can do double move from|=[b5,c6,d7,e8,f9,g8,h7,i6,j5]
P=m(fD+:TS:fD02)+ceF +P==QRBN
Since I overote the Bishop macro the rook macro needs to use F0 instead of B i.e.
@R=F0+vD0
I added the chapters Extended Base Moves, and Pieces in Hexagonal Chess on page MBN. This chapters are linked with the pages Hexagonal Board and Board Identification.
To become more clear about hexagonal chess I examined various hexagonal chess variants. So I added some more than only Glinski.
Glinski Hexagonal
promotion= and forbidden= is no longer necessary, this can be computed.
Glinski has the following special:
Moreover in Glinski stalemate is a win.
Brusky Hexagonal
De Vasa Hexagonal
McCooey Hexagonal
Shafran-Hexagonal
Starchess
Here the start position is arbitrarily chosen, but I need one for the control position. In this variant the promotion zone must be specified, because the computed zone is too large here.
Last edit: Gregor Cramer 2016-09-21
The pawn double step move shouldn't be prefixed with an "i", a pawn at their initial position who makes a diagonal capture to another pawn's initial position can still make that move even though it isn't their own original position so it isn't always a first move.
So should instead be P=mfD+[b5,c6,d7,e8,f9,g8,h7,i6,j5]mfD02+ceF
Not sure if the default promotion zone is as unambiguous as you hoped. If by default promotion can occur in the last non-forbidden rank of each column then the right-most white pawn in De Vasa's hexagonal chess can promote right away. If by default promotion can only occur in the last rank then Glinksi hexagonal chess pawns can only promote in column f.
Could be nice to add add links to these in the table at the top of the Chess Variants page. In that section the first sentence is a little unclear, could be "Note that not all chess variants use the standard chess piece set (so)"
I double checked the paths in the Board Identification for Glinski-Hexagonal and DeVasa-Hexagonal using your Board Identification notes.
Yes, corrected.
You're right, I've added the little chapter Default Promotion Zone.
Done.
Thanks, I've marked Glinski-Hexagonal as "verified".