[comp.sys.mac.programmer] Seahaven Tower Resource

krey@gmdzi.UUCP (Juergen Krey) (03/16/90)

Hi! 
I enjoy playing the solitairy card game Seahaven Towers, and 
i want to know whether all initial configurations can be solved.
I wrote a little simulator with some heuristics to try some
really difficult layouts, but til now all config's could be solved.
Another problem concerns the Indexor file in the system folder, which 
contains the latest state of the recent game - rather strangely
coded. I suppose the resource TOWR to have the board-info's, but 
don't manage to decrypt.
Any thoughts ???

wilson@csli.Stanford.EDU (Nathan Wilson) (03/17/90)

krey@gmdzi.UUCP (Juergen Krey) writes:

>Hi! 
>I enjoy playing the solitairy card game Seahaven Towers, and 
>i want to know whether all initial configurations can be solved.

It's easy to come up with an intial configuration that is unsolvable.
For example, imagine the first column from top to bottom is 7, A, 2,
3, 4 of spades and the two cards in the spaces up above are the 5 and
6 of spades.  The 5 and 6 can never move until the 7 is visible.  The
4 and 3 can only be moved to one of the open slots.  Then all the
spots are full and you're hosed.  Note that this problem could hold
for any sequence of seven cards (of which there are seven), in any
suit(4), in any column(10) and that the cards in slots above could be
in either order(2).  Hence there are at least 7*4*10*2*(45!)
shufflings of the deck that would work.  That is
66988443684668908954699370437568320436054890905600000000000 possible
shufflings (isn't arbitrary precision math fun!).  But given that
there are
80658175170943878571660636856403766975289505440883277824000000000000
total possible shufflings, you only have a 1 in 674274182400 (that's 600
billion for those who don't want to count those decimal places) chance
of ever encountering this particular problem.  Now there are probably
other more common no win situations that you can get into, but this
was the simplest I could come up with off the top of my head.

Nathan Wilson
Teleos Research
nathan%teleos.com@ai.sri.com

PS. I don't think I'm really quite as nerdly as this note sounds.  I
just had Lisp going and it's a Friday so what the hey.