fairy-stockfish / Fairy-Stockfish

chess variant engine supporting Xiangqi, Shogi, Janggi, Makruk, S-Chess, Crazyhouse, Bughouse, and many more
https://fairy-stockfish.github.io/
GNU General Public License v3.0
606 stars 189 forks source link

Configurable bikjang rule #101

Closed kimqwer2 closed 4 years ago

kimqwer2 commented 4 years ago

Hello. I am Korean. I don't know English and use a translator. There is a rule called bikjang in Korean janggi, but it seems to be wrong in this program. The bikjang is a rule that allows the intestines to eat and make it a draw. for example 캡처 In this case, white is very disadvantageous. But white has a rule called bikjang. White can be used to make a draw using a bikjang. If the white moves to the right, the black head has nowhere to move. bikjang 캡처 or Even if the black escapes, the white will bikjang and become a draw. 캡처 So black is very advantageous, but there is a bikjang, We have to eat the white palace with the black palace and make it a draw. in other cases (When it is black turn, The photo above is bikjang because it is the turn of the white.) 캡처 In this case, black should not bikjang. Like the picture above, you have to block the path of the palace and block the bikjang. But this program is black trying to bikjang. 캡처 Black tries to bikjang despite its advantage, so the winning game becomes a draw. Therefore, I think the ganggi rule of Fairy-Stockfish is a little strange in this part. In addition, it is popular in Korea that there is no bikjang, and bikjang is often used in janggi competitions. It would be nice if you could choose the bikjang rule. thank you for your interest in Korean janggi.

ianfab commented 4 years ago

Fairy-Stockfish uses Janggi tournament rules where in this situation black wins in bikjang by material count, so this behavior seems correct to me.

If I understand correctly you would like to have the result of the bikjang rule as a configurable option. This is problematic for performance reasons, but in any case the first step would be to allow to configure a variant where bikjang always is a draw, which makes sense to implement.

If you want to prohibit bikjang completely then you can already use the flyingGeneral rule in the variant configuration as it is used Xiangqi.

ianfab commented 4 years ago

I now implemented it in the way that you use tournament rules if you select variant janggi and casual rules (bikjang is draw) as variant janggicasual.

kimqwer2 commented 4 years ago

Thank you. The bikjang of Janggicasual works very well. And If Variant = Janggi = no bikjang rule, I think Now Variant = Janggi(no bikjang rule)is applied with the rules of other countries.

Programs seem to think that leaders win or lose when they eat leaders. -> These rules do not exist in Korean Janggi. Only a draw at the bikjang rule. = Variant = Janggicasual There is no rule that determines victory or defeat. And in Variant = Janggi (no bikjang rule), leaders don't affect. There is no victory, draw or defeat by interaction among leaders.

Leaders are only related to bikjang rule, and not related to no bikjang rule. Variant = Janggi doesn't win or lose or draw even if the leaders are in a straight line. Variant = Janggi is not related to each other even when leaders are in a straight line. Even if the leaders are in a straight line, it doesn't affect anything for example 캡처 Pictured above Variant = Janggi is applied (Up and left) is the reaction of the program at the turn of white. (bottom, left) is the reaction of the program when it turns black. The program ended the game in two situations. But in the Janggi rule, neither situation is over. Even if there are leaders in a straight line, the game continues because there is no impact. White can play the game like (up, right). Black can play the game like (bottom, right). Everything can be moved except for things that cannot be moved. 제목 없음 Any movement is possible. The same is true for the white turn. Thank you for making a good program.

ianfab commented 4 years ago

Do I understand correctly that you would like to disable the bikjang rule, i.e., as if the bikjang rule did not exist?

kimqwer2 commented 4 years ago

No I think the bikjang rule you implemented is good. Variant = Janggi Casual ->good The bikjang rule is used a lot in Korean Janggi competitions.

and variant = Janggi -> It's a rule that people use a lot. What is described above is about variant = Janggi

Variant = Janggicasual -> bikjang rule = very good Variant = Janggi -> no bikjang rule = This is what I want to modify.

The bikjang rule exists. It's a rule that makes a draw like Janggicasual implemented in the current program. What I'm trying to say is, Variant = Janggi in the program rules thinks it's strange. 캡처 In Variant = Janggi, these two influences do not go out of that square. In Variant = Janggicasual, these two influences were on each other.

Variant = Janggi 제목 없음 Leaders can move because they don't affect each other. The game continues. or you can move something else while the leaders are facing each other.

but The "Variant = Janggi" in this program affects each other. This is wrong.

ianfab commented 4 years ago

If I understand correctly now, you want to keep the bikjang rule for "janggicasual", but remove it for variant "janggi". However, the idea of those two variants is:

Variant janggi should represent the official tournament rules, and we will not change that. What we could do is to add a third variant that completely disables bikjang, if this would help.

kimqwer2 commented 4 years ago

That's what I thought. You got it perfectly. I understood "Bikjang is enabled." = a means to avoid a draw And every rule has a three-point repeat limit. https://www.pychess.org/5tSMIMK9 cannot be repeated like this. 캡쳐 The meaning of "3수" in the picture means 3 moves. A -> B -> A is possible. A->B->A->B is not possible. (The moment you leave 3 moves, you will be defeated.) Other than "3 move", you have to move somewhere else or other material. This applies to all rules so as not to take meaningless time.

Variant = Janggi ( = a means to avoid a draw) 1 Bikjang is enabled and results are based on material count 2 Repetitions Are Prohibited. (3 move prohibited)

I think "Variant = Janggicasual" is the closest rule to the Korean Janggi competition. 1 Bikjang always is a draw 2 Repetitions are prohibited. (3 move prohibited)

And the other "Variant" rule is... (popular rule) 1 There is no Bikjang 2 Repetitions Are Prohibited. (3 move prohibited)

I think it's okay to divide them into three Variants. Thank you for reading my comments.

ianfab commented 4 years ago

Thanks. Then for the moment let us call the third variant jangginobikjang. Can you help me to understand under which circumstances these different rule sets are used in Korea? Currently, my understanding is that:

If this description is correct, maybe janggicasual should be renamed to something like janggitraditional for clarity, since the third rule set better fits the term "casual" than the second one.

kimqwer2 commented 4 years ago

As far as I know, it's a perfect explanation. Ordinary people don't use bikjang often. Bikjang is used in amateur games, official games

I think it's perfect to change it this way as you claim. jangginobikjang -> janggicasual janggicasual -> janggitraditional

ianfab commented 4 years ago

Thanks, I will do that then.

kimqwer2 commented 4 years ago

I'm sorry. There must have been a mistake with the translator. I understood that "no draw" is preferred for the development of the program. Currently, there is no "no draw" rule for "Variant=Janggi" in Korea. (=rules not found in Korea) To redefine it by a modiied name, janggi (no draws) = Special rules for program development (does not exist in Korea). I understand that "no draw" is used in programs because it has a good effect on program development. janggitranditional (bikjang draw) = traditional rules and modern rules[(traditional rules and modern rules) = I understand that they use similar rules.] , professional competitions, amateur games, Most official games janggicasual (no bikjang) are unofficial simplified rules that are sometimes used in casual games It exists in Korea. = janggitranditional(official rule) , janggicasual(unofficial rule) It doesn't exist in Korea. = Janggi

-> I am revising. This opinion is not right.

ianfab commented 4 years ago

The reason for the "no draw" rules has nothing to do with program development, it only reflects the rules that are to my knowledge used in Janggi tournaments of professional players, which I know from a reliable source, and this topic has already been thoroughly discussed on our discord server.

kimqwer2 commented 4 years ago

Thank you for giving me a discode server. I understood after reading the article within the discode. I thought there was no score system in this program. But I didn't know that they used bikjang, which divides victory and defeat based on the score after the bikjang I'm sorry for my poor understanding. As discussed in the discords, bikjang also has a score system. There is also a draw. Discord's argument is correct. I'm sorry to have taken your time.

janggi (no draws) = modern rules, professional competitions, Most official games

janggitranditional (bikjang draw) = traditional rules, amateur games

janggicasual (no bikjang) are unofficial simplified rules that are sometimes used in casual games

This is perfect. There are many Janggi rules used in tournaments, but I think "Variant = Janggi" rules are right. Thank you. I question has been perfectly solved.

ianfab commented 4 years ago

Ok, thanks for the clarification.