Sea&Gull wrote:
I made one guess - count of possible wins of the first and
second player on the 4x4 board is in direct proportion to
count of their wins on the 4x2 board (due to the symmetry of
the 4x4 board and possible moves).I have not managed to prove it mathematically,
so my program below may be totally wrong...
That was a good try, Sea&Gull. Your attempt does have some of the
elements of the solution that I will post tomorrow. And it even gets
the right answer (well, alright, I mean, if it agrees with MY program
as to what the right answer is!). Your solution is partly on the right
track, in that you have:
1. Devised an efficient algorithm for actually playing games (using
bit operations).
2. Made an attempt at reducing the number of games that have to be
played in order to reach a solution.
Both of the above elements are critical to success. There's a couple
of things missing, though:
1. A solution that uses no other knowledge about the game than that
provided in the basic rules of play. Appealing to a mathematical
conjecture, whether true or not (and no matter how interesting) is not
allowed by these rules--unless the proof can somehow be contained
within the program itself. If someone came to me and said, "I can
prove that the second player can always win", and then wrote the
following ruby program:
puts("Second player wins")
I'm afraid I'd have to disqualify him, too! But he might deserve some
points for chutzpah and simplicity, and getting an answer that agrees
with mine
2. I suggested that there should be "bonus" points for making the case
that your program gets the right answer for the right reason. I'm
starting to think that this should have been a *requirement*.
<SPOILER>
I'll drop a big hint here: The board can be represented by a 16-bit
number. There are a HUGE number of games that can be played. BUT,
there are only a certain number of positions that can be arrived at
during play. And all of them are either winning positions or losing
positions.
</SPOILER>
Cheers,
Bob