Monika-After-Story / MonikaModDev

DDLC fan mod to extend Monika
http://www.monikaafterstory.com/
Other
1.18k stars 685 forks source link

[Bug, and perhaps a discussion]Chess Draw things #9123

Open Wingdinggaster656 opened 2 years ago

Wingdinggaster656 commented 2 years ago

A content of my ChessButHumanized project.

Currently, our request draw condition is that it has been 40 turns since the last capture happened(See #6204 and #6163).

A not-so-polite conjecture, if you'll excuse my rudeness: Devs are not chess pros, they may not even know all rules. I don't blame them at all, because it's perfectly reasonable.

Here's the thing: Chess already has a draw rule(not stalemate), and as far as I know, the chess library MAS is currently referencing includes that rule. The rule is that, if after 50 continuous turns:

  1. No pawn moved.
  2. No capture happened.

Then the game is draw.

So our current request draw condition is somewhat strange. Is this what the Dev team is worried about: There's only one king left on both sides, since it's impossible to checkmate, so the game won't end? In fact, if this happens, the game will draw immediately, because there are not enough pieces for a checkmate. This is also the formal chess rule, and is also written in the Python library we referenced.

I have the ability and interest to develop a more humanized draw request system. I can let Monika request draw when the situation is just too annoying(like a Closed Position game), and when the game is basically already a draw, just need a few more turns to wait the rules above happen(like a different-color-bishop-endgame, if you don't know), etc. In conclusion: She is going to request draw like a real human. Now I opened this issue, I just want to see you guys' views, so I can suit most people's need.

As for the BUG:

Actually, it was this bug and a few other minor details that led me to assume that the team was not chess pros. Again, sorry for this rude conjecture. Well, they obviously didn't consider those two special draw rules(which is 50-turn-no-capture-no-pawn-move-draw and no-enough-piece-to-checkmate-draw). The result is, when these two cases happen, Monika still says: Looks like we have a stalemate, which is totally not logic here.

EDIT: There is also another possibility to draw, that is 3-repetition-draw: If the exact same situation is presented three times (consecutively or not), the game immediately draws. I glanced at the Python library we referenced, and from what I could see, it also wrote that rule. In MAS, it's true that when this 3-repetition happens, the game ends. But Monika still says it's a "stalemate".

If the Dev team agrees, then, give me some time and I can fix this bug.

Justformas commented 2 years ago

Based on old issue(s) I read I think they have looked or were waiting for someone who knows more about chess in the past, so yeah they may not be chess experts, but there's potential benefits to that. For example it may have helped keep the atmosphere more casual. I don't just mean for "beginners" by chess.com standards, I mean for basically "new players" other than maybe a rough understanding of the rules. Not saying it's perfect right now for new players, but still. Actually right now even though the difficulty may start higher than 350 (hard to say for me though), I'm thinking that (at least for the first several levels) it might increase slower per level than your project might. Not sure how I feel about that.

As for the request draw thing, so it is 40 moves instead of 50. So does Monika accept whenever you make this "request"? It might be 40 instead of 50 just to cut the player some slack. Also another thing; the player might not request a draw even if they can, which is why having those automatic draw situations can still be good. This just lets them request a draw a little sooner than 50 moves if they want.

Oh and if you think that might be strange, well there is currently also the option to play with "casual" rules, which doesn't count stalemate as draws. For this, Monika basically says that whoever's king is trapped first (they can't make a move without putting their king in check) losses, which, chess rules aside, honestly makes sense from a logical point of view to me. But that's a whole another discussion lol.

Wingdinggaster656 commented 2 years ago

Based on old issue(s) I read I think they have looked or were waiting for someone who knows more about chess in the past, so yeah they may not be chess experts, but there's potential benefits to that. For example it may have helped keep the atmosphere more casual. I don't just mean for "beginners" by chess.com standards, I mean for basically "new players" other than maybe a rough understanding of the rules. Not saying it's perfect right now for new players, but still. Actually right now even though the difficulty may start higher than 350 (hard to say for me though), I'm thinking that (at least for the first several levels) it might increase slower per level than your project might. Not sure how I feel about that.

As for the request draw thing, so it is 40 moves instead of 50. So does Monika accept whenever you make this "request"? It might be 40 instead of 50 just to cut the player some slack. Also another thing; the player might not request a draw even if they can, which is why having those automatic draw situations can still be good. This just lets them request a draw a little sooner than 50 moves if they want.

Oh and if you think that might be strange, well there is currently also the option to play with "casual" rules, which doesn't count stalemate as draws. For this, Monika basically says that whoever's king is trapped first (they can't make a move without putting their king in check) losses, which, chess rules aside, honestly makes sense from a logical point of view to me. But that's a whole another discussion lol.

Either way, I believe that the current draw request system is not like a human. My goal was simple: to make her look like a real person. So my plan was that the player could ask for a draw at any time in the future, but Monika would react based on the battle situation and the difficulty of the current chess, have a variety of conversations. Meanwhile, there would be a chance that Monika ask player for a draw. The reason why Monika ask for a draw could be various, examples:

  1. She knows the game is having a 99% chance to draw(like different-color-bishop-endgame, see this FEN: 5k2/8/1b3p2/4pPp1/p1B1P1P1/P7/4K3/8 w - - 0 1), so keep playing is basically a waste of time.
  2. She just found this position really suffering to consider about it
  3. She wants to pretend that she doesn't have an advantage anymore and wants the player to "have mercy" (but actually she is the one winning).

In a word: like a real person.

Also, in any case, you should note that the current code has a serious bug: Monika considers draws that are not requested by the player to be a stalemate. This has nothing to do with the "relaxed atmosphere". This is definitely a bug, not any reasonable.

EDIT: What I'm trying to do is not make the chess game serious. My goal, all along, has always been to: make her more like a real person. I think by improving the draw request system, instead of creating a serious atmosphere, it actually makes the player feel more relaxed and casual.

Justformas commented 2 years ago

My goal was simple: to make her look like a real person. So my plan was that the player could ask for a draw at any time in the future, but Monika would react based on the battle situation and the difficulty of the current chess, have a variety of conversations.

In a word: like a real person.

Oh I see, so not only will she be able to request a draw like you were saying, but the player will be able to request a draw at any time and have her react accordingly. Yeah that sounds good. As for the bug, yes stalemate isn't the right term in those situations, but stalemate is effectively a draw (outside of casual rules) so that word is just getting substituted I guess. It could and should probably just be changed to "draw" for those situations though.

ThePotatoGuy commented 2 years ago

If I'm understanding this right, you want to:

All of these seem fine to me, just don't make her unbearable to both casual and non-casual players.

Justformas commented 2 years ago
  • rename stalemate to draw

Just to be clear about this, when a stalemate actually happens it could still be called stalemate. But stalemate is only a specific type of draw, where the current player who's turn it is can't make any move without putting their king in check. Making a move that puts your king in check is illegal to do in chess. So when a player is in that situation, it results in a draw since the objective is to checkmate the opponent's king, not just trap them (except under "casual" rules where it's a loss for that trapped player).

But other draws should be called draws, not stalemates. For instance, the 50 continuous turn draw, the not-enough-pieces-to checkmate draw, and the 3-move-repetition draw previously mentioned. But Monika calls those stalemates which is incorrect, so she should at least call those situations draws specifically.

Wingdinggaster656 commented 2 years ago

If I'm understanding this right, you want to:

  • make Monika request draws from the player in a realistic way and expand when it happens
  • rename stalemate to draw
  • make player draw requests always available but change the reactions based on the board

All of these seem fine to me, just don't make her unbearable to both casual and non-casual players.

100% agree with "don't make her unbearable to both casual and non-casual players".

Yet I still have one question: Let me just relist, chess has the following draw possibilities:

  1. Request a draw.
  2. Stalemate
  3. 3-repetition draw
  4. 50 continuous turns without capturing and pawn movement
  5. No enough pieces to checkmate

The current Casual Rule is to ban Stalemate, what about the possibility 3 and the possibility 4? Do they need to be included in Casual Rule as well?

(Possibility 5 should always exist, obviously.)

Justformas commented 2 years ago

The current Casual Rule is to ban Stalemate, what about the possibility 3 and the possibility 4? Do they need to be included in Casual Rule as well?

I was actually just wondering about that as well, considering the confusion around the term stalemate getting used for any type of draw. I had actually guessed that the 3-repetition draw and 50-continuous-turn draw were still draws under casual rules, since Monika talks about the "trapped" player when explaining stalemates in casual rules. So you're saying that right now those other things are considered draws.

I'd probably prefer if those other things didn't count as automatic draws under casual rules, especially the 3-repetition draw. However, if 40 or 50 turns have passed without any pawn movement or pieces getting captured, I think the player (and maybe Monika) should still be able to request a draw under casual rules. But if Monika requests it then the player would be free to decline it. I know you want to improve the request draw system anyway, but I still figured I'd mention that case.

ThePotatoGuy commented 2 years ago

Don't include 3. Only include 4 at a lower number of turns, people will not realistically sit there for 50 turns of inaction. I think we currently do 40 turns, right?

Justformas commented 2 years ago

Don't include 3. Only include 4 at a lower number of turns, people will not realistically sit there for 50 turns of inaction. I think we currently do 40 turns, right?

40 turns is when the "request draw" option becomes available for the player to use. But at 50, it automatically ends in a draw since the chess library MAS uses follows that formal chess rule. I definitely think that "request draw" should still be available after a certain number of turns under casual rules, but I'm saying that the game doesn't necessarily have to end automatically after a set amount of turns under casual rules.