ChessV 2.0 - open source GUI and engine for chess variants

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

Moderators: hgm, Rebel, chrisw

User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: ChessV 2.0 - open source GUI and engine for chess varian

Post by Greg Strong »

hgm wrote:Well, what can you expect of a game that was not designed, but instead has rules dictated by the accidental implementation of the check test on a server?
Well, when you put it that way, not much :lol:

Too bad, because its an interesting idea
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: ChessV 2.0 - open source GUI and engine for chess varian

Post by Greg Strong »

Evert wrote:
Greg Strong wrote: I'm also surprised that SjaakII was working for you. The older versions used to work perfectly, but I couldn't get the new version to work correctly. It was ignoring 'force' moves and playing the wrong side and such. It was very strange. That's something I really want to get figured out because I want to distribute SjaakII along with ChessV.
You and me both; a few people have reported problems with SjaakII, but it seems to work fine for others. I haven't been able to reproduce the problem myself (under Wine), or, in cases where I did run into issues, I could fix them for myself but then it didn't do anything under actual Windows.

You say the older versions worked, but the new one doesn't. If you have the time, could you verify that 1.3.1 works and 1.4.1 does not (the download links for the older versions are still available if you need them)? Thanks!
Ok, did a quick test. Capablanca chess, SjaakII playing black (human white, playing f4.) The version where it seems to break is 1.3.1a. 1.3.0 works fine, from 1.3.1a on, it doesn't.

Here's the log. It never responds to "go":

Code: Select all

>Sjaak II 1.3.1a(8): xboard
>Sjaak II 1.3.1a(8): protover 2
<Sjaak II 1.3.1a&#40;8&#41;&#58; Sjaak II version 1.3.1a &#40;x86_64&#41;
<Sjaak II 1.3.1a&#40;8&#41;&#58; Type 'help' for a list of commands and help topics
<Sjaak II 1.3.1a&#40;8&#41;&#58;  8r n b q k b n r 
<Sjaak II 1.3.1a&#40;8&#41;&#58;  7p p p p p p p p 
<Sjaak II 1.3.1a&#40;8&#41;&#58;  6                
<Sjaak II 1.3.1a&#40;8&#41;&#58;  5                
<Sjaak II 1.3.1a&#40;8&#41;&#58;  4                
<Sjaak II 1.3.1a&#40;8&#41;&#58;  3                
<Sjaak II 1.3.1a&#40;8&#41;&#58;  2P P P P P P P P 
<Sjaak II 1.3.1a&#40;8&#41;&#58;  1R N B Q K B N R *
<Sjaak II 1.3.1a&#40;8&#41;&#58;   a b c d e f g h 
<Sjaak II 1.3.1a&#40;8&#41;&#58; #&#91;Chess&#93; 0w>
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature setboard=1 time=1 sigint=0 colors=0 highlight=1 ping=1 memory=1 analyze=1 pause=1 nps=1 myname="Sjaak II 1.3.1a" myversion="&#91;1.3.1a &#40;x86_64&#41;&#93;" variants="fide_chess,wolves_and_sheep,maharaja,...,normal"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted setboard
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted time
>Sjaak II 1.3.1a&#40;8&#41;&#58; rejected sigint
>Sjaak II 1.3.1a&#40;8&#41;&#58; rejected colors
>Sjaak II 1.3.1a&#40;8&#41;&#58; rejected highlight
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted ping
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted memory
>Sjaak II 1.3.1a&#40;8&#41;&#58; rejected analyze
>Sjaak II 1.3.1a&#40;8&#41;&#58; rejected pause
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted nps
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted myname
>Sjaak II 1.3.1a&#40;8&#41;&#58; rejected myversion
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted variants
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Variant fairy selects -combo chess &#40;8x8+0&#41; /// seirawan &#40;8x8+0&#41; /// shatar &#40;8x8+0&#41; /// makruk &#40;8x8+0&#41; /// shatranj &#40;8x8+0&#41; ... &#91;Moderated away to not spoil thread layout&#93;
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Mate search -combo Disabled /// *Enabled for drop games /// Enabled"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Level -combo Clueless /// Random /// Static /// *Normal"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="MultiPV -spin 1 1 256"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Draw offer threshold -spin 0 0 1000"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Moves before draw offer &#40;0 to disable&#41; -spin 0 0 1000"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Resign threshold -spin 500 100 16000"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Moves before resigning &#40;0 to disable&#41; -spin 0 0 1000"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Randomise opening moves -spin 10 0 40"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Random amplitude &#40;0 to disable&#41; -spin 20 0 100"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Send 'piece' descriptions -check 1"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Mark holes in board -check 1"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="List user-defined variants before buildin variants -check 1"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Report fail low -check 0"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Report fail high -check 0"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Claim repetitions -check 1"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Send O-O/O-O-O for castling -check 1"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Variant 'normal' is -string chess"
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Set variant alias -string "
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature option="Variant configuration file -file "
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted option
<Sjaak II 1.3.1a&#40;8&#41;&#58; feature done=1
>Sjaak II 1.3.1a&#40;8&#41;&#58; accepted done
>Sjaak II 1.3.1a&#40;8&#41;&#58; new
>Sjaak II 1.3.1a&#40;8&#41;&#58; variant capablanca
>Sjaak II 1.3.1a&#40;8&#41;&#58; level 0 1 0
>Sjaak II 1.3.1a&#40;8&#41;&#58; post
>Sjaak II 1.3.1a&#40;8&#41;&#58; easy
>Sjaak II 1.3.1a&#40;8&#41;&#58; force
>Sjaak II 1.3.1a&#40;8&#41;&#58; f2f4
>Sjaak II 1.3.1a&#40;8&#41;&#58; ping 5
<Sjaak II 1.3.1a&#40;8&#41;&#58; pong 5
>Sjaak II 1.3.1a&#40;8&#41;&#58; time 6000
>Sjaak II 1.3.1a&#40;8&#41;&#58; otim 5420
>Sjaak II 1.3.1a&#40;8&#41;&#58; go
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: ChessV 2.0 - open source GUI and engine for chess varian

Post by Evert »

Greg Strong wrote: Ok, did a quick test. Capablanca chess, SjaakII playing black (human white, playing f4.) The version where it seems to break is 1.3.1a. 1.3.0 works fine, from 1.3.1a on, it doesn't.

Here's the log. It never responds to "go":
Ok, thank you! This is useful (the version information perhaps more so than the log). There are a number of changes between 1.3.0 and 1.3.1 related to either input or Windows, the latter to make things compile using MSVS 2015.
I suspect the change in compiler has nothing to do with it, so it might have to do with the way input is handled. I'll try reverting those and getting a compile to test with.

Thanks!
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: ChessV 2.0 - open source GUI and engine for chess varian

Post by Greg Strong »

Ferdy wrote: I created a site dedicated to engines that can play makruk here.
https://sites.google.com/view/makruks/home
Is it standardized what the notation of the pieces is? Most importantly, when an engine is announcing a pawn promotion, should it be Q for Queen or M for Met?
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: ChessV 2.0 - open source GUI and engine for chess varian

Post by Ferdy »

Greg Strong wrote: Is it standardized what the notation of the pieces is? Most importantly, when an engine is announcing a pawn promotion, should it be Q for Queen or M for Met?
From winboard:

Code: Select all

62. h6=M &#123;+0.07/32 0.9&#125;
For engine in long algebraic notation it can be h5h6m
Also for winboard:
Bishop/Khon is S, Queen/Met is M.

In playok online server they are using:
Khon as B and Met as Q, promoted pawn becomes P.

Code: Select all

&#91;Event "?"&#93;
&#91;Site "kurnik"&#93;
&#91;Date "2017.03.14"&#93;
&#91;Round "-"&#93;
&#91;White "WW"&#93;
&#91;Black "BB"&#93;
&#91;Result "1-0"&#93;
&#91;Time "16&#58;18&#58;39"&#93;
&#91;TimeControl "600"&#93;
&#91;WhiteElo "2181"&#93;
&#91;BlackElo "1645"&#93;

1. Qd2 c5 2. e4 d5 3. Qe3 Nc6 4. Ne2 Qc7 5. exd5 exd5 6. Nd2 Nge7 7. d4 Qd6 8.
Bf2 Na5 9. h4 c4 10. bxc4 dxc4 11. Ne4 Qe5 12. dxe5 fxe5 13. h5 g5 14. f4 gxf4
15. gxf4 exf4 16. Nxf4 Bc7 17. Ng6 Nxg6 18. hxg6=P Be7 19. Ke2 Kd7 20. Bc2 Bcd6
21. Rad1 Raf8 22. Bf3 Kc7 23. Rh5 Nc6 24. Pf5 Bf6 25. Nxd6 1-0
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: ChessV 2.0 - open source GUI and engine for chess varian

Post by hgm »

Because Thai uses a different script there did not seem to be an official notation in Latin characters that could be used. In the related ASEAN Chess they just use KRBNQP. It seemed best to just keep the Chess IDs for the pieces that Makruk and Chess have in common. So that left Met and Kohn. To westerners the Thai names would be meaningless, and the litteral translations were not very inspiring ('Nobleman' and 'Seed'). So I picked S for Kohn because it moves like the Silver general in Shogi, and Silver did not seem a bad western name for it. (Note that names of Chess pieces in different languages are hardly ever literal translations of each other; e.g. a Bishop is indicated by words that mean Runner (German), Fool (French), Elephant (Russian)...) For the Met I stuck with 'M'. Perhaps 'F' for Ferz would have been a better choice, but to most orthodox Chess players the word Ferz is just as meaningless as Met. So perhaps I should have used 'A' for Adviser, to stay in line with Xiagqi (the most popular Chess variant using this piece). But I associate Advisers so much with Palace confinement.

BTW, considering notation, how do you handle cases where the alphabet is not large enough to indicate all piece types? Arbitrary multi-letter piece IDs are not compatible with FEN. In the latest XBoard I implemented the system of 'dressed -letter' IDs, where a piece is indicated by a single letter (optionally) followed by a narrow punctuation character like ' or !. That causes no ambiguity in FEN, and actually keeps them quite readable, as the eye tends to group the ' or ! automatically with the preceding letter. And it triples the number of available IDs, so that you can assign them in amuch more intuitive way. E.g. for Tenjiku (42 piece types including the promoted ones), I had no problem at all making a reasonable assignment:

Code: Select all

A Reverse Chariot
B Bishop                B' &#40;Free&#41; Boar (+M&#41;     B! Bishop General
C Copper &#40;General&#41;                              C! Chariot Soldier
D Dragon&#40;-King&#41;         D' Dog                  D! Fire Demon
E &#40;Drunk&#41; Elephant                              E! Free Eagle
F &#40;Ferocious&#41; Leopard   F' &#40;Flying&#41; Stag (+T&#41;   F! &#40;Horned&#41; Falcon
G Gold &#40;General&#41;        G' <Go Between>         G! Great General
H &#40;Dragon-&#41;Horse        H' White Horse (+L&#41;     H! Lion Hawk
I Iron &#40;General&#41;
J
K King                  K' <Kirin>
L Lance                                         L! Lion
M Side Mover            M' Multi-General (+D')
N Knight
O Kirin                 O' Flying Ox (+V&#41;
P Pawn                  P' <Go Between>         P! <Prince> (+E, K&#41;
Q Queen                                         Q! <Great General> ('Flying Queen')
R Rook                  R' <Reverse Chariot>    R! Rook General
S Silver &#40;General&#41;      S' Side Soldier         S! &#40;Soaring&#41; Eagle
T &#40;Blind&#41; Tiger                                 T! &#40;Heavenly&#41; Tetrarch (+C!)
U
V Vertical Mover        V' Vertical Soldier     V! Vice General
W                       W' Whale (+A&#41;           W! &#40;Water&#41; Buffalo
X Phoenix
Y <Kirin>
Z
This even leaves room for some alternatives (indicated between <>), and for pieces that do not strictly need a name of their own, because they only occur as promoted versions of some other piece (indicated in parentheses behind the name).

In Chu Shogi, (which uses a sub-set of the Tenjiku pieces), where I stuck to a single-letter code, I needed some pretty awkward choices. Such as N for LioN, (there is no Knight in Chu), I for Go Between (only piece not in Tenjiku), O for Kirin (Y would have been an alternative, because the TSA (erroneously) spelled the same as Kylin) and A for Reverse ChAriot. (I used the O and X because they looked a bit like the move of Kirin and Phoenix.) With the dressed letters they can get more obvious IDs, although naming them different than in Chu of course is also not ideal. (But for the Lion this cannot be avoided, as now the Knight participates as well.)

It is even possible to rigorously stick to a convention for the use of ' and !, where ! is only used on strong (Queen-class) pieces.

Would ChessV allow such 'dressed-letter IDs'?
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: ChessV 2.0 - open source GUI and engine for chess varian

Post by Greg Strong »

hgm wrote:Because Thai uses a different script there did not seem to be an official notation in Latin characters that could be used. In the related ASEAN Chess they just use KRBNQP. It seemed best to just keep the Chess IDs for the pieces that Makruk and Chess have in common. So that left Met and Kohn. To westerners the Thai names would be meaningless, and the litteral translations were not very inspiring ('Nobleman' and 'Seed'). So I picked S for Kohn because it moves like the Silver general in Shogi, and Silver did not seem a bad western name for it. (Note that names of Chess pieces in different languages are hardly ever literal translations of each other; e.g. a Bishop is indicated by words that mean Runner (German), Fool (French), Elephant (Russian)...) For the Met I stuck with 'M'. Perhaps 'F' for Ferz would have been a better choice, but to most orthodox Chess players the word Ferz is just as meaningless as Met. So perhaps I should have used 'A' for Adviser, to stay in line with Xiagqi (the most popular Chess variant using this piece). But I associate Advisers so much with Palace confinement.
Thanks for explaining the thinking behind this. Yeah, there are no really good answers. If we're using S for the Kohn, I think I will use "Silver General" for the display name. Then I guess the Met is "Met". That will look a little odd being the only piece with a funny name, but whatever. You're right, Ferz would probably look just as odd to most people. Although it would be an opportunity to begin their education :)

There were places I didn't know what to do either, like Courier Chess. What the heck do we do about Courier? They have a piece called a Bishop (or "Bischof") but it moves as an elephant. But they also have a piece that moves as a bishop, but is called a Courier. The guard is "Mann" and the wazir is a "Schleich" (sneak? fool?). And the Queen moves as a ferz (which is similar to Makruk. Maybe the Met could have been called Queen.)
hgm wrote:BTW, considering notation, how do you handle cases where the alphabet is not large enough to indicate all piece types? Arbitrary multi-letter piece IDs are not compatible with FEN. In the latest XBoard I implemented the system of 'dressed -letter' IDs, where a piece is indicated by a single letter (optionally) followed by a narrow punctuation character like ' or !. That causes no ambiguity in FEN, and actually keeps them quite readable, as the eye tends to group the ' or ! automatically with the preceding letter. And it triples the number of available IDs, so that you can assign them in amuch more intuitive way.
ChessV supports two-letter notations. It knows all the notations used in a given game so it doesn't create any ambiguity so long as there is no single-character notation that is also the first character of a two-letter notation. And if there is an ambiguity, you can still use it, but you must put an underscore before the two-letter notation. The underscore is always removed before displaying to the user, but is still a little cheesy, though, so I avoid it as much as possible. In fact, I believe the only place I'm using ambiguous notations requiring an underscore is in Chess with Different Armies, which is very messy anyway. But for games where using two letters intuitive and not ambiguous, I like that better than grabbing an unused characters from the middle of names.

But I will also add support for your suffix-characters. I'm pretty sure that would not be difficult, and there are certainly circumstances where it would be cleaner.
User avatar
Nordlandia
Posts: 2821
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: ChessV 2.0 - open source GUI and engine for chess varian

Post by Nordlandia »

Here is the priority list starting from 1 (a1) and ending at 64 (h8)

:arrow: Black queen checked WK on g3. By moving WK to g1 (49 opposed to 51). King on g3 is now not royal anymore since it is more away according the priority list.

Image

Image
User avatar
Nordlandia
Posts: 2821
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: ChessV 2.0 - open source GUI and engine for chess varian

Post by Nordlandia »

Queen forked both kings :arrow: a8 is royal according order list, b5 is non-royal (Guard). 8 is closer to 1 than 13 ;)

Image
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: ChessV 2.0 - open source GUI and engine for chess varian

Post by hgm »

Greg Strong wrote:What the heck do we do about Courier? They have a piece called a Bishop (or "Bischof") but it moves as an elephant. But they also have a piece that moves as a bishop, but is called a Courier. The guard is "Mann" and the wazir is a "Schleich" (sneak? fool?). And the Queen moves as a ferz
WinBoard uses E for the Alfil (depicting it as Elephant), M for the Man, F for the Queen, W for the Sleich and B for the Couriers:
rnebmkfwbenr/pppppppppppp/12/12/12/12/PPPPPPPPPPPP/RNEBMKFWBENR w 0 1
This is still a legacy from the early period of chess-variant implementation in WinBoard, where I thought I could represent each piece by a universally valid ID.
It knows all the notations used in a given game so it doesn't create any ambiguity so long as there is no single-character notation that is also the first character of a two-letter notation.
The problem is that is Shogi variants there usually is such ambiguity. (E.g. in Chu: P vs Ph, K vs Kn, S vs SM, R vs RC, B vs BT, L vs Ln, G vs GB.) I also experimented with disambiguation prefixes, but it made FENs thoroughly unreadable (at least for me). I also considered an alterative for FEN, which would put white and black pieces in different board (separated by a #), so that you don't have to distinguish the pieces by type case, and can adopt the convention that capitals are used only for the first letter of a piece name. This was still not very readable. But the separation idea is of course a good solution for many-player games.