Re: Could be bug in sol --freecel



I believe these moves are possible and correct.

In the case of the first one; there are two empty slots in the reserve
and one in the tableau. It is actually possible to move a stack of six
cards. Card#1 and #2 to the reserve, #3 to the tableau, #2 and #1 from
the reserve #3. Then cards #4 and #5 to the reserve, then the #6 to the
new stack. The #5 and #4 from reserve, #1 and #2 to the reserve, #3 to
the new stack and finally #1 and #2 to the new stack. 

Rather like the towers of Hanoi puzzle.

The code in freecell.scm is
...
       (<= (length card-list)
           (* (+ (empty-freecell-number) 1)
              ($expt 2 (max (- (empty-field-number)
                               (if (empty-slot? field-id) 1 0)
                               (if (empty-slot? start-slot) 1 0))
                            0))))
...
empty-freecell-number is the count of empty reserves 
empty-field-number is the count of empty tableau slots.
I think this calculates at (reserves-slot+1)x2^(tableau-slots less one
if moving to an empty stack). Which  in this case is 3*2^(1-0) = 6.

In the second  case it is (2+1) x 2^(3-1) = 12.

HTH

Ed.


On Sun, 2012-04-08 at 22:35 -0400, Mark LaPierre wrote:
> Hey all,
> 
> Maybe I don't understand the rules of FreeCell but it seem to me that 
> there is a problem with the suggestion process.
> 
> Error1A.png shows a suggestion to move four cards when there are only 
> two open reserve spaces.  By my understanding of the rules I should only 
> be able to move a maximum of three cards at once.  Error1B.png shows the 
> playing surface after the illegal move has been made.
> 
> Error2A.png shows a suggestion to move ten cards at a whack.  That 
> should not be possible even if all the reserve spaces were empty. 
> Error2B.png shows the playing surface after the illegal move has been made.
> 
> Am I just blowing smoke here or is there something not quite right?
> 
> FreeCell Solitaire 2.28.2
> 
> [mlapier@mushroom ~]$ uname -a
> Linux mushroom.patch 2.6.32-220.7.1.el6.i686 #1 SMP Tue Mar 6 21:21:22 
> GMT 2012 i686 i686 i386 GNU/Linux
> [mlapier@mushroom ~]$
> 
> CentOS 6.2
> 
> _______________________________________________
> games-list mailing list
> games-list gnome org
> http://mail.gnome.org/mailman/listinfo/games-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]