Winboard janggi "OpeningBook" compatibility development

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

Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 31 Oct 2020, 14:23

I uploaded the engine file and source code to Google Drive for openingbook development.
The engine developer solved the "Ponder" problem, and uploaded the solved engine(1031.exe) and the we developed engine(1030.exe) together.
This is because the current GitHub source has broken compatibility with the source we developed.
So I recommend using the engine and source code of engine developer.

1. Ponder solved-GitHub compilation engine and source: 1031-Fairy-Stockfish-master.zip / 1031.exe

2. Currently we are working on-engine and source : 1030-Fairy-Stockfish-master.zip / 1030.exe

note. Breaking compatibility means that merging is difficult(GitHub Update). I tried merging several times, but it failed thread file and the position file.
Both engines work fine on winboard.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 31 Oct 2020, 15:14

When starting with "just view or edit game files" on the recently updated winboard, I found an error that could not read the PGN game files I saved.
PGN can be read normally after engine load, but cannot be read without engine load. Could you please check this first?

[Event "Computer Chess Game"]
[Site "DESKTOP-95KS7KG"]
[Date "2020.10.27"]
[Round "-"]
[White "Janggi-Korea 261020 LB"]
[Black "baek"]
[Result "1-0"]
[TimeControl "30/300"]
[Variant "janggimodern"]
[FEN "reha1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AEHR w 0 1"]
[SetUp "1"]

{--------------
r e h a . a h e r
. . . . k . . . .
. c . . . . . c .
p . p . p . p . p
. . . . . . . . .
. . . . . . . . .
P . P . P . P . P
. C . . . . . C .
. . . . K . . . .
R E H A . A E H R
white to play
--------------}
1. Hg2 Hf7 2. Ce2 e5 3. ef3+ {+1.07/21 10} Ce7 4. Ee3 {+1.05/25 2.8} g5 5.
Exc6 {+1.75/21 4} Ra8 6. ab3 {+1.71/22 0.1} Hd7 7. Rh0 {+2.16/22 18} Ef6 8.
Rh4 {+2.98/21 13} ih6 9. Rb4 {+3.78/21 8} Kf8 10. Rxb7 {+7.17/20 4} Afe8
11. Rxb9 {+7.06/26 0.1} a5 12. Ra9 {+7.44/20 8} Rc8 13. Ee3 {+7.86/21 7}
Rg9 14. Hd2 {+8.06/17 3} gh5 15. R0xa5 {+9.44/18 7} Hc5 16. Cxe5
{+10.40/24 0.1} Hb7 17. Cxb7 {+14.48/18 4}
{Black resigns} 1-0
Last edited by janggi-korea on 01 Nov 2020, 05:07, edited 1 time in total.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby H.G.Muller » 31 Oct 2020, 22:49

WinBoard doesn't like that the name specified in the Variant tag of the PGN is "janggimodern". It doesn't recognize that as the name of any standard variant; it needs an engine to tell it that it should treat this as if it is janggi. Because it doesn't recognize the variant name, it assumes that it is normal Chess, and then it doesn't recognize the piece IDs anymore. It is a bit inconvenient that this does not work without an engine.

If the Varaint tag would have said 'janggi', WinBoard would have no trouble reading the game. So perhaps it should write the name of the parent variant in the tag, when it saves the game of an engine-defined variant. But then the information on what sub-variant it was would be completely absent.

So I suppose we need to specify two variants with a PGN: the engine-defined name (janggicasual) and the parent variant.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 01 Nov 2020, 05:18

Oh sorry, I asked the same question. I forgot this.

I think, the important point in writing the "openingbook" is the win or loss of the game. And Winboard seems to automatically save the game for which the win or loss is determined. So, first of all, I want to make a suggestion.
In the Action menu, Resign (F9) works.
But Adjudicate to white/black/draw doesn't work.
Can you activate this? Perhaps this feature will be available in online games. However, janggi currently does not have a server that connects online games to Winboard.
So, I want to use it as a win/loss decision in saving pgn. Or is there a way to re-judgment on Winboard for already saved pgn?(Win/L/D)
Or is there another way? My meaning is about manual judgment.

PS.janggi PGN does not work with Load Game-"Find Position".
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby H.G.Muller » 01 Nov 2020, 10:14

The adjudicate W/L/D was intended for engine-engine games; when playing yourself (against engine or on-line) the rules of chess do not allow a player to one-sidedly decide he has won, or even in most psituations that it should be a draw. You can only declare your own loss.

But you are right: in Edit Game mode it would make sense to allow setting of an arbitrary result too. I guess no one has ever requested that before, because you can simply wait for the player you want to lose to get on move, and then resign. But I will check if this menu item can be easily made to work in Edit Game mode too.

[Edit] OK, I see what the problem is. When running without engine the entire Action menu is disabled, so that you cannot get to the adjudication menu items (which would never be disabled individually). And you can also not get to 'resign'. So it is not so much dependent on the Mode, but on whether there is an engine available. This is a bit hard to change, as it would require complete reorganization of the menus. But you can easily work around it by starting WinBoard with an engine.

[Edit2] There seem to be several things broke in the current WinBoard version, some of which I thought were working before. The 'find position' indeed doesn't work for me either. It could be that it doesn't take account of the FEN tag in the PGN, when it is playing through the games to see if the sought position occurs in them. I will check it out.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 01 Nov 2020, 13:40

I think Winboard's Monte-Carlo algorithm book generator is a very innovative method. (but need to long time) :D
Korea's janggi program hasn't even tried it.
The Korean janggi program simply used the move of the number of times they game most as a book. (Probability of moving)
The weight of win/loss/draw is a very advantage in book writing.
So I want to use "Adjudicate to white/black/draw" not only in game editing mode, also want when the engine is loaded. And it would be nice if I could change the win or lose or add to correct the error.
For example, cute-janggi can also be used in engine vs. human games.

The "Find Position" It was also not available in previous versions too. So I added the code to the [VariantMen "N:nN;R:RB;A:WF;B:mafsmafW;P:fsWfF;C:pRpB;K:WF"] in pgn file so that the location can be recognized.
But I didn't find all the locations. I only found some locations.
Maybe I couldn't find the mirroring location.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby H.G.Muller » 01 Nov 2020, 16:13

The VariantMen tag does more harm than good, now that WinBoard knows the exact Janggi rules. (The same was true for the engine's 'piece' commands.) The move notation that can be given there is not precise enough to define the exact Janggi rules, so the moves are only approximate, and (for example) make the Rook move diagonal everywhere on the board. Some of the games in the TOTAL.pgn refused to load with legality testing on, because the VariantMen tag made WinBoard think the King was left in check by a Cannon, while in fact the check was blocked, because Cannons cannot jump other Cannons.

The Janggi rules are so special, that currently the only way to let WinBoard use them is to make it use parent variant 'janggi'. So I think we should have a ParentVariant tag in the PGN. (Or perhaps call it 'VariantFamily'.)
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 02 Nov 2020, 07:31

I solved the find position problem.
It seemed there was a problem with "Total.pgn" I gave you. This is because it was not a PGN format that was fully compatible with Winboard.
So I changed it to Winboard PGN format.
The method was saved again using "Save Selected Games".
And I was able to find the position using "Match if Position is subset" and "Also match reversed colors" and "Also match left-right mirror image".
"match exact position" doesn't work. and the newly created PGN only displays the results of the game "stalemate" and "checkmate".

The important point is that if I played the game with another janggi variant and saved it, I have to text edit the janggi variant with the default janggi to find the position of the saved file.(need to edit with janggi variant/ janggimordern->janggi) . Book making too
And even if I loaded another janggi variant of the engine, I could also find the position too.

Anyway I found a temporary workaround.

After all, this is a compatibility issue with janggi variants as you said.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby H.G.Muller » 02 Nov 2020, 16:33

I have uploaded a new WinBoard-AA package, which should include a [VariantFamily "janggi"] tag in any PGN it saves in one of the other 3 Janggi flavors. PGN games that contain this tag after the normal Variant tag (which specifies the engine-defined name, like 'janggicasual') can now be loaded when running without an engine.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 03 Nov 2020, 04:24

Thank you very much. New ver. Works fine.

[about book]
If there is a tool that can convert PGN files into mirrored coordinates, this seems to be a very easy problem.
If i combine the PGN file with changed coordinates and the default PGN file and use it as a book, all problems will be solved.
This is because if you use the "-symBook" option now, an error occurs due to duplicate coordinates, and the movement counter of the already created book information is not updated.
In principle, the final movement counter is the sum of base + mirroring.
But when editing a book, i also need to edit the mirror coordinates. I do not know the correct answer. Let me think of an idea.

[about rule]
Request to modify Winboard janggi rules.
When playing Ai vs Human with the Auto flag unchecked, the game is a draw if use turn PASS when the human has used up all of his time.
"Message: {Both players ran out of time} 1/2-1/2"

janggi : When the Auto flag unchecked, the human player has no time limit, and PASS can also be used.
Perhaps the rules of chess still exist. Request for modification according to Janggi rules.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby H.G.Muller » 03 Nov 2020, 10:16

The behavior that you describe was unintended in the first place. In Chess turn passing was only allowed as an analysis tool, to recognize threats, and there is no flagging in anlyze mode. So when playing, clicking the clock can only mean an attempt to claim the opponent's time forfeit. When playing Janggi there are both time forfeits and turn passing, so the issue arises to determine what a clock click means. If the players are not out of time, then it should obviously mean a turn pass. But is a player is out of time, there has to be a rule for resolving the ambiguity. Clicking the clock that is already running is not a turn pass, and can thus always remain claiming of a time loss. Clicking of the non-running clock should mean a turn pass in games where a turn pass is legal. If that player is also out of time, you can always claim it after you have transferred the turn to him. But there would be no alternative to entering a turn pass.

This whole business of claiming a time forfeit seems silly to me in the first place. (But it has always been part of WinBoard.) If you wanted to stricly enforce the time limits, you should switch autoFlag on. What would be the point of switching it off, and then claiming it by hand? What is the point of the human claiming a time forfeit in a human-engine game anyway? For one, engines are not supposed to ever overrun their time: they should be able to move in milliseconds, if needed. Engine forfeits usually only occur when the engine crashes without terminating. And even when they would forfeit, they are not sentient beings, (especially after they crashed...), and will not be able to realize whether they have lost or won, while the human would already know he had won before he attempted to claim it through a clock click.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 03 Nov 2020, 11:22

Okay. understand. If you fix this, I'm afraid run into problems with the rules of chess too.
So, when the time runs out, I will "pass" by using "type in move" menu.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 04 Nov 2020, 09:29

Request to modify janggi movement rules: When pwan (Soldier) moves to the center of the opponent's palace, an "Ambiguous move" pop-up error occurs.

[Event "온라인 한게임"]
[Site "한게임"]
[Date "2011-09-12"]
[Round "친선"]
[White "원앙마 steel6804 6단"]
[Black "귀마 stonechild33 7단"]
[Result "1-0"]
[TimeControl ""]
[Variant "janggi"]
[PlyCount "163"]
[FEN "reha1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w 0 1"]
[SetUp "1"]

{--------------
r e h a . a e h r
. . . . k . . . .
. c . . . . . c .
p . p . p . p . p
. . . . . . . . .
. . . . . . . . .
P . P . P . P . P
. C . . . . . C .
. . . . K . . . .
R H E A . A E H R
white to play
--------------}
1. Hg2 Hg7 2. ih3 ab6 3. Ce2 Ce7 4. Hc2 Ed6 5. ed3 g5 6. Cd2 Ad8 7. Af1 Kd9
8. Cf0 i5 9. Ke0 Ci7 10. Rh0 Ch7 11. hi3 Hh5 12. gh3 g4 13. Ege3 Hf4 14.
Ca2 Cxh0 15. Cxa9+ Hb7 16. Hxh0 Hxa9 17. Exc6 bxc6 18. He3 ih5 19. Hxg4 hg5
20. Cxf4 gxg4 21. Cf0 Rh9 22. Ee3 c5 23. c4 Hb7 24. cxc5 Hxc5 25. Rc0 Rh5
26. h4 Re5 27. hxg4 ef6 28. Rc4 Ei6 29. Hg2 Exg4 30. Cxf6 Rg5 31. Cf0 Ed6
32. ih3 Ef8 33. Hh4 Ad7 34. Cf5 Ea8 35. Cxf9 Cc7 36. Rd4 Ce7+ 37. Ade1 Rd5
38. Hg6 Rxd4 39. dxd4 Ke8 40. Cf2 He6 41. Eh5 Hf4+ 42. Hxe7 Axe7 43. Cxf8
Hxh5 44. Cxa8 Hf4 45. hg3 He6 46. de4 Hc5 47. e5 Hd3 48. e6 Ad7 49. ed6 Ae7
50. Cg8 Hc5 51. g4 Af7 52. Kf0 Hd3 53. g5 Hf4 54. Aef2 Hh3 55. gf5 Hf4 56.
ab3 Hg2+ 57. Cg1 Hh4 58. f6 Af8 59. b4 Hf5 60. fe6 Af7 61. ba4 Kf8 62. A1e1
Ae8 63. Cd1 He3 64. Cf1+ Hxf1 65. Aexf1 Kf7 66. a5 -- 67. a6 Ad8 68. ab6
Ke8 69. bc6 Kf7 70. c7 Ke8 71. ef6 Ke7 72. de6+ Ke8 73. fg6 Kf7 74. ef6+
Kf8 75. g7 Ae8 76. cd7 Axd7 77. f7+ Kf9 78. g8 Ke9 79. gf8 Kd9 80. fe8+ :!:
Axe8 81. fxe8+ Kxe8 82. A1e1
*



[Event "온라인 한게임"]
[Site "한게임"]
[Date "2009-02-27"]
[Round "친선"]
[White "원앙마 비운의갬블러 4단"]
[Black "원앙마 ruin205 4단"]
[Result "0-1"]
[TimeControl "10분 30초 1회"]
[Variant "janggi"]
[PlyCount "176"]
[FEN "rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w 0 1"]
[SetUp "1"]

{--------------
r h e a . a e h r
. . . . k . . . .
. c . . . . . c .
p . p . p . p . p
. . . . . . . . .
. . . . . . . . .
P . P . P . P . P
. C . . . . . C .
. . . . K . . . .
R H E A . A E H R
white to play
--------------}
1. ih3 ab6 2. Hg2 Hc7 3. Ce2 Ce7 4. Hc2 Hg7 5. ef3 ed6 6. Ke0 Hce6 7. c4
Af8 8. Afe1 Cf7 9. Add1 Rh9 10. Cd2 Rh5 11. Cd0 Cf9 12. Ece3 ih6 13. f4
Hxf4 14. Exh5 Hxe2 15. Exe7 Hg1+ 16. Af1 Hxi0 17. Ade1 Ece6 18. a4 Ra7 19.
Ei3 Hg1 20. Hce3 Rxe7 21. ab4 Ec3+ 22. Hc2 Cxf1 23. Cf2 Ch1+ 24. Kf0 Cxe1
25. Ra1 Re2 26. Rxe1 Rxe1+ 27. Kxe1 He6 28. gf3 Ke9 29. Cxf8 gf6 30. Cf4 f5
31. Cf2 Ae8 32. He3 fe5 33. h4 e4 34. Hd1 Ea0 35. Ch2 Hg5 36. fg3 Hf7 37.
Hb2 d5 38. Hxa0 d4 39. Hb2 Ae7 40. cxd4 exd4 41. bc4 de4 42. Kf1 Ed7 43.
Ce2 Ae8 44. Hd3 Kd9 45. He5 Hxe5 46. Cxe5 ef4 47. Ke1 b5 48. Ce0 Hxe0 49.
Kxe0 b4 50. cd4 c5 51. He3 -- 52. Hf5 hi6 53. h5 c4 54. dxc4 bxc4 55. Ef1
Eg9 56. Hd6 cb4 57. Hf5 b3 58. Hd4 b2 59. Ec3 fe4 60. Hb5 e3 61. Ke1 bc2
62. Ef5 Ke9 63. Hd4 cb2 64. g4 Af7 65. g5 Ed7 66. g6 Ef4 67. gf6 Ae8 68.
Ec7 bc2 69. Ea4 ed3 70. fe6 Eh7 71. ef6 Ef4 72. hg5 Ed7 73. Hc6 Eb4 74.
Hxb4 cd2+ 75. Kf2 de3 76. Kf1 e2 77. Hd3 d1 78. g6 i5 79. g7 ih5 80. gf7
Ad8 81. fe7 hg5 82. Ed6 gf5 83. f7 f4 84. -- fe4 85. Eg4 e3 86. He5 ed2 87.
Hc4 de1+ :!: 88. Exe1 e2
*
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby H.G.Muller » 04 Nov 2020, 19:10

I guess that in the Palace Pawn moves can need more disambiguation in their notation than elsewhere, because of the extra diagonal moves. For now (in the newly uploaded WinBoard-AA.zip) I solved it by always writing a fully disambiguated move (i.e. mentioning both file and rank of the square of origin) when the move starts in the Palace and ends on the last two ranks. This creates longer notation than necessary most of the time, but it should never leave any ambiguity.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 05 Nov 2020, 07:57

Thanks. :D All movement rules for janggi pieces are now fully compatible on Winboard.

Now I am talking about the janggi win-loss rule.
I converted my "Total.pgn" file into a pgn file for Winboard. Some confirmations are required here.

1. Win/loss processing problem: When converting to Winboard's pgn, only chekmate and Stalemate win/loss are judged and saved in Winboard.

So I used a filter and saved only the 1-0 result pgn file separately. And the game result was modified by text editing. [Result "1-0"]
The problem arises here.
Some janggi games are judged by the winboard {stalemate} 1/2-1/2.
This is a problem with the janggi win-loss rule. Winboard is judged as a draw when "{stalemate} 1/2-1/2" cannot move.
Perhaps it is the rule of chess.
However, in the janggi, the turn pass is possible, so it is not a draw. I show 2 sample FEN.

3k5/6R2/2c6/9/4H4/4C4/7P1/4K4/9/9 b 2
9/3k5/5R3/9/9/9/9/9/4K4/5C3 b 0

If the movement proceeds from the FEN position, WHITE will surely win.
However, because Winboard automatically judges it as {stalemate} 1/2-1/2, Janggi win-loss rules and problems arise.
In the end, if cannot move, must Resign or Pass.
So.. for janggi I ask to delete the {stalemate} 1/2-1/2 automatic judged.

======================================================================================================

Correct understanding and problems of -sym command in janggi.
1. janggi has 16 starting positions. And it is divided into 10 groups.
What the group means is the horizontal mirroring reverse position.
To make it easier for you to understand, I will explain "Flip View" as an example.
"Flip View" first changes up and down. And the left and right change.
The group simply means the FEN value with the left and right reversed.
Group with only one FEN value has the same FEN value as the left and right inversion.

[ Group 1 ]
rhea1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AEHR w 0 1
reha1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AHER w 0 1

[ Group 2 ]
rhea1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AHER w 0 1
reha1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AEHR w 0 1

[ Group 3 ]
rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AHER w 0 1
rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AEHR w 0 1

[ Group 4 ]
reha1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AHER w 0 1
reha1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AEHR w 0 1

[ Group 5 ]
rhea1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w 0 1
reha1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w 0 1

[ Group 6 ]
rhea1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AHER w 0 1
reha1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AHER w 0 1

[ Group 7 ] : Winboard default starting position
rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w 0 1

[ Group 8 ]
reha1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w 0 1

[ Group 9 ]
rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AHER w 0 1

[ Group 10 ]
reha1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AHER w 0 1


So then I tested the -sym command.
[ Group 7 ] : Winboard default starting position

[Event "?"]
[Site "?"]
[Date "?"]
[Round "-"]
[White "?"]
[Black "?"]
[Result "*"]
[Variant "janggi"]
[VariantFamily "janggi"]
[FEN "rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w 0 1"]
[SetUp "1"]

{--------------
r h e a . a e h r
. . . . k . . . .
. c . . . . . c .
p . p . p . p . p
. . . . . . . . .
. . . . . . . . .
P . P . P . P . P
. C . . . . . C .
. . . . K . . . .
R H E A . A E H R
white to play
--------------}
1. ab3 ih6 2. Hc2 Hg7 3. Ce2 Ce7
*

There are 6 movements. And exactly as shown below, the six movements of symmetry are displayed in the book and need to be moved.

[Event "?"]
[Site "?"]
[Date "?"]
[Round "-"]
[White "?"]
[Black "?"]
[Result "*"]
[Variant "janggi"]
[VariantFamily "janggi"]
[FEN "rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w 0 1"]
[SetUp "1"]

{--------------
r h e a . a e h r
. . . . k . . . .
. c . . . . . c .
p . p . p . p . p
. . . . . . . . .
. . . . . . . . .
P . P . P . P . P
. C . . . . . C .
. . . . K . . . .
R H E A . A E H R
white to play
--------------}
1. ih3 ab6 2. Hg2 Hc7 3. Ce2 Ce7
*

However, the movement of the book is as follows. And the book is disconnected.
99.9% 1 ih6

In addition, a movement record is created that ignores the FEN value of each group.


Now, I will explain [Group 2] again, where the inversion position is not the same.

[Event "?"]
[Site "?"]
[Date "?"]
[Round "-"]
[White "?"]
[Black "?"]
[Result "*"]
[Variant "janggi"]
[VariantFamily "janggi"]
[FEN "reha1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AEHR w 0 1"]
[SetUp "1"]

{--------------
r e h a . a e h r
. . . . k . . . .
. c . . . . . c .
p . p . p . p . p
. . . . . . . . .
. . . . . . . . .
P . P . P . P . P
. C . . . . . C .
. . . . K . . . .
R E H A . A E H R
white to play
--------------}
1. ab3 ih6 2. Hg2 Hg7 3. Ce2 Ce7
*

The six exact reversal movement positions are shown below.

[Event "?"]
[Site "?"]
[Date "?"]
[Round "-"]
[White "?"]
[Black "?"]
[Result "*"]
[Variant "janggi"]
[VariantFamily "janggi"]
[FEN "rhea1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AHER w 0 1"]
[SetUp "1"]

{--------------
r h e a . a h e r
. . . . k . . . .
. c . . . . . c .
p . p . p . p . p
. . . . . . . . .
. . . . . . . . .
P . P . P . P . P
. C . . . . . C .
. . . . K . . . .
R H E A . A H E R
white to play
--------------}
1. ih3 ab6 2. Hc2 Hc7 3. Ce2 Ce7
*
Only the moving coordinates of the pieces moving up and down from the center will be the same.

=============================================================================================

I need one last check.

1. When you first start Winboard, it starts from the following position.
[Group 7]: Winboard default starting position
rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w 0 1

I made a book, and it doesn't show up in the default start position when starting Winboard (it doesn't work).
So I have to read the FEN file again.(FEN file with default starting position saved)
And I could use the book again.
This means that Winboard has a problem in recognizing the starting position and the default position of the newly created book differently.
In other words, it is the same FEN, but it means that the display of the book at the default start and when book read through the file is displayed differently.

If you have any questions, please explain to me.


PS. Piece "Menu instead of Sweep Select" disappeared from general options after Ver.2020.409. Since... janggi has a lot of pieces, this was a very useful feature. Can you add it again?
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby H.G.Muller » 05 Nov 2020, 12:25

I had not gotten back to looking at the book problems yet, but I think I am ready to do that now. Before there were still too many problems with the engine overruling the symbol assignment (affecting the book encoding), and games refusing to load due to move notation problems.

Last time I tried creating a Janggi book I noticed the same problem as you: I tried to convert TOTAL.pgn to a book, and I got a book file. But no moves for the default initial position were shown. When I was investigating that I noticed that many of the games in TOTAL.pgn did not specify a result, and the results are used when creating a book from PGN. But when I then just copied the first few games of TOTAL.pgn to another file, added a result, and tried to convert that to a book, I get a completely empty book file! (Length 0 bytes.) I have not been able to figure out why this happens; adding some print statements in WinBoard for debugging showed that the the moves of the games are added to the memory buffer that contains the book, so apparently things go awry when that memory buffer is written to file. But that was as far as I got.

It is also still a mystery why 'Find Position' does not work for individual positions.

I have not tested yet if this also happens in other chess variants, or that this is unique to Janggi. It really should not make any difference what variant it is used for.

I will keep working on both problems, but I don't have very much time today to do that.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 05 Nov 2020, 14:44

summary of the contents you need to check when you have the time.

1. The book is created normally, and it works fine.
It can only work after FEN (Starting Position) file loading it.
I uploaded a book file and a pgn file for Winboard and the latest version of the engine to Google Drive for your testing. I specified all the games results in the pgn file.
However, I think,, not all positions. Only some positions were made into books. Because compared to the number of games, the number of positions created is insufficient. I don't know exactly this.
[Position FEN file.zip / new book.bin / new total.pgn / 1104.exe]

2.Thresholds-Match if position is subest
Check: Also match left-right mirror image
Using the above option works fine. (Find position)

3. Please delete the "{stalemate} 1/2-1/2" automatic judged function.

4. Start of book compatibility development (Mirroring position)

5. "Menu instead of Sweep Select" => Menu restoration request
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 07 Nov 2020, 11:15

edit
Last edited by janggi-korea on 07 Nov 2020, 11:18, edited 1 time in total.
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby janggi-korea » 07 Nov 2020, 11:17

I merged your code with the latest commit.
Can you confirm this?
I used game editing, but ponder didn't stop.
And on Winboard, the order of playing the engine output window changed from black to white. I have a problem with something.
Perhaps this could solve the reason why the engine keeps pondering in the middle of the game.
I uploaded the source to Google Drive.(Fairy-Stockfish-master muller.zip)

>> memory 5004
>> cores 7
>> new
>> random
<< Error (unknown command): random
>> variant janggimodern
<< setup (PH.R.AE..K.C.ph.r.ae..k.c.) 9x10+0_janggi rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w - - 0 1
>> level 40 5 0
>> post
<< Error (unknown command): post
>> hard
>> ping 8
<< pong 8
>> accepted setboard
>> accepted usermove
>> accepted time
>> accepted memory
>> accepted smp
>> accepted colors
>> accepted draw
>> accepted highlight
>> accepted reuse
>> accepted name
>> accepted sigint
>> accepted ping
>> accepted debug
>> accepted myname
>> accepted variants
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted option
>> accepted done
>> lift a3
<< highlight 9/9/9/9/9/Y8/1Y7/9/9/9
>> put b3
>> time 30000
>> otim 30000
>> usermove a3b3
<< info string classical evaluation enabled
<< 1 54 0 263 1 131500 0 b9c7
<< 2 73 0 598 2 299000 0 b9c7 a0a1
<< 3 106 0 917 3 458500 0 b9c7 a0a1 b7e7
<< 4 152 0 1320 4 440000 0 b9c7
<< 5 186 0 2408 5 602000 0 b9c7 i0i1 b7g7 e1f1
<< 6 28 1 11018 6 1101800 0 h9g7 h0g2 h7e7 h2e2 b9c7 b0c2
<< 7 28 1 17472 7 1164800 0 h9g7 h0g2 b9c7 b0c2 c6d6 e1f1
<< 8 28 3 37188 10 1062514 0 h9g7 h0g2 i6h6 b0c2 b9c7 h2e2 e8f8
<< 9 25 4 46528 10 1082046 0 i6h6 h0g2 b9c7 h2e2 h9g7 b0c2 h7e7 g3f3
<< 10 28 7 71172 12 1016742 0 b9c7 b0c2 c6d6 i3h3 h9g7 g3f3 g6f6 e1f1 b7d7 h0g2 h7e7 b2b7
<< 11 35 17 163901 14 947404 0 b9c7 h0g2 h9g7 i3h3 c6d6 b0c2 e8e9 e1e0 b7d7 f0e1
<< 12 35 19 182781 12 947051 0 b9c7 h0g2 h9g7 i3h3 c6d6 b0c2 e8e9 e1e0 b7d7 f0e1 f9e8 c3d3
<< 13 25 39 384080 18 965025 0 b9c7 i3h3 h9g7 h0g2 h7e7 b0c2 c6d6 e1e0 a9a7 d0e1 e7i7 i0h0 g6h6 @@@@ b7d7
<< 14 26 49 483019 19 967973 0 b9c7 i3h3 h9g7 h0g2 e8e9 e1e0 f9e8 b0c2 h7e7 d0e1 e7i7 i0h0 g6h6 c3d3 c6d6
<< 15 32 58 562180 15 965945 0 b9c7 i3h3 h9g7 h0g2 e8e9 e1e0 h7e7 b0c2 f9e8 d0e1 e7i7 i0h0 g6h6 c3d3 i9i8
<< 16 29 130 1251554 24 956845 0 i6h6 h0g2 h9g7 g3f3 b9c7 e1e0 e8e9 d0e1 f9e8 h2c2 e6d6 c2i2 i9h9 b0c2 g7e6 i2e2
<< 17 26 156 1490252 23 954066 0 i6h6 h0g2 h9g7 g3f3 b9c7 b0c2 e8e9 e1e0 e6d6 f0e1 d9e8 h2e2 g7e6 a0a1 b7d7 e2i2 i9h9
<< 18 33 209 1995394 25 954277 0 i6h6 h0g2 h9g7 e1e0 b9c7 h2c2 e6d6 c2i2 i9h9 i3h3 e8d8 i2e2 h7e7 b0c2 b7d7 i0i4 d9e9 f0e1 f9e8 e3e4 c6b6 c0e3
<< 19 28 277 2637479 22 951128 0 i6h6 h0g2 b9c7 h2c2 b7e7 c2i2 e6d6 e1f1 h9i7 b0c2 h7h2 b2e2 g9e6 e3f3 i9i8 i0h0 h2h8 i2i5 h8h0 i5i8 h0h8 g3h3
<< 20 36 316 2990241 25 945979 0 i6h6
<< 20 41 346 3264041 25 943091 0 i6h6 h0g2 h9g7 e1e0 b9c7 b0c2 e8e9 d0e1 d9e8 h2e2 h7e7 i3i4 b7d7 g3f3 d7a7 a0b0 c6b6 i4i5 i9h9 i0i4
<< 21 33 388 3651691 22 940188 0 i6h6 h0g2
<< 21 41 418 3920631 22 937725 0 i6h6
>> force
>> ping 9
<< pong 9
<< 21 40 481 4487923 30 932458 0 i6h6 h0g2 b9c7 b0c2 e8e9 e1e0 h9g7 e3f3 f9e8 f0e1 b7e7 a0a4 a9a8 g0e3 c6c5 h2e2 h7h5 b2b7 h5a5 a4d4 a8d8 d4d8 d9d8
<< 22 32 738 6824780 29 924641 0 i6h6 h0g2
<< 22 39 873 8065624 29 923051 0 i6h6 h0g2 b9c7 e1e0 h9g7 b0c2 e8e9 g3f3 d9e8 d0e1 b7e7 f3f4 c6d6 i3i4 h7f7 e3e4 g6g5 c0e3 g5f5 a0d0 f5f4 e4f4 c7d5
<< 23 41 1012 9351460 27 924057 0 i6h6 h0g2 b9c7 e1e0 h9g7 b0c2 e8e9 g3f3 d9e8 d0e1 c6d6 i3i4 b7e7 h2e2 h7h2 b2b8 a9a8 b8h8 e8d7 h8h3 a8e8 i0i2
<< 24 33 1041 9623196 25 923974 0 i6h6 h0g2
<< 24 41 1141 10519695 27 921406 0 i6h6
<< 24 36 1262 11576340 28 917155 0 i6h6 h0g2 b9c7 e1e0 h9g7 b0c2 e8e9 g3f3 f9e8 f0e1 b7e7 i3i4 d9d8 h2f2 a6a5 d0d1 c6d6 b2e2 h7f7 e2a2 e7a7 f2d0 f7d9 i4i5
>> memory 5004
<< 25 38 1309 11999753 27 916151 0 i6h6 h0g2 b9c7 e1e0 h9g7 d0e1 e8e9 b0c2 f9e8 f0f1 c6d6 g3f3 g6g5 b2e2 a6a5 a0a1 b7d7 i3i4 d7a7 e2a2 a9b9 h2d2 g5g4
<< feature GOTMOVE=1
>> cores 7
>> new
>> random
<< Error (unknown command): random
>> variant janggimodern
<< setup (PH.R.AE..K.C.ph.r.ae..k.c.) 9x10+0_janggi rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AEHR w - - 0 1
>> level 40 5 0
>> post
<< Error (unknown command): post
>> hard
>> ping 10
<< pong 10
>> force
>> setboard rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/1PP1P1P1P/1C5C1/4K4/RHEA1AEHR b 0 1
janggi-korea
 
Posts: 130
Joined: 18 Aug 2020, 12:12

Re: Winboard janggi "OpeningBook" compatibility development

Postby H.G.Muller » 07 Nov 2020, 18:52

From what I see it seems the engine ignores the 'force' command while thinking. (It was not pondering here.)

I thought we had this working before? Or was that just for a 'force' during pondering? I completely lost track of what source code we are using now. Can you post xboard.cpp here?
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Next

Return to Winboard and related Topics

Who is online

Users browsing this forum: Google [Bot] and 18 guests