Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
quasar098 authored Oct 30, 2023
1 parent 5b40f18 commit ab4aff0
Showing 1 changed file with 38 additions and 6 deletions.
44 changes: 38 additions & 6 deletions udctf-2023/mcnet-6-83/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,49 @@ i am not sure if anyone has ever played the impartial game called "21" in their

if you have, this challenge is free

basically, the original impartial game "21" is to count to 21 with another person, and whoever says 21 loses. however, you can increment the current number by 1, 2, or 3.
basically, the original impartial game "21" is to count to 21 with another person, and whoever says 21 (or above) loses. however, you can increment the current number by 1, 2, or 3.

so basically that challenge would be mcNET 3-21.
so for example, the current number starts at 0 and the first turn can result in the current number being 1, 2, or 3. for the next turn, the other player can bring it to 2, 3, 4, 5, or 6.

the solution for the game 21 is to bring the number to 20, so that the opponent has to say 21.
to get to 6, it is required that both players increment the current number by 3, so there is some strategy to this game

notably, no matter what the first player says, 1, 2, or 3, it is always possible for the opponent to get the current number to four
the winning strategy for 21 is to bring the current number to 20, because that will force the other player to say 21.

then, no matter what the first player says, 1, 2, or 3, it is always possible to bring the number to a multiple of four.
so, how do you get to 20 reliably?

likewise, it is always possible to bring the number to a multiple of 7 in 6-83. just try it yourself
well, if the opponent goes first, no matter what they say, 1, 2, or 3, it is always possible for you to get the number to 4.

here are some examples:

```
0 -> +1 -> +3 = 4
0 -> +2 -> +2 = 4
0 -> +3 -> +1 = 4
```

so no matter what the first player does, the second player can always bring it to 4 from the start.

now think about the next turn, the opponent goes next when the current number is 4, and so no matter what they say, it is possible for the next player to bring the current number to 8.

so like:

```
4 -> +1 -> +3 = 8
4 -> +2 -> +2 = 8
4 -> +3 -> +1 = 8
```

this works for all multiples of 4, and so it is possible to win (if you play as the second player) no matter what in the game 21, because the second player can get it to 20, which is a multiple of 4.

however, in the 6-83 game, the player (me) goes first. however, the number can be incremented by 1, 2, 3, 4, 5, or 6, and the goal is to not say 83.

to win in that game, the goal is to say 82, so the other player says 83.

that means that any integer n where 82 = n (mod 7) is a good number because it will allow you to forcibly say 82.

so, the lowest positive integer n is 5.

therefore, it is best to start with 5, and then say that number plus 7 because it will always be possible no matter what the opponent says.

```
82
Expand Down

0 comments on commit ab4aff0

Please sign in to comment.