SjaakII 1.0 RC1

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

myfish
Posts: 131
Joined: Sat Feb 07, 2015 3:17 pm

Re: SjaakII 1.0 RC6

Post by myfish »

hgm wrote:
myfish wrote:
hgm wrote: [Edit] OK, I see you already solved it.
+L points to 'Knight' also, argh...

That means my Swallows Wings --> Gliding Swallow can't work.
A yes, the famous 'White Horse' to which the Lance promotes...

Just make sure you do not use any pieces that are not used in Chu (i.e. N/+N, G/+G, +Q, S/+S). In Chu all piece glyphs are different (after banning S/+S). Then you have 17 promotable pieces available, (and their promotions), plus 4 unpromotable (S, Q, Ln and K). That should be just enough for Wa.
I will try.
I must add though, N/+N is working though could be causing issues and I've had no issues with G/+G.

Are you suggesting, using these at all, could be making J/+J and V/+V have problems too as both of those point to already used pieces too. I'm not using +Q, just Q, nor S/+S

I will try another re-shuffle.

I was simply working from your char table.
myfish
Posts: 131
Joined: Sat Feb 07, 2015 3:17 pm

Re: SjaakII 1.0 RC6

Post by myfish »

it's like a house of cards, you move one, break 3 more.
I must have reconfigured 50% of the pieces...

I might be getting closer but THERE has to be a better way.
No sleep tonight till I crack this nut.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC6

Post by Evert »

myfish wrote:it's like a house of cards, you move one, break 3 more.
I must have reconfigured 50% of the pieces...

I might be getting closer but THERE has to be a better way.
No sleep tonight till I crack this nut.
All you need to do is shuffle them around in the pieceToChar table, right?
myfish
Posts: 131
Joined: Sat Feb 07, 2015 3:17 pm

Re: SjaakII 1.0 RC6

Post by myfish »

Evert wrote:
myfish wrote:it's like a house of cards, you move one, break 3 more.
I must have reconfigured 50% of the pieces...

I might be getting closer but THERE has to be a better way.
No sleep tonight till I crack this nut.
All you need to do is shuffle them around in the pieceToChar table, right?
LOL, no.
I have to rename loads of pieces and, in the last half hour, make a new piece.
I wish it was that easy though.

When a piece gets pointed to one already in use, it seems to almost shift the stack. How I don't know but, change 1 piece, like I changed N and +N and named the pieces under the new PTCT. Yes, those pieces DID load, and promote but, 2 other pieces then changed their armour too.
At one juncture, I had 3 of the 'same' pieces on the board. It was odd so, I worked from the beginning, ditched S/+S, G/+G and L/+L and didn't use +Q as advised. However, D is out too.

So, I utilised A/+A, V/+V and J/+J. This shifted everything again and V pointed to a previously 'promoted piece' !

However...

I looked again at the naming convention and with regards to the landmine map written by hgm, I looked and looked and for over an hour, one piece was simply stuck in limbo.

There was no piece in the chu folder, nor the default folder and, as a consequence, I think that fact was part of the issue all along. I made a new blank piece, White/BlackPhoenix and BOOM, with one more piece rename, everything was where it was supposed to be. All promote too thankfully but what a 'nightmare'.

But...

This Wa config, for all the effort and headaches I've caused you guys has taught me loads. I've been keeping revisions for a start (massive help) and, I've learned much more about sjaakii's config language.

And, I've pretty much learned already, 75% of the WaShogi kanji off by heart as I've seen them so many times.

I'll take a fresh look tomorrow BUT, as it stands, I'm pretty sure this is close to being ready to play. When that time comes, I'll zip up the 'theme file', svg's, backgrounds and the config for sjaakii.

Now, whilst I have your attention...

Kyoto ?
Can we define zones in sjaakii so a piece promotes, and demotes in perpetuity. Move promote, move demote, move promote across the 'whole board' Only the king doesn't.

I see sjaakii has mechanisms for promote and demote and, definable zones so, can it be done ?

I would like this, to be my 'next' project in sjaakii
But, if not, I'll do Tai...

LOL

In a few years.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC6

Post by Evert »

myfish wrote: Kyoto ?
Can we define zones in sjaakii so a piece promotes, and demotes in perpetuity. Move promote, move demote, move promote across the 'whole board' Only the king doesn't.
Yes, I believe so: make promotion on every move mandatory and set pieces to promote to eachother in pairs.
Caveat: it can't be done with Shogi promotion rules (you can have a piece called G promote to +G (=N) but you can't have a promotion from +G to G), unless I make a change that would force promotion of a promoted piece to demote it instead.
I see sjaakii has mechanisms for promote and demote and, definable zones so, can it be done ?
It doesn't have demotion zones, but with pieces promoting to each other this shouldn't be a problem.

This, however, is:
http://en.wikipedia.org/wiki/Kyoto_shogi wrote: A captured piece may be dropped with either side facing up.
This would require a special rule that pieces may promote when they are dropped. Not a big issue, but it is a minor hassle.
Expect XBoard to complain too if you try to drop G while all you had in hand was N: it doesn't know where the G came from, and it doesn't know to remove the N from holdings.
User avatar
hgm
Posts: 28513
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: SjaakII 1.0 RC6

Post by hgm »

myfish wrote:LOL, no.
I have to rename loads of pieces and, in the last half hour, make a new piece.
I wish it was that easy though.
It IS easy. You are just making it difficult. You should first have made sure that it worked with the default theme. There wouldn't have been any renaming, or in fact naming at all, as this would only use existing images with existing names. It would be, as Evert states, just shuffling pieces in Sjaak's pieceToChar string for this variant untill all pieces were different.

So the recommended way is this: start XBoard in -ncp mode, and select Chu (with the default theme, so no @chu!). Go to Edit Position mode to set up the Wa positon in the lower-left 11x11 corner of the board by shuffling Chu pieces, using Q and Ln for pieces that do not promote (so Eagle and Fox). Once you have a setup that works, you just rename your kanji images, which you created with names convenient for you (e.g. SO.svg for Swooping Owl) to the name XBoard uses for the default glyph that you had chosen to represent Swooping Owl in the default theme.

To know how the promoted version of a piece looks, select it, and then left-click it again, (not too fast, so that it is not mistaken for a double-click), in Edit Position mode. This will promote promotable pieces. You can then seehow that glyph was called in the default rtheme folder, and rename your promoted kanji SVG you want to use for it to that.

Note that at this point your kanji theme folder is completely finished, while you haven't even involved Sjaak or touched any pieceToCharTable. You could do that now by assigning applicable IDs to the glyphs you used.

Btw, yesterday evening I programmed Wa in HaChu. I also had to provide a pieceToChar assignment there, for printing the setup command. The official Wa naming is horrible for getting one-letter IDs, as too many pieces are called Falcon, and are Flying or Violent, so that it is almost impossible to pick sensible IDs for them. In addition many of the standard pieces now occur under obscure names. And multiple versions of the same piece need different names, because they promote differently.

So I figuered that when I was forced to pick IDs that not obviously related to the names, I might as well pick the default ID for a piece that moved like that. Like L for Lance, which goes here under the name 'Oxcart', G for Gold (Violent Wolf) etc. Only for pieces unique to Wa I picked IDs that had some relation to the Wa name. That produced the following FEN for the Wa initial setup:

hmoiskgcadl/1e3w3f1/ppprpppxppp/3p3p3/11/11/11/3P3P3/PPPXPPPRPPP/1F3W3E1/LDACGKSIOMH w - 0 1

KGSCLP have their usual meaning as to piece move (King, Gold Silver, Copper, Lance, Pawn). Owl, Dog, Monkey, (Liberated) Horse, (Flying) Falcon, Eagle, Wings and Rabbit could each get their starting letter, Fox could get the X. FlyIng Cock would get I, and Struting Crow A (because that looks somewhat like its move pattern). The promoted typesgo of course by the ID of their base type with a + prefix.

Perhaps we could do a better jub by using primed characters, like O for Oxcart and O' for Owl, W for Wolf and W! for Wings, etc. But I don't know if Sjaak already supports this in its FEN parser.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: SjaakII 1.0 RC6

Post by Evert »

hgm wrote: Perhaps we could do a better jub by using primed characters, like O for Oxcart and O' for Owl, W for Wolf and W! for Wings, etc. But I don't know if Sjaak already supports this in its FEN parser.
It does not.
User avatar
hgm
Posts: 28513
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: SjaakII 1.0 RC6

Post by hgm »

Evert wrote:Expect XBoard to complain too if you try to drop G while all you had in hand was N: it doesn't know where the G came from, and it doesn't know to remove the N from holdings.
Hmm, yes. But I guess it is like you say: this is just a drop move that promotes. So it would make sense to also write it as such, e.g. P@c3=G, (P@c3g in LAN), telling XBoard that a Pawn was dropped from the holdings, but appeared on the board as Gold.

Demotion on capture would be a problem, though. Currently XBoard would only properly demote pieces that are defined as + in the pieceToCharTable, and would demote to Pawn what does not fit after that. Crazyhouse depends on the latter behavior. But of course in Crazyhouse the promoted types are configured as ~, so I could make the behavior dependent on that, rather than default. Then the default behavior for non-fitting pieces could be to shogi-demote, even if there was no + for the promoted piece.

There still is the problem that the usual X/+X pairing does not work in Kyoto; P does not promote to +P, there, but to Rook, while Lance promotes to +P there rather than +L, and +P promotes to Lance... That means you will have to assign different XBoard internal piece types to the various pieces, and would need to use external piece images, as the default theme now would look completely non-sensical (e.g. using crossed swords for Pawn, and a the turban for Rook). But they could just be a set of renamed images from other themes.
Evert wrote:
hgm wrote: Perhaps we could do a better jub by using primed characters, like O for Oxcart and O' for Owl, W for Wolf and W! for Wings, etc. But I don't know if Sjaak already supports this in its FEN parser.
It does not.
This is what I figured. And there are enough letters in the alphabet to handle Wa. Just not to always pick one that perfectly corresponds to the name. The English names seem rather liberal translations of the Japanese kanji: the second kanji in Swooping Owl and Strutting Crow is that of 'Mover' (as in 'Angle Mover' for Bishop, Vertical and Side Mover of Chu, Hook Mover of the large variants...) So where the 'Strutting' and 'Swooping' came from is a bit mysterious.

Perhaps there is a naming that more closely follows the English naming, when we abandon the usual meaning for GSCL:

C = Strutting Crow (now A)
G = flying Goose (Copper)
W = Violent Wolf (Gold)
S = Swallow's Wing (now W)
V = Violent Stag (Silver)
L = Flying Cock (now I)
X = Oxcart (Lance)
T = Treacherous Fox (now X)

I sort of dislike when piece IDs do not have their usual meaning, but I also did use S for Pawn, F for Elephant in Tori (and hated it ever since), so it might be better to stay consistent.
Last edited by hgm on Fri Mar 13, 2015 10:03 am, edited 1 time in total.
myfish
Posts: 131
Joined: Sat Feb 07, 2015 3:17 pm

Re: SjaakII 1.0 RC6

Post by myfish »

hgm wrote:
myfish wrote:LOL, no.
I have to rename loads of pieces and, in the last half hour, make a new piece.
I wish it was that easy though.
It IS easy. You are just making it difficult. You should first have made sure that it worked with the default theme. There wouldn't have been any renaming, or in fact naming at all, as this would only use existing images with existing names. It would be, as Evert states, just shuffling pieces in Sjaak's pieceToChar string for this variant untill all pieces were different.
Oh yes, highly likely. However, be fair, there were a few undocumented pitfalls.
hgm wrote:So the recommended way is this: start XBoard in -ncp mode, and select Chu (with the default theme, so no @chu!). Go to Edit Position mode to set up the Wa positon in the lower-left 11x11 corner of the board by shuffling Chu pieces, using Q and Ln for pieces that do not promote (so Eagle and Fox). Once you have a setup that works, you just rename your kanji images, which you created with names convenient for you (e.g. SO.svg for Swooping Owl) to the name XBoard uses for the default glyph that you had chosen to represent Swooping Owl in the default theme.
I actually did this in the end. I moved my 'wa' folder out of the way. This is when I found the 'stuck piece' and the out of syncing. The moment I created a 'White/BlackPhoenix, other pieces fell into place which was astonishing as it seemed to shift pieces, if that is the right terminology to their respective slots.

So the point now, before we move on, is, as you have wa enabled hachu (awesome btw), are our FEN's compatible ?

Likely, NO..

I think I must take the time to make pix maps of at least one size so as winboarders can use these configs. Some are actually really good.
hgm wrote:To know how the promoted version of a piece looks, select it, and then left-click it again, (not too fast, so that it is not mistaken for a double-click), in Edit Position mode. This will promote promotable pieces. You can then seehow that glyph was called in the default rtheme folder, and rename your promoted kanji SVG you want to use for it to that.
This is what I do, or did when I got back to basics. This was were the piece that didn't exist (yet), caused so many problems.
hgm wrote:Btw, yesterday evening I programmed Wa in HaChu. I also had to provide a pieceToChar assignment there, for printing the setup command. The official Wa naming is horrible for getting one-letter IDs, as too many pieces are called Falcon, and are Flying or Violent, so that it is almost impossible to pick sensible IDs for them. In addition many of the standard pieces now occur under obscure names. And multiple versions of the same piece need different names, because they promote differently.
Remember too, I did suggest 'strings' or '2pc variables' for the ChartTable before. The problem as I see it, is without the relevant svg pieces, the game makes NO SENSE as few of the pieces relate to the existing character table names
So I figuered that when I was forced to pick IDs that not obviously related to the names, I might as well pick the default ID for a piece that moved like that. Like L for Lance, which goes here under the name 'Oxcart', G for Gold (Violent Wolf) etc. Only for pieces unique to Wa I picked IDs that had some relation to the Wa name. That produced the following FEN for the Wa initial setup:
How are you using L for Oxcart ? That piece promotes. I did have G for Violent Wolf, that promotes too but you told me not to use G/+G either ?

hmoiskgcadl/1e3w3f1/ppprpppxppp/3p3p3/11/11/11/3P3P3/PPPXPPPRPPP/1F3W3E1/LDACGKSIOMH w - 0 1
hgm wrote:]KGSCLP have their usual meaning as to piece move (King, Gold Silver, Copper, Lance, Pawn). Owl, Dog, Monkey, (Liberated) Horse, (Flying) Falcon, Eagle, Wings and Rabbit could each get their starting letter, Fox could get the X. FlyIng Cock would get I, and Struting Crow A (because that looks somewhat like its move pattern). The promoted types go of course by the ID of their base type with a + prefix.

Perhaps we could do a better jub by using primed characters, like O for Oxcart and O' for Owl, W for Wolf and W! for Wings, etc. But I don't know if Sjaak already supports this in its FEN parser.
So, your char table/fen is fixed now right? or how can you be using L/+L etc ?
IF this is set in stone now, I can re-shuffle my svg's and, hopefully, sjaakii can play hachu.

I won't move anything around until you have solidified your table. I do however have a piece for everything and, everything in it's place right now and, it plays OK.
User avatar
hgm
Posts: 28513
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: SjaakII 1.0 RC6

Post by hgm »

Nothing is set in stone, see also the edit of my previous post. I just had to make a choice to be able to proceed. We definitely should sync this. This is why I also did not push the Wa-capable HaChu yet.

When the FEN shows I used IDs L for Oxcart and M for Monkey, that doesn't tell anything about what XBoard pieces I used for those. This would be determined by the position in which the appear in the pieceToCharTable, and I did not post the latter. So it could very well be that (in the default theme) L looks like a Pawn, and M looks like a Queen.

But that is of course not what I did; L does indeed look like a Lance (which has ID L in the default pieceToCharTable of variant fairy). But M looks like a Leopard (I have no monkey glyphs yet), which is the image used in Chu for the piece that has ID U in fairy, and uses the Unicorn image there to make it extra confusing through variant-dependent image shuffling). In any case it does not look like the helmet used to represent the piece that has ID M in fairy.

But I don't know what problems you perceive with using L/+L. OK, the +L uses the Knight image in the default theme, which is not very applicable to a Plodding Ox, neithere name-wise or move-wise (as it moves as a King). But I did not use the Knight, so it is still a unique image, and a special Wa theme could make White/BlackKnight.svg look like an Ox.