Four digit quaternaries

Notes added 20 May 2003:

We've solved all three digit quaternaries.  

There are 256 games with 4 code digits [0,1,2,3].

Of these, 64 have final code digit zero, so they're equivalent to three digit quaternaries.

That leaves 192 games to consider.

For each of these, we know that the nim sequence is periodic.  We probably should write
a function that automatically determines the period.  No, forget that.

Let's try one at random, to see what happens in it.  Say we choose .2233.

We did this, and it is purely periodic of length 5 with nim sequence 0,1,2,3,4 and misere nim positions only.

Next!  Let's choose .2133.  Period 7.  Misere nim once again.

Next, .2132.  Misere nim again.

Probably what we want to do is calculate the first fifty genera for each of the 192 games,
and print out the code digits of the ones that have at least one non-tame genus.

Notes added 21 May 2003:

OK, we've run a search that considered every four digit quaternary (ie, octal game with code digits 0.d1 d2 d3 d4, with each
di between 0 and 3,inclusive).  For each such game, we compute its first 50 genus values, and marked the ones that have a non-tame
single heap genus.  There are 23 such games:

.0122
.0123
.1023
.1032
.1033
.1230
.1231
.1232
.1233
.1321
.1323
.1331
.2012
.2112
.3101
.3102
.3103
.3112
.3120
.3122
.3123
.3131
.3312

We'll now look at them in turn to see how hard they are to solve:

The Game  .0122 -- solved
The Game  .0123 -- solved  (* look closer, the next ones ARE ALL different codes! *)
The Game  .1023 -- solved
The Game  .1032 -- solved
The Game  .1033 -- solved
The Game  .1231 -- solved
The Game  .1232 -- solved
The Game  .1233 -- solved
The Game  .1321 -- solved
The Game  .1323 --solved
The Game  .1331 --solved
The Game  .2012 --solved
The Game  .2112 --solved
The Game  .3101 --solved
The Game  .3102 --working on it

3 August 2003.  Haven't found a solution yet.  This game behaves in a much stranger fashion than quaternaries so far.

Observation: the genera never seem to become longer than two digits in the superscripts, and we havent found
any position that involves a grundy number higher than three.  It might be that some kind of nonpretending description
is possible.  One way to explore this would be to collect all the genera that occur for positions in Partitions up to size 20 say.
Or maybe we need to look for a sort of SC-decomposition.  It seems like the pretending approach isn't quite right here.

Maybe we should start by characterizing frisky positions (ie positions that differ in normal and misere play).

One thing to do is build up a list of the possible genera that occur in this game.

There are eighteen possible genus values in the game with code {0, 3, 1, 0, 2}

tame genera [6]
{0, {1, 2, 0}}
{1, {0, 3, 1}}
{2, {2, 0}}
{3, {3, 1}}
{0, {0, 2}}
{1, {1, 3}}

wild genera [12]
{0, {1, 3}}
{0, {2, 0}}
{0, {3, 1}}

{1, {0, 2}}
{2, {0, 2}}
{3, {0, 2}}

{2, {0, 2}}
{2, {1, 3}}
{2, {3, 1}}

{3, {0, 2}}
{3, {1, 3}}
{3, {2, 0}}

We will do it by classifying the one-heap positions, then the two-heap ones, etc.

One heap friskies:

1, 6, 11, 16, etc   
5, 10, 15, 20 etc.

Two heap friskies:

Some guesses:  
1) Two identical heaps are never frisky, except for {1,1}.  Perhaps if we ever have two identical in ANY position it is not frisky, except for {1,1}?  No that's wrong for {2,2} even.
2) If {i,j} is frisky with i < j,  then {i,j+5} is also frisky with the same genus, for suitably large i and j
3) {4,4} tames everything, ie no frisky position includes {4,4}.  FALSE

We can characterize the two-heap friskies {i,j} as follows.  A graph of the behavior is shown below, where
pairs {i,j} that are frisky are plotted up to 30.

If either i or j is >= 13, then we can reduce it by the pretending function (5,13), ie if either i or j is 13 or larger, it
can be repeatedly reduced by 5 without changing the outcome.  Thirteen is the best possible value here---note that
{9,12} is frisky, but {9,7} isn't.

[Graphics:../Images/index_gr_744.gif]

Three heap friskies

It's not clear how to proceed here.  If we've got a three-heap position where one of the heaps is of size 1 or 2, then
we can use a suitably modified version of the table above.  

What about adding the heap of size 3 in?  It doesn't make any difference, the graph of friskies {i,j,3} looks exactly
the same as the graph for {i,j}

What about 4?  Adding in a four tames things down a bit.  We can reduce by 5 starting at heap 8:

[Graphics:../Images/index_gr_745.gif]

What about 5?  Nothing frisky at all when both heaps are larger than 4:

[Graphics:../Images/index_gr_746.gif]

What about 6? Still different behavior, with a big swath of frisky-free area but
eventual pretending function 5, 24:

[Graphics:../Images/index_gr_747.gif]

What about 7? Amazingly complicated----but it appears to satisfy period 20 starting at col 27?

[Graphics:../Images/index_gr_748.gif]



And below, (a bit out of order here) the graph for 12 = 7+5 looks similar, sort of, but with the periodic
portion moved up and out 5 units.  The 'great wall' now starts at 22, not 17...

What does it mean?  That if we know what the frisky behavior of {x,y,7} is, then we also know the frisky
behavior of {x,y,12}.  What is the relationship?  If {x,y,12} is given to us, and both x and y are greater than
17, then we can simultaneously reduce x,y AND 12 by 5, and look up the frisky status of {x-5,y-5,7}, instead.

What if only one of x and y is greater than 17?  Then it depends on the strip it's in, roughly speaking

[Graphics:../Images/index_gr_749.gif]

And the graph for 17=12+5 similarly shifts the great wall out another 5 units, but at the price of additional
complexity outside the great wall, in the strips, which don't settle down until the fourth strip.

[Graphics:../Images/index_gr_750.gif]

What about 8?  Not too bad...

[Graphics:../Images/index_gr_751.gif]

What about 9? Not too bad again.

[Graphics:../Images/index_gr_752.gif]

What about 10? Not too bad again.

[Graphics:../Images/index_gr_753.gif]

What about 11? A blank moat, similar to 6, then settles down

[Graphics:../Images/index_gr_754.gif]

[Graphics:../Images/index_gr_755.gif]
[Graphics:../Images/index_gr_756.gif]
[Graphics:../Images/index_gr_757.gif]
[Graphics:../Images/index_gr_758.gif]
[Graphics:../Images/index_gr_759.gif]
[Graphics:../Images/index_gr_760.gif]
[Graphics:../Images/index_gr_761.gif]

Since there are only 18 possible genus values for a position, it might be interesting to calculate to
what extent the genus of two summands determines the genus of a result.

We'll define a three-dimensional array of values numgen[g1,g2,g3] = x.  
The meaning will be that for g1 g2 genus values obtained from positions in some
fixed domain D, we get the result genus g3 a total of x times.  By varying D maybe
we can get some idea of how the genus of summands determines the genus of
the sum....

This code needs a lot of work...

[Graphics:../Images/index_gr_762.gif]
[Graphics:../Images/index_gr_763.gif]
[Graphics:../Images/index_gr_764.gif]
[Graphics:../Images/index_gr_765.gif]
[Graphics:../Images/index_gr_766.gif]
[Graphics:../Images/index_gr_767.gif]
[Graphics:../Images/index_gr_768.gif]
[Graphics:../Images/index_gr_769.gif]
[Graphics:../Images/index_gr_770.gif]
[Graphics:../Images/index_gr_771.gif]
[Graphics:../Images/index_gr_772.gif]
[Graphics:../Images/index_gr_773.gif]
[Graphics:../Images/index_gr_774.gif]
[Graphics:../Images/index_gr_775.gif]
[Graphics:../Images/index_gr_776.gif]
[Graphics:../Images/index_gr_777.gif]
[Graphics:../Images/index_gr_778.gif]
[Graphics:../Images/index_gr_779.gif]
[Graphics:../Images/index_gr_780.gif]
[Graphics:../Images/index_gr_781.gif]
[Graphics:../Images/index_gr_782.gif]
[Graphics:../Images/index_gr_783.gif]
[Graphics:../Images/index_gr_784.gif]
[Graphics:../Images/index_gr_785.gif]
[Graphics:../Images/index_gr_786.gif]


Converted by Mathematica      August 22, 2003