|
Knots (aka Daisies): Octal Game 4.7
My paper [pdf] treats this game (and several related ones) exhaustively.
It was independently (and earlier) solved by Allemang in his MSc thesis using genus theory.
Normal Play Nim Sequence
0 1
------
0+ 0 1
2+ 2 1
4+ 2 1
The 4.7 nim sequence is periodic of length 2the values in
final row of the table repeat themselves indefinitely.
Misère Play
I've taken the liberty of copying over Allemang's characterization of the game
to this web site (the one I give in my paper is equivalent):
Knots Explained
By Dean Allemang
Content copied from http://games.happydino.com
Normal Play
Playing knots in normal play is very easy - the trick is to count even strings and odd strings. If you always present your opponent with an even number of even strings, and an even number of odd strings, you will be able to force a win.
Why?
To explain why this strategy works, we need to talk about the parity of a string; a string with an even number of knots has parity 0; a string with an odd number of knots has parity 1.
By keeping an even number of strings of the same parity, we have paired off the strings of that parity. So when our opponent plays in one string of a certain parity, we can make a corresponding play in another string of the same parity.
What kinds of plays can our opponent make? From an even string, they can cut between two knots, resulting in either two even numbers or two odd numbers, or they can untie a knot, resulting in one even an one odd number. Either way, you can do the same thing in another string of the same parity. This guarantees that after you have played, an even number of strings of a particular parity have been added or removed. This means that you can again present your opponent with an even number of even strings, and an even number of odd strings.
When you get to the end, and you present your opponent with 0 (an even number) even strings and 0 odd strings, he will not be able to move, and you will win.
Try this on the Easy game; find the move that will result in an even number of even strings, and an even number of odd strings. Then when the machine moves, make a similar move in the other string of the same parity. Keep going until the machine has no more moves, and must concede the game to you. If you slip up, you won't get a second chance; once the machine is winning, it plays a perfect game! Of course, you can use the HINT button to make sure of your move; if you have a winning move, it will show it.
Misère play
Playing knots in misère play is a bit harder. Often in misère play, the best strategy is to play as if you were playing in normal play, until the very end, when you switch. This strategy works for Knots, up to a point.
Try it on the Easy game. First learn how to win in normal play. Now play the same way. But watch out! When the position gets down to the point where there are only very short strings (no more than 3 knots per string), watch out, and change strategy. Keep in mind the following rule:
The "short string" rule: When the position consists only of strings of length 1 and 3 (not 2!), you will win if you present your opponent with a position with an odd number of strings.
So, when you get down to a position like this:
1 1 1 1 3 2
If you play in the string of length 2, then the short string rule will apply. You can either play from the string with 2 knots into two strings with one knot each (by cutting between them), or one string with one knot (by untying one knot). So you can present one of the two following positions to your opponent:
1 1 1 1 3 1
1 1 1 1 3 1 1
Which will it be? By the short strings rule, you should present an odd number of strings, so you should choose the second move.
What about very long strings?
The short string rule will help you win a game of knots when all the strings are short; if there are longer strings, you can use the strategy for normal play until you can use the short string rule. However, there is another twist to the game of knots, when a single string is considerably longer than any other. This is just what happens in the hard game. You can have the machine play the winning side by playing another hard game; if you take one knot from the end of the first string, then the machine is playing the same position in the hard game.
What's happening here? If a single string is long enough, the game degenerates to both players taking a single knot off that long string, until one player can cut it into two strings of 3 knots and use the short string rule. Which player can do that? As it turns out, when there is a long string present, the correct move is just the opposite of the normal play rule; the number of even strings and the number of odd strings must both be odd.
How do you tell when a string is long enough? You can figure this out using the following table:
n 0 1 2 3 4 5 6 7 8 9 ...
t(n) 0 0 1 0 1 2 3 4 5 6 ...
w(n) 0 0 0 0 0 1 0 1 2 3 ...
To decide if the longest string is long enough, look up the w value of that string, and subtract the t value of all the other strings. If the resulting value is 2 or more, then the long string rule applies.
In summary, you can win if you follow these rules:
If all strings are of length 1 or 3, a winning position is one with an odd number of strings.
If the difference of the "w" value of the longest string, minus the "t" value of all other strings is less than or equal to zero, then every winning position has an even numbers of even strings, and an even number of odd strings.
If that difference is two or more, then every winning position has an odd number of even strings, and an odd number of odd strings.
If you play the hard game and ask for hints on a regular basis, you can see the results of this rule.
|