Fairy-Stockfish janggi (ponder Problem)

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 06 Oct 2020, 16:05

https://github.com/ianfab/Fairy-Stockfish/blob/master/src/xboard.cpp

else if (token == "hard" || token == "easy")
Options["Ponder"] = token == "hard";
else if (token == "option")


I use the fairy stockfish engine by loading it on the winboard.
Ponder does not work on Winboard. Can you tell me(help) ?
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 06 Oct 2020, 16:40

I don't think Fairy-Stockfish implements pondering when using WinBoard protocol. This is a Stockfish problem, which can only be solved by the Fairy-Stockfish developers.

An alternative would be to run Fairy-Stockfish in UCI mode, through an adapter. I am not sure whether the current UCI2WB version would work for Janggi; it could be a problem that this is not a standard variant for WinBoard, and that the protocol for engine-defined variants is not sufficiently developed in UCI.

But don't despair: although my policy is to avoid adding new standard variants, but rely on the general mechanism of the engine configuring the GUI through engine-defined variants, I have become convinced that Janggi has such unusual rules that it would not be feasible for WinBoard to play it without hard-coding some of the rules. (Which means I might as well hard-code all the rules.) So I have started working on adding Janggi as a standard variant in XBoard.

You can find my first attempt at http://hgm.nubati.net/WinBoard-AA.zip . Jianggi can be selected there from the New Variant menu dialog. I did not implement all rules yet, but the piece moves should work. It doesn't detect bikjang as game end, and swapping of Knights and Elephants is not implemented. (Also because that rule is not entirely clear to me, nor how Fairy-Stockfish would encode that as a move.) The turn-pass rule is also not clear. But if the engine declares game end you can probably live without all that.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 07 Oct 2020, 14:00

Thank you very much for developing Korean janggi standards.

I received a Winboard with Korean janggi added as a standard variant.
However, there are some problems with engine load.

1. The engine recognizes it as a xiangqi variant.
-Even if i choose janggi variant it will be replaced with xiangqi variant.

2. The king disappears when I double-click (pass) the king.
-The previous Winboard version had the same bug too.
- But on winboard 4.9 2020.409 it worked perfectly (King double click = pass) you can refer to that version. FEN editing was also convenient as it could be piece selected with a mouse.
-----------------------------------------------------------------------------------------------------------------------

3. Korean janggi currently has four rules applied to the fairy-stockfish engine.
https://github.com/ianfab/Fairy-Stockfish/wiki/FAQ

4. You can check the Korean janggi rules from what is discussed here.
https://github.com/cutechess/cutechess/issues/564
Currently, cute-janggi has been discontinued and we cannot use this gui.

I look forward to a perfect winboard janggi.
Thanks again.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 07 Oct 2020, 15:36

This is strange, as I don't have these problems at all. I downloaded the latest large-board Fairy-Stockfish from GitHub, loaded it into WinBoard as 1st and 2nd engine, and had it play a game against itself. It definitely plays Janggi, and not Xiangqi, as the very first move it does was sideway stepping of a Pawn.

Furthermore, double-clicking a King has never been a way to enter a turn pass in WinBoard. The way this should be done is by clicking the inactive clock. But I don't have switched that on yet; in most chess variants turn passing is not legal. It is not clear to me what the rules for turn passing are in Janggi; the Wikipedia says you can only do it when no other legal moves are available. In which case it would not require a user action at all, as WinBoard can see this, and pass the turn automatically (whwe in other games it would declare game end through stalemate). This is not implemented yet either.

When I double-click the King, it doesn't disappear. First click selects it (highlights to ppotential target squares go on), second click deselects it. This is as it should be, and as it always has been. What you describe only happens in Edit Position mode (in some of the methods that can be configured for this). Where there are no turns at all to pass. Just don't do it.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 08 Oct 2020, 05:05

1. This is because it is checked as xiangqi variant in the "new variant" menu. But I can play janggi. I have confirmed that janggi is playing correctly. Perhaps it's just a matter of menu notation.

2. In human VS AI play, "KING => double-clicking the mouse" KING disappears from the board. AI VS AI doesn't matter. This is because the engine automatically executes "PASS" according to the situation (the tactical part).
3. However, the engine developer has temporarily allowed us to use "PASS".
i can do that by entering "pass or --" in the "Type in move" menu.
In "Edit game" mode I can proceed to "PASS" by clicking on the clock. But I meant AI vs H.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 08 Oct 2020, 08:36

janggi-korea wrote:1. This is because it is checked as xiangqi variant in the "new variant" menu. But I can play janggi. I have confirmed that janggi is playing correctly. Perhaps it's just a matter of menu notation.

OK, I see what happens here (also only when using the Stockfish engine): SF still considers janggi a non-standard variant. So when it gets selected, it tells WinBoard (through a 'setup' command") that it really wants to play Xiangqi with some rule modifications. You probably have legality testing off, which makes WinBoard obey such requests even in standard variants. Which is why the selection jumps back to Xiangqi.

The proper fix is that SF should no longer consider Janggi an engine-defined variant, and refrain from trying to alter the rules when it gets selected.

2. In human VS AI play, "KING => double-clicking the mouse" KING disappears from the board. AI VS AI doesn't matter. This is because the engine automatically executes "PASS" according to the situation (the tactical part).
3. However, the engine developer has temporarily allowed us to use "PASS".
i can do that by entering "pass or --" in the "Type in move" menu.
In "Edit game" mode I can proceed to "PASS" by clicking on the clock. But I meant AI vs H.


I can reproduce this now, using Fairy-Stockfish. The problem appears to be that the engine marks e1 as a valid destination (yellow dot) when the King on e1 gets selected. It should not do that; clicking the King a second time should just deselect it, but by highlighting it the engine confuses WinBoard into thinking that e1e1 is a legal move. But WinBoard is not programmed to handle this type of illegal move, so unpredictable things happen when the engine has enabled its entry.

If it should be possible to enter a turn pass at any time (in violation of the rule description in Wikipedia...), I should simply include Janggi in the list of variants for which turn passing is legal. Then the clock clicks will also work in human-engine mode.

Note, however, that the rule descriptions you referred to above all seem to agree that turn passing is not legal unless you are stalemated.
Last edited by H.G.Muller on 08 Oct 2020, 09:48, edited 1 time in total.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 08 Oct 2020, 09:44

1. I made sure that janggi is selected by checking Test Legality in the options. (Previously used by unchecking)
When the "Test Legality" option is checked, king does not disappear, and there is no response even when double-clicking. (about pass)

And I was using use piece font. If i use the piece font, There are some problems here. The previously saved "PGN file" cannot be read. i think, This is because the FEN value has changed.
I remember that the engine developer changed the bitmap image due to a promotion from pawn. (Currently, it is not a pawn piece of chess. It is a star-shaped piece.)
I think , "pawn" and "king" have different characters. Because it is not displayed in the user font. (Alphabet symbols OR Bit img)

This is the usage value defined in the engine.
* font piece to char: .N.R.AB.P..C.........K.n.r.ab.p..c.........k


This is an example of the previous pgn.

[Event "Computer Chess Game"]
[Site "DESKTOP-95KS7KG"]
[Date "2020.10.08"]
[Round "-"]
[White "baek"]
[Black "Fairy-Stockfish 061020 LB 64 POPCNT"]
[Result "*"]
[TimeControl "30/300"]
[Variant "janggicasual"]
[VariantMen "N:nN;R:RB;A:WF;B:mafsmafW;P:fsWfF;C:pRpB;K:WF"]
[FEN "rnba1abnr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RNBA1ABNR w 0 1"]
[SetUp "1"]

{--------------
r n b a. a b n r
. . . . k. . . .
. c. . . . . c.
p. p. p. p. p
. . . . . . . . .
. . . . . . . . .
P. P. P. P. P
. C. . . . . C.
. . . . K. . . .
R N B A. A B N R
white to play
--------------}
1.Pab3 Pih6 2.Nc2 Nc7
*
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 08 Oct 2020, 10:07

Changing piece images should never be a problem; the PGN contains no info at all about images. As long as the piece IDs are the same, it would be compatible.

Problem here is that the variant tag in the PGN specifies 'janggicasual'. This is not known to WinBoard; I only implemented variant 'janggi'. In general loading games in engine-defined variants only works when WinBoard is already switched to that variant. So switching to janggi, and then loading this game will not work, as the variants are different. When I edit the PGN to make the variant plain 'janggi', I can paste it in WinBoard without problems. If I first switch WinBoard to 'janggicasual' (by starting it with a -variant option), which will not benefit in any way from the janggi implementation I just made, but will be considered an engine-defined variant with parent xiangqi, I can paste the original game without problem.

I must still take up the issue of the four sub-variants with the SF author. It seems undesirable to have these; it seems to me the slight rule variations would be better treated through engine-defined options within a single variant 'janggi'. But at the very least, they should all use 'janggi' as parent variant, rather than 'xiangqi'.

BTW, the problem with Pawn promotion should now have been solved, (see the SF issue about 'Crowded Xiangqi'), so SF can switch back to using Pawn symbols.
Last edited by H.G.Muller on 08 Oct 2020, 15:39, edited 1 time in total.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 08 Oct 2020, 15:39

I uploaded a new version, which allows turn passing by clicking the clock. It also fixes some move bugs. (Diagonal moves were not allowed in the opponent's Palace, and the ban on Cannon-Cannon jumping and capture was not enforced for them.)
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 09 Oct 2020, 01:53

thank you. Me and my janggi cafe members will test this ver.

In case, to avoid confusion, can you tell me the Winboard command you are using? (I mean "Edit engine List") I want to check with the same settings as you. Because I still can't click the clock. (99% of users in Korea use window os.)

"janggi" -fcp fairy-Stockfish.exe /firstXBook -fd "Z:\"

This is the command I use, and then select "janggi" from the list of variants.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 09 Oct 2020, 08:03

I would leave out the /firstXBook if you have no Janggi opening book installed; this option instructs WinBoard to probe the GUI book on behalf of the engine.

Otherwise the line would be OK provided your SF executable is at Z:\fairy-Stockfish.exe . (For me it is at C:/WinBoard/Stockfish/fsf.exe , so I obviously need another line.) The way it works is that WinBoard prefixes the line with -fcp, and then parses it like it were part of its command line. So basically the effect would be the same as if you had written

fairy-Stockfish -fd "Z:\"

because the way you wrote it effectively specifies -fcp two times, the first time being ignored (so you can put an arbitrary message there for your own convenience), the second time used as the chess program. The quotes around the values are only essential when the names contain spaces, so you could omit them without ill effects around the Z:\ .

Note this runs SF in CECP mode, so you will still have the ponder problem. I have not tried Fairy-Stockfish in UCI mode yet. (An extra /fUCI on the line would do that.) I first want to make sure this works before turning to the UCI2WB adapter.

Oh, and it is important that you use the latest version of Stockfish, that knows about Janggi being a standard variant. The old version would switch WinBoard to Xiangqi when you select Janggi or one of its variants, and in Xiangqi turn passing is not legal. You can check this by re-opening the New Variant dialog, and look whether the xiangqi or janggi radio button is checked.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 09 Oct 2020, 10:16

I compiled the latest version of FS and applied it to Winboard. Surely janggi is chosen from the variant, and i can play janggi.
Also, I selected UCI as the "losd first engine" menu and loaded it, but there seems to be no special changed function.
The -fUCI command does not work.
The important point is that i cannot yet use the "PASS" function by clicking on the clock. It seems that the engine developer did not modify the code in detail. anyway I'll wait.

I made the first opening book for janggi. So i use the "firstXBook" command. However, it was not automatic method in winboard, but I analyzed it myself and made it manually.
It was a very difficult task and a lot of time wasted. (At least 4 months) I found 1-2 thousand positions.
For the first time, I changed the Korean janggi Pro move text file to pgn file(coordinates changed), and tried to make it an opening book based on information on the bulletin boards of you and other people. I tried "save games to book" menu, of course F Own book and S Own book(unchecking).
I did a lot of tests, but the automatic generation method failed. At least the janggi variant didn't seem to work.

I have attached a file to your GitHub email. If you have time later, please check it.

always thank you.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 09 Oct 2020, 12:01

I never managed to compile Stockfish, and I don't know if a Windows binary of this new version is already available from GitHub. But fortunately it turns out I can make WinBoard resist the engine's attempt to switch it to variant xiangqi by switching legality testing on. This way I could test Janggi with the old Fairy-Stockfish.

Indeed there seem to be problems. Due to an oversight WinBoard was not aware that turn passing was legal at the point it sent the move to the engine. Because WinBoard supports using turn passes for analysis purposes also in games where these are not legal, so that the engines would not accept them, it then used the kludge of sending the complete position after the null move to the engine, to make it continue from there. In principle this should still work, but is not the preferred method, because it erases the game history from the engine, so that it no longer can detect repetitions of positions that happened before the turn pass.

But strange enough Stockfish goes mad at this point: it also plays a null move, the depth flying up to 100 in no time. It seems it doesn't understand the position FEN that WinBoard sends it. There must be a discrepancy between the piece IDs that Stockfish uses in Janggi, and those used by WinBoard in the FEN. I will take this up with the Stockfish author.

When I fixed WinBoard to realize that it is OK to send the turn pass to the engine in Janggi, the problem with the FEN of course disappears, and WinBoard dutifully sends "usermove @@@@" to the engine when I click the inactive clock to set that side on move. Unfortunately nothing happens then, because Stockfish replies with "Error (unkown command): @@@@". Apparently it does not understand the CECP notation for a turn pass. I will take that up with the SF author too.

About the book. So you do have a Janggi book, that is great. Hand-crafting a book is indeed a lot of work, I did that for mini-Shogi. I am sorry the automatic method did not work; I would have to look into that.

A problem is that the modifications I made to make Janggi a standard variant might break the book. WinBoard uses the variant number when deriving the book key for a position, to make sure the same position in different variants (such as orthodox Chess, Suicide or Atomic) will have different keys. So that a single book file can hold opening lines for several variants without confusion. You probably made the book when the variant was set to Xiangqi, but now that Janggi has its own variant number, it will not recognize book keys of Xiangqi positions in Janggi. A constant should be added to all the keys to correct that. It should be possible to have a small program apply this correction. I will look into it to see exactly what has to be done to make sure your book remains usable.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 10 Oct 2020, 07:20

Thanks for your help.
The reason the depth is displayed like #100~256 in an instant is because if I pass when I have a low score in the janggi rule option, the engine also executes "pass" to end the game.
The default janggi rule is to lose if you "pass" when your score is low. (Because the engine calculates the score of the pieces.)

I am wondering how to apply janggi's four rules.
These 4 rules contain almost all of janggi's rules to date.

janggi/ janggitraditional/ janggimodern /janggicasual

When we first selected the starting location, we started by creating a separate Fen file and loading the file. janggi have 4x4=16 different starting positions. (I started by selecting from 16 FEN files.)

Anyway, what's important right now is that you understand janggi's four rules, and apply them to winbo. Note that the engine's search method varies depending on the rules.
There is a Korean commercial janggi program (Name:JANGGIDOSA). =>only korean language
But it's level is weaker than that of stockfish.
However, it was developed to be user friendly.
Personally, I think user-friendliness matters for GUIs.

Janggi has about 10 million friends in Korea. On the phone mobile janggi site, tens of thousands of people fight every day. Janggi has not yet been distributed internationally, So we have yet to create an international standard.
and only 1 program (janggidosa) can be used.
xiàngqí, chess, shogi have many programs. But there is no janggi.

However, I have found new possibilities in Winboard, and many janggi hobbyists are interested in Winboard.
After solving the above problem, I will solve the problem with you, janggi coordinate notation, and the opening book.

I plan to support you as a Winboard user.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 10 Oct 2020, 10:01

One way to handle starting positions (which I suggested at GitHub as well) is to implement Janggi as a shuffle game, where the Horses and Elephants are randomly swapped at the start of every game. I know this is not really how the rules are, but a user can always press New Game until the random configuration is one he would have chosen; as you only have 4 possibilities for your own setup it would never take very many tries to get one. This is much simpler than going to Edit Position mode and adjusting the start position by hand.

The engine can do this, through the start position it sends to the GUI in engine-defined variants (and 3 of the 4 rule sets will always be engine-defined variants, based on WinBoard's single jangqi standard variant). But I could also make the GUI do this even without engine (like it does to a larger extent in Chess960).

In principle the true rules can be followed, where white selects its setup first, and then black gets an opportunity to adapt his own. But that would require involvement of the engine, which must have some algorithm for making the choice. (Even if that would just be choosing randomly.) WinBoard protocol allows engines to conduct such 'pre-game negociations' between engines, but it is entirely up to the engines to conduct them. E.g. an engine could decide to show 4 possible constellations for the back-rank pieces on 4 ranks of an otherwise empty board, and allow the user to click on the one he wants. And only after the user has made his choice display the true start position (from which its own choice then is visible), from which moves can be made. If the engine plays white it could display his own chosen at the bottom of the screen, and allow the user to pick one of the 4 ranks displayed above it for black. My engine for Musketeer Chess (included in the WinBoard-AA download as musky.exe) makes use of such a pre-game dialog for selecting participating piece types, and their location. So if you want to get an idea of how this works in practice, you could try to run that.

As to the turn passing: OK, I see. So there might not have been anything wrong with loading the board, but white passing with equal material just gives black a cheap way to immediately win. I was indeed testing this in 'janggi', which is the rule set where the point count is used. Well, that is one problem less, then.

About the book: I realized we might have a very bad problem here. It seems Stockfish so far has been using the (star-shaped) Marshall symbol as Pawn, because of the problem with redefined Pawn moves in Xiangqi (making those 'promote' to nothing when reaching last rank). But WinBoard's book code would not consider that the same piece as the usual Pawn symbol. It does identify piece types by their symbol, and not by their move. So if Stockfish switches back to using the Pawn symbol now that the problem is fixed, it will completely break the book you made. None of the positions with Pawns will be recognized, as in the Book they are recorded as positions with Marshalls.

If the book had been generated from a set of games, we could have simply regenerated it with the new symbol assignment. But with a hand-made book this is not possible. And there is no fixed relation between the position keys of positions with Pawns instead of Marshalls; it completely depends on where the Pawns are, which can be different for every position. It is also not possible to 'invert' the mapping of positions on keys, to know where the Pawns are. I know how much work it is to make a book by hand, so I can very well imagine the magnitude of the disaster when it would have to be redone. Yet I think it would be very bad to keep the Marshall symbol as Pawn in Janggi forever.

The only way I see for automatic conversion of an existing book to other piece encoding is to somehow modify WinBoard to generate a complete game tree from the opening position, (using Marhalls as Pawns), and probe the existing book for all of those. If it then finds the position you would have effectively inverted the key (by brute-force search), and can replace it by a key calculated with the Pawns as Pawns. If it doesn't find the position, you are apparently out of book, and it doesn't have to continue moving from that position. At least, I hope that the book you made is 'contiguous', (meaning that every position in it is reachable from the opening position through a path that only contains positions in the book). If you would have one-sided lines (e.g. refutations of moves you never want the engine to play itself), the stopping condition would become more comples, as it would have to continue in out-of-book positions to check if the opponent is out of book as well.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 12 Oct 2020, 04:39

I did a lot of testing with the current updated Winboard version and the latest compiled FS version.
However, there are several problems.
And let us tell you exactly what I want to improve.
* Includes overlapping content discussed so far.

[problem]
1. It is inconvenient due to a piece pic display error in the current version of Winboard. Previously, when used with the xiangqi variant it worked relatively well. It was just a problem because it doesn't recognize janggi rules. For example, the engine ended the game, but Winboard was still running. (Possibility of defining janggi rules using Marshall symbols?)

2.All Koreans use the "use piece font". So, in order to use the pieces that have been changed, there is a hassle of having to re-create the font. Currently, PAWN and KING are not displayed. Their pictures are different.

3. There is a problem with saving and loading the game. Previously, the FEN value was stored in the PGN together transformation. However, the game cannot be loaded by default at this time. (another start position)
* FEN value does not occur according to the starting position.

[Improvement Points and Wanted]
1. I want to implement janggi rules in JANGGI using existing picture symbols.
Because for the newly changed picture image, we have to work on everything again. (Example: Opening book, PGN file)

2. Automatic opening book creation function activated (I want to implement it so that it can be created automatically without errors), it does not work at present.

3. Activate the Ponder function (this seems to require the help of the engine developer.)

4. I want to keep using hash memory (hash table) even if I play a new game. Clicking on a new game currently deletes the hash table.
* want a stronger play.

5. "Pass" function= OK (The modified version works normally when I click the clock.) . want start 1 move possible pass. This is because the PASS function is activated from the first 1 MOVE, and can be yielded by passing the first one to the other party.

6. First start position selection menu => It doesn't seem to be applied yet. (The four rules are probably defined by engine commands? edite engine list?)
* I think it would be convenient to use them using pop-up windows.
* Add: In the long-term rule, black (elder) first selects the starting position, and next white select position.

7. Standard moving coordinates used in Korea apply (board and engine output and PGN)
* Currently displayed in Chinese coordinates.

Please review.
thank you.

PS. Is it difficult to apply janggi rules to Fairy-Max to make it a janggi engine? (Currently there is only one Janggi engine)
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 12 Oct 2020, 10:55

janggi-korea wrote:[problem]
1. It is inconvenient due to a piece pic display error in the current version of Winboard. Previously, when used with the xiangqi variant it worked relatively well. It was just a problem because it doesn't recognize janggi rules. For example, the engine ended the game, but Winboard was still running. (Possibility of defining janggi rules using Marshall symbols?)

I don't understand. What is inconvenient? The current Jangqi implementation is just like the existing Xiangqi implmentation, except that it knows how the pieces move without any engine help. I don't see how that could ever be a disadvantage.

Also, when an engine ends the game (for whatever reason), it should notify WinBoard, and it would end the game too.

2.All Koreans use the "use piece font". So, in order to use the pieces that have been changed, there is a hassle of having to re-create the font. Currently, PAWN and KING are not displayed. Their pictures are different.

WinBoard has an option -fontPieceToCharTable, which can even be set from the View -> Board Themes menu ('Font piece to char'), which determines how internal symbols are mapped onto ASCII characters of a piece font. As long as all the pieces you need are present in the font, there would never be any reason to recreate the font. You can just change the mapping.

3. There is a problem with saving and loading the game. Previously, the FEN value was stored in the PGN together transformation. However, the game cannot be loaded by default at this time. (another start position)
* FEN value does not occur according to the starting position.

I am not sure what exactly the problem is. Note that PGN is entirely independent of what symbols WinBoard uses for the pieces. It only depends on what letters it uses as ID for the pieces. Which is determined by the pieceToCharTable. I don't know what game you tried to load, but there is the possibility that it contained a FEN that used different piece IDs as those that WinBoard expects. E.g. using B for an Elephant instead of E. That would of course not work. But there is a work-around for that: WinBoard has an option -pieceNickNames, with which you can define an alternative pieceToCharTable, of letters it should also recognize. In the WinBoard distro configured for Xiangqi I have set that to recongnize B and N as alternative names for E and H.

[Improvement Points and Wanted]
1. I want to implement janggi rules in JANGGI using existing picture symbols.
Because for the newly changed picture image, we have to work on everything again. (Example: Opening book, PGN file)

Well, we apparently have a conflict of interest here, because I would like Janggi to use Pawns as Pawns. It is plain silly to use Marshall symbols for Pawns. It was a mistake to ever use those, and I am not going to elevate mistakes to a standard.

I'd rather do the bit of extra work required to convert your book to the new internal piece encoding than to spoil the design of XBoard forever.

As I explained above, this has absolutely no effect on PGN.

2. Automatic opening book creation function activated (I want to implement it so that it can be created automatically without errors), it does not work at present.

Well, last time I tried it, it did work (for Chess). It is hard for me (read: impossible) to fix errors that do not occur. If you send me the PGN that you could not convert, I can try it, and diagnose the problem.

3. Activate the Ponder function (this seems to require the help of the engine developer.)

Not the help. The engine developer is the one who should do it. Nothing WinBoard can do about it.

4. I want to keep using hash memory (hash table) even if I play a new game. Clicking on a new game currently deletes the hash table.
* want a stronger play.

That also is purely an engine matter. WinBoard never asks the engine to clear its hash table; the engine is free to decide whether it wants to do that for a new game or not.

5. "Pass" function= OK (The modified version works normally when I click the clock.) . want start 1 move possible pass. This is because the PASS function is activated from the first 1 MOVE, and can be yielded by passing the first one to the other party.

Are you saying that turn passing does not work in the initial position? That is indeed unintended, and now that you mention it I can imagine why that is. (WinBoard has a special internal state at the start position; it is not yet in engine-human mode then.)

6. First start position selection menu => It doesn't seem to be applied yet. (The four rules are probably defined by engine commands? edite engine list?)
* I think it would be convenient to use them using pop-up windows.
* Add: In the long-term rule, black (elder) first selects the starting position, and next white select position.

The four rule sets (janggi, janggicasual, ...) have nothing to do with the start position, but whether point counting and Bikjang will be used. If the start position must be negociated (through pop-up windows or graphical screens), it is the engine that would have to do it. This is a logical necessity, as the engine should make its own choice. WinBoard already offers the possibility for en engine to trigger a popup with an arbitrary question, and send the user's answer back to the engine.

7. Standard moving coordinates used in Korea apply (board and engine output and PGN)
* Currently displayed in Chinese coordinates.

I don't want different variants to use different coordinates in WinBoard. PGN uses coordinates according to the PGN standard, and WinBoard's format for saving games is PGN.


PS. Is it difficult to apply janggi rules to Fairy-Max to make it a janggi engine? (Currently there is only one Janggi engine)

Yes, that would be hard, because Janggi has some very unusual rules. It violates the principle that moves of a piece are independent of its location. It violates the principle that capture is is 'piece-type blind' (because Cannons cannot capture Cannons). It has turn passing.

But perhaps more complex multi-variant engines (such as Sjaak II) can be configured to play it. I am not sure.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 12 Oct 2020, 13:21

Ok I See. i understood. I'll use it the way you suggested.

[Problem]1. 2. 3. Solved.

[Improvement point]1. 3. 4. 6. 7. Solved.

Solved game loading issue.
I'll create a program to convert the coordinates.

thanks a lot
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 12 Oct 2020, 22:52

I uploaded a new WinBoard-AA.zip, for which the clock click also works in the initial position.

I tried running Fairy-Stockfish as UCI engine, through UCI2WB. But I noticed that this crashed WinBoard. (It stalls after receiving the variants feature, before the engine is fully loaded.) Apparently the variant list is now so long that it overflows some buffer. I could not yet determine where in WinBoard this happens. I am also not sure why this only is a problem in UCI mode, and not in CECP mode (where it also sends the variants list). It could be that this is because UCI2WB appends two more varants by default, and that this pushes the length judge over the edge.

As a work-around I made a new version of UCI2WB (and included it in the package), which limits the variant list to 500 characters. This is long enough for janggi to still be in the list. With this version of UCI2WB the -fUCI option can be used to run Fairy-Stockfish.

Since I did not have the version of Fairy-Stockfish that was modified to consider Janggi a standard variant, I could not really test whether Janggi works in UCI mode. Perhaps you could test that. If it does work, SF should be able to ponder.

I also tried to make a book, from two self-play games of Stockfish saved to PGN. The Save Games as Book command appeared to work on that. (Starting from a renamed copy of the file empt_book.bin .) I got a book, and when opening the Edit Book window I did see the moves in it.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 13 Oct 2020, 07:10

I can use the UCI command.
However, before testing, there is one problem.

The engine coordinates are printed and applied.
So there is a conflict with the coordinates of Winboard.

Message: "illegal move "i4h4" from first machine"


[Engine output]
dep score nodes time (not shown: tbhits knps seldep)
21 +0.15 13.9M 0:16.29 i4h4
21 +0.08 15.4M 0:17.95 i4h4 a7b7 h1g3 h10g8 b1c3 e9e10 e2d2 b10c8 d1e2 d10e9 b3d3 i7i6 i1i2 g7f7 a4a5 i10i7 h3h5 b8b3 c4d4 c7d7 i2f2 h8e8
20 +0.06 11.4M 0:13.23 i4h4 a7b7 b1c3 h10g8 h1g3 e9e10 e2e1 b10c8 f1e2 f10e9 b3d3 e7f7 d3a3 a10b10 a4b4 b8b6 h3e3 g10e7 c1a4 b6b9 a3a5
19 +0.18 7.65M 0:08.68 i4h4
19 +0.14 10.9M 0:12.55 i4h4
19 +0.06 11.2M 0:12.93 i4h4 a7b7 b1c3 h10g8 h1g3 e9e10 e2d2 b10c8 i1i5 e7f7 f1e2 f10e9 e4d4 a10a6 c1e4 g10e7 i5d5 i7h7 h3e3 h8e8 b3d3
19 0.00 8.55M 0:09.70 i4h4 a7b7


need to match the coordinates to use the perfect uci option.
After the coordinates are corrected
I will test Ponder and openingbook. Currently I can't do anything.

P.s. Please tell me your email address or messenger mainly use. I'll share the latest version of FS and PGN, a self-made openingbook(BIN).
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Next

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 21 guests