acunniffe / ghq

https://playghq.com
2 stars 0 forks source link

Figure out weird endgame stalemate/win scenarios #18

Open APTy opened 2 weeks ago

APTy commented 2 weeks ago

Scenarios

HQ vs. HQ + Artillery

For this I think we have to enforce that if a player can make at least 1 move during a turn, then they must. Otherwise, they can just stand still in the attacker can never win.

But then the question is: if they can't make any moves, is it a stalemate? Like this case:

Screenshot 2024-11-04 at 8 19 11 AM

I can't see a way for red to win with HQ + Artillery. Even though it feels like it should be winning.

HQ vs. HQ + Infantry

This can happen in an HQ + Art vs. HQ + Infantry. Feels like a winning endgame, but we need to play with it, possible that the defender can run around forever.

acunniffe commented 1 week ago

After playing a lot of endgames with Clay + Tyler we figured out a few losses by insufficient material

< 2 Infantry is not winnable < 3 Artillery is not winnable. You could mate with 2, but only if opponent makes huge mistakes and walks right into the corner

TBD: I think if you have heavy artillery and a normal artillery it's possible to win but only under certain initial conditions.

A mix of < 2 infantry and < 3 artillery is not winnable unless there's some penalty for skipping. Opponent could turtle themselves indefinitely.

Proposal:

  1. Skipping all 3 moves is a forfeit. Prevents turtling. You can skip 2 or 1 move per turn but all 3 must be a forfeit
  2. If both players have < 2 infantry and < 3 artillery it's an automatic draw by insufficient material. But if either player falls under the limit play continues until timeout or victory
APTy commented 1 week ago

I agree on point (2) that if players have < 2 infantry or < 3 artillery it's an automatic draw (EDIT: < 2 artillery, see post below).

On point (1), I'm not yet sure whether skipping all 3 moves should be a forfeit.

I think if you're forced to skip all 3 moves (because you have no legal moves) it could be considered a stalemate. You haven't won, but neither has your opponent. This is a nice piece of balance from chess that forces your opponent to play accurately even when they have an advantage, and gives players who are in a clearly lost position a reason to keep fighting.

Maybe you just shouldn't be allowed to skip all 3 moves, like you have to make at least one move. Or perhaps there shouldn't be skips at all. In chess, I like how you can't skip moves and you can force your opponent into Zugzwang ("a player is said to be "in zugzwang" when any legal move will worsen their position.") This is a nice strategic part of the game.

I agree we need to prevent too much turtling, but I think from a UX perspective it's better to enforce "you have to make at least 1 move" than to allow "you can skip all moves, but then you forfeit". Let's just disallow skipping all moves and force them to keep fighting.

APTy commented 1 week ago

Also, after playing some endgames (added two to the /learn page), I think the following cases are winnable with best play:

I think the following are unwinnable, even with best play:

For possibly winnable games, we should allow them to continue (possibly with exceptions for threefold repetition, no legal moves, and 50+ turn limit or something).

For unwinnable games, they should be a draw by insufficient material.

APTy commented 6 days ago

Here's an example of an interesting "turtle" position, where blue has backed themselves into a seemingly unbreakable defense. If blue is allowed to skip ad infinitum, then it's a stalemate. Red can never find enough space for a 2 on 1, and can never reach blue's artillery.

Screenshot 2024-11-17 at 7 05 09 PM

If we say that blue skiping here results in a forfeit, I'm not totally opposed to the idea, as this turtle feels a bit lame. However! In this particular position, blue is in zugzwang, and if they're forced to make at least 1 move, then blue must play HQ -> c8, and the game is lost.

What I like about this is: it's not a free win for red. Blue is losing, but it's still up to red to prove the advantage, play correctly, and win the game.

acunniffe commented 6 days ago

Interesting. Playing this back: you're saying instead of making skipping 3 turns a forfeit, we'd add a rule requiring a minimum of 1 move per turn?

That (probably) makes turtling less impossible. Although one could imagine a position where you move your pieces in a carousel such that a turtled position is maintained.

I'd be for a 1 move minimum

APTy commented 6 days ago

Yeah let's start there! Created #117 to address this