Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

fc-solve-discuss · Freecell / Patience Solving Discussion

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 1019 - 1048 of 1345   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#1019 From: "newtton" <newtton@...>
Date: Sun Oct 18, 2009 8:06 pm
Subject: challenging Freecell position
newtton
Send Email Send Email
 
I ran across a Freecell position that gives your solver (and others)
difficulty.  (The moves leading to this position are given below.)  Here's what
happened:  I was playing with Freecell Pro and got into this position.  When I
checked the solvability, I got Yes, but I couldn't see how myself.  I fumbled
around a bit and then checked the solvability again, and it said No.  This would
not have been a surprise except the only difference from the first position was
a reversible move (the three of clubs can be moved freely between two columns.) 
What a shock!  I thought the solver always told the truth (or came to no
conclusion at all.)
    I reported the problem to Michael Keller and he suggested the newer version
of FC Pro that has 3 solvers, including yours.  Yours reports this position
impossible.  But the 3rd solver, Patsolve, reported it solvable -- whereever the
3 of clubs was placed.  Using the solution generated by Patsolve I was able to
see how to get out of the difficulty.
    This is just my opinion, but it seems to me that if you are going to release
a program to the public and call it a solver, then it is understandable if it
can't come to a conclusion about certain positions, but it should at least come
to the correct conclusion if it does.

#715037 Attempt: 5 NumFcs=4 (FCPro)
8h 5d 5c 5b 5a d5 65 65 68 65
6d 76 72 a2 6a 76 74 a7 6a 83
72 c6 38 7c a7 83 38 6a 83 c6
56 7c 38 83

#1020 From: Shlomi Fish <shlomif@...>
Date: Sun Oct 18, 2009 9:16 pm
Subject: Re: challenging Freecell position
shlomif2
Send Email Send Email
 
Hi newtton!

Thanks for your E-mail. See below for my response.

On Sunday 18 Oct 2009 22:06:37 newtton wrote:
>    I ran across a Freecell position that gives your solver (and others)
>  difficulty.  (The moves leading to this position are given below.)  Here's
>  what happened:  I was playing with Freecell Pro and got into this
>  position.  When I checked the solvability, I got Yes, but I couldn't see
>  how myself.  I fumbled around a bit and then checked the solvability
>  again, and it said No.  This would not have been a surprise except the
>  only difference from the first position was a reversible move (the three
>  of clubs can be moved freely between two columns.)  What a shock!  I
>  thought the solver always told the truth (or came to no conclusion at
>  all.) I reported the problem to Michael Keller and he suggested the newer
>  version of FC Pro that has 3 solvers, including yours.  Yours reports this
>  position impossible.  But the 3rd solver, Patsolve, reported it solvable
>  -- whereever the 3 of clubs was placed.  Using the solution generated by
>  Patsolve I was able to see how to get out of the difficulty. This is just
>  my opinion, but it seems to me that if you are going to release a program
>  to the public and call it a solver, then it is understandable if it can't
>  come to a conclusion about certain positions, but it should at least come
>  to the correct conclusion if it does.
>

Freecell Solver in some of it solver configuration uses heuristics that may
report some solvable board layouts as unsolvable. This is due to the fact that
it uses meta-moves (= sequences of several atomic moves and meta moves)
instead of atomic moves, which move only one cards. However, there is a preset
called "good-intentions" that first runs a good meta-moves heuristic and then
a good (for some values of good) atomic moves one to yield a usually fast and
absolutely accurate verdict. For more information, consult the Freecell Solver
documentation here, or alternatively the Freecell Pro documentation:

http://fc-solve.berlios.de/docs/#distributed-docs

I should note that Freecell Pro, as great as it is, is relatively lacking and
buggy and suffers from several major design and internals issues. It has also
incorporated an incredibly old, under-optimised and buggy version of Freecell
Solver, which I refuse to support (due to the fact that the current version of
the fc-solve library should be backwards compatible with it, but greatly
enhanced). I am now much happier with the integration of Freecell Solver into
PySolFC:

* http://pysolfc.sourceforge.net/

* http://cards.wikia.com/wiki/PySol

Like FreeCell Pro, PySolFC is open-source, but as opposed to it, it is cross-
platform, running mostly natively on Windows, Linux, Mac OS X and other
distributions, has much more Solitaire variants (many of which also have a
Freecell Solver-supported solver and help system, which despite its historical
name can now solve several other Solitaire variants besides Freecell). PySolFC
is also arguably the most powerful and featureful open-source (and free-of-
charge) Solitaire suite.

> #715037 Attempt: 5 NumFcs=4 (FCPro)
> 8h 5d 5c 5b 5a d5 65 65 68 65
> 6d 76 72 a2 6a 76 74 a7 6a 83
> 72 c6 38 7c a7 83 38 6a 83 c6
> 56 7c 38 83
>

Well, using Freecell Pro would be a bit hard because I'm based on Linux (which
luckily for you is still x86) and would need to use wine or Virtual Box. I'll
try but you can ease my job by giving the board layout in the Freecell Solver
notation:

http://fc-solve.berlios.de/docs/distro/README.html

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Why I Love Perl - http://shlom.in/joy-of-perl

Chuck Norris read the entire English Wikipedia in 24 hours. Twice.

#1021 From: "Gary Campbell" <gary@...>
Date: Sun Oct 18, 2009 9:40 pm
Subject: Re: challenging Freecell position
jlandgdc
Send Email Send Email
 
I'm not sure why Shlomi Fish or Michael Keller didn't mention
my solver/player, but it has no difficulty with this game or your
position within it.  Here is the last point where your solution is
solvable.  Beyond that you have made the position impossible.
Please, people, mention my solver when you need to solve
something beyond the capability of FCPro and you would like
to use Windows as a program base.  I would appreciate it.
-Gary Campbell
(solver available free at http://numin8r.us/programs
 
 
QC TS 9H KS 9D    7H QH 2D AC 2H   
QD 3S 5C 6C 8S    7C KH 6D KD KC JC
QS JH 2S TC 7D    3D 8H
5S 2C 3H AS 6S    9S 4H
8C 7S 5D 5H          3C
6H TH JD JS            
4C TD 4D 4S            
   9C                  
   8D                  
GAME #715037 is solved partially as follows: {15 1 0 0 -2 -2 524 524 2 2 0 0 68 68 2000 100}
 8h 5d 5c 5b 5a d5 65 65 68 65
 6d 76 72 a2 6a[76]74 a7 6a 83
 72 c6 38 7c a7 83 38 6a 83 c6
 56 7c 38 83 ??
 
----- Original Message -----
From: newtton
Sent: Sunday, October 18, 2009 2:06 PM
Subject: challenging Freecell position

 

I ran across a Freecell position that gives your solver (and others) difficulty. (The moves leading to this position are given below.) Here's what happened: I was playing with Freecell Pro and got into this position. When I checked the solvability, I got Yes, but I couldn't see how myself. I fumbled around a bit and then checked the solvability again, and it said No. This would not have been a surprise except the only difference from the first position was a reversible move (the three of clubs can be moved freely between two columns.) What a shock! I thought the solver always told the truth (or came to no conclusion at all.)
I reported the problem to Michael Keller and he suggested the newer version of FC Pro that has 3 solvers, including yours. Yours reports this position impossible. But the 3rd solver, Patsolve, reported it solvable -- whereever the 3 of clubs was placed. Using the solution generated by Patsolve I was able to see how to get out of the difficulty.
This is just my opinion, but it seems to me that if you are going to release a program to the public and call it a solver, then it is understandable if it can't come to a conclusion about certain positions, but it should at least come to the correct conclusion if it does.

#715037 Attempt: 5 NumFcs=4 (FCPro)
8h 5d 5c 5b 5a d5 65 65 68 65
6d 76 72 a2 6a 76 74 a7 6a 83
72 c6 38 7c a7 83 38 6a 83 c6
56 7c 38 83


#1022 From: Shlomi Fish <shlomif@...>
Date: Mon Oct 19, 2009 11:02 am
Subject: Re: challenging Freecell position
shlomif2
Send Email Send Email
 
On Sunday 18 Oct 2009 23:40:49 Gary Campbell wrote:
> I'm not sure why Shlomi Fish or Michael Keller didn't mention
> my solver/player, but it has no difficulty with this game or your
> position within it.  Here is the last point where your solution is
> solvable.  Beyond that you have made the position impossible.
> Please, people, mention my solver when you need to solve
> something beyond the capability of FCPro and you would like
> to use Windows as a program base.  I would appreciate it.
> -Gary Campbell
> (solver available free at http://numin8r.us/programs
>

Indeed, one omission of my email was not mentioning alternative solvers to
Freecell Solver. I apologise for that. The most complete list I know of (and
which I prepared and maintain) is:

http://fc-solve.berlios.de/links.html#other_solvers

I tend to think that my solver is the most powerful, featureful, portable and
most polished one (see for example - http://fc-solve.berlios.de/features.html
), and on top of it is distributed under the MIT/X11 Licence which is
practically public domain. But naturally, it is possible that a different
solver will supercede it in the future.

Gary, regarding your solver, can you answer the following questions:

1. How many board positions can it handle before it runs out of memory? Using
my Indirect-stack-states scheme (where I store pointers to stacks in the stack
collection instead of storing copies) I was able to scale Freecell Solver to a
million states and more on a 32-bit x86 machine. On a 64-bit machine (Alpha
AXP, x86-64, UltraSPARC, etc.) with enough RAM, it may be more, but naturally
the pointers there are larger.

Your solver seems to be a small 8086/8088 COM object binary and as such can
probably only map 640KB of RAM. So assuming every board position consumes 8-
bits of RAM (which is probably way-too-optimistic), it can only go up to an
optimistic upper limit of 640,000 positions before exhaustion.

I should note that I have an idea for states that are packed bit-by-bit as a
big delta from the original state (I borrowed the idea from the original Don
Woods solver.). This way a column in each state will usually occupy much less
than even 32-bits. This will require some major internal changes in fc-solve
and may make the solution slower due to the packing and unpacking, but it will
conserve a lot of memory.

2. What happens when your solver runs out of memory? Does it crash? Does it
gracefully exit? Does it prune dead ends? Will it continue to run
indefinitely?

I should note that when my solver fails a malloc() it would try to access a
NULL pointer and crash the entire process. My todo list had an item for
implementing a graceful return propagation on a failed memory allocation, but
it's not high on my priority list, for many reasons.

3. Does your solver have an automated test suite? If not, how do you make sure
bugs don't creep in? I should note that you can use this Perl/CPAN module I
created (which is gratis and open-source) to help making sure the solutions
are correct:

http://fc-solve.berlios.de/verify-code/

Regards,

	 Shlomi Fish

>
> QC TS 9H KS 9D    7H QH 2D AC 2H
> QD 3S 5C 6C 8S    7C KH 6D KD KC JC
> QS JH 2S TC 7D    3D 8H
> 5S 2C 3H AS 6S    9S 4H
> 8C 7S 5D 5H          3C
> 6H TH JD JS
> 4C TD 4D 4S
>    9C
>    8D
> GAME #715037 is solved partially as follows: {15 1 0 0 -2 -2 524 524 2 2 0
>  0 68 68 2000 100} 8h 5d 5c 5b 5a d5 65 65 68 65
>  6d 76 72 a2 6a[76]74 a7 6a 83
>  72 c6 38 7c a7 83 38 6a 83 c6
>  56 7c 38 83 ??

This notation seems strange, incomprehensible and too terse. What does it all
mean?

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
The Case for File Swapping - http://shlom.in/file-swap

Chuck Norris read the entire English Wikipedia in 24 hours. Twice.

#1023 From: Shlomi Fish <shlomif@...>
Date: Fri Nov 27, 2009 3:55 pm
Subject: Freecell Solver Version 2.34.0 was Released
shlomif2
Send Email Send Email
 
Hi all!

Freecell Solver 2.34.0 is now on http://fc-solve.berlios.de/download.html .
Reading from the NEWS file:

{{{{
1. Converted the +README+ / +USAGE+ / +NEWS+ etc. files to
http://www.methods.co.nz/asciidoc/[AsciiDoc] . The sources are in .txt
and they are copied to their non-.txt files. The PDF build is still a bit
broken due to a strange CMake problem.

2. Simplified the test suite and benchmarking process. (Thanks to
http://pythack.com/[LECA Dimitri (Pythack)] for the inspiration).

3. Many documents were otherwise enhanced with examples and other
enhancements.

4. Inlined the hash comparison and several other functions in the code.
This made the code a little faster.

5. Clarified the documentation for broken versions of CMake (cmake-2.6.2)
like the one that ships with some versions of Ubuntu.

6. Fixed the tests for a valgrind regression.
}}}}

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
http://www.shlomifish.org/humour/ways_to_do_it.html

Chuck Norris read the entire English Wikipedia in 24 hours. Twice.

#1024 From: Shlomi Fish <shlomif@...>
Date: Thu Dec 24, 2009 12:59 pm
Subject: Re: Freecell Solver Version 2.34.0 was Released
shlomif2
Send Email Send Email
 
On Friday 27 Nov 2009 17:55:36 Shlomi Fish wrote:
> Hi all!
>
> Freecell Solver 2.34.0 is now on http://fc-solve.berlios.de/download.html .

My mistake. That was Freecell Solver version "2.36.0" and not version
"2.34.0". Maybe I should bump the most major number to 3 already.

Regards,

	 Shlomi Fish

> Reading from the NEWS file:
>
> {{{{
> 1. Converted the +README+ / +USAGE+ / +NEWS+ etc. files to
> http://www.methods.co.nz/asciidoc/[AsciiDoc] . The sources are in .txt
> and they are copied to their non-.txt files. The PDF build is still a bit
> broken due to a strange CMake problem.
>
> 2. Simplified the test suite and benchmarking process. (Thanks to
> http://pythack.com/[LECA Dimitri (Pythack)] for the inspiration).
>
> 3. Many documents were otherwise enhanced with examples and other
> enhancements.
>
> 4. Inlined the hash comparison and several other functions in the code.
> This made the code a little faster.
>
> 5. Clarified the documentation for broken versions of CMake (cmake-2.6.2)
> like the one that ships with some versions of Ubuntu.
>
> 6. Fixed the tests for a valgrind regression.
> }}}}
>
> Regards,
>
>  Shlomi Fish
>

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
http://www.shlomifish.org/humour/ways_to_do_it.html

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )

#1025 From: Shlomi Fish <shlomif@...>
Date: Thu Dec 24, 2009 4:06 pm
Subject: What's New in the Version Control Repository ( r2354 )
shlomif2
Send Email Send Email
 
Hi all!

Here is what is new in the Freecell Solver version control repository, since
Freecell Solver version 2.36.0:

1. I updated the list of files under the Public Domain in the COPYING.txt file
There's only one left, "pqueue.h" - all the others were merged or removed.

2. AsciiDoc is now mentioned here:

http://fc-solve.berlios.de/links.html#technologies

The AsciiDoc developers were kind enough to mention Freecell Solver on their
homepage as a program that uses it:

http://www.methods.co.nz/asciidoc/

3. The --help-short-sol blurb was updated to:

<<<<<<<<<<<
The following configurations may produce shorter solutions:

     fc-solve -l gooey-unknown-thing
     fc-solve -l slick-rock

You may also try adding the "-opt" and/or "--reparent-states" optionswhich may
make things a little better.

Refer to the file 'USAGE' for more information.
>>>>>>>>>>>

(I'm correcting the long line with the typo as I speak).

4. I've been experimenting with a branch called
" reduce-the-size-of-the-internal-move-token-structs " (still in the
repository under /branches). The motivation for it was that the C tokens
representing the moves currently occupied 4 octets (one octet for each field)
while they could occupy only 2 octets.

Since the 4-octet move tokens were part of the Freecell Solver ABI I declared
another struct called fcs_internal_move_t which was a bit-struct that had four
4-bit fields, one for each field. This may have reduced the memory consumption
(hard to know if a little or a lot) but made the code slower. (a few seconds
for the MS-32,000 run of under 200 seconds). I believe most of the slowdown
was due to the bit fiddling being slower than assigning entire bytes, and
possibly there was was also a negative effect of the lack of memory alignment
in the 2-byte tokens.

I may still opt to incorporate this branch into the main line after enhancing
it to be a compile time option, in case someone could use saving the extra
memory.

5. make_pysol_freecell_board.py now have an undocumented -F flag that allows
it to generate boards of PySolFC (whose randomisation algorithm has changed
from the original PySol), and some tests were added.

6. I've done some work on the soft-threads presets generation. Most of it was
refactoring, but I also played with trying to graph the performance of a
series of constant soft-threads quotas (say [100,100,100,100...],
[150,150,150,150,150...], [205,205,205,205...], etc.). I found out that I got
a bumpy graph where the total number of iterations (where more iterations =~
slower performance) decreased relatively rapidly and then steadily increased
afterwards.

The top 10 lowest iteration counts were:

<<<<<<<<<<<<<<
309 18343963
391 18343388
319 18342457
341 18341339
310 18337826
390 18332992
378 18328836
377 18322322
375 18317338
376 18314246
>>>>>>>>>>>>>>

This is whereas 350 which is the default and what formed the basis of most of
the presets so far gives:

<<<<<<<<<<<<<
350     18382968
>>>>>>>>>>>>>

So it's not an earth-shaking difference.

In any case this eventually has given me an idea for an algorithm to
methodically optimise the sequence of iterations quotas (not a particularly
smart one and it requires a lot of brute force, but it may be good enough).
More about it in a later message.

------------------

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
"Star Trek: We, the Living Dead" - http://shlom.in/st-wtld

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )

#1026 From: Shlomi Fish <shlomif@...>
Date: Thu Dec 24, 2009 6:24 pm
Subject: Algorithm for Optimising the Sequence of Quotas for the Switch Tasking
shlomif2
Send Email Send Email
 
The original algorithm for generating a meta-scan (see http://xrl.us/beuigz )
is:

{{{{
# First we record the number of iterations (= states scanned) it took the
scans' to solve a given board for each of a large set of boards. (in our case
the Microsoft 32,000).
# Then, we allocate a certain number of iterations, and assign this quota to
the scan that solves the most boards within this quota.
# Repeat.
}}}}

So if we have @Quotas = [350, 500, 600, 200...] we will assign 350 iterations
to the first scan, and then 500 to the second one and then 600 to the third
one, 200 to the fourh, etc.

Question is: what is the optimal @Quotas-as-a-function-of-$quota_index
allocation?

For a long time, I couldn't really think of a good way to do that, but
recently, after experimenting with a more specific problem, I came up with
this method:

1. Calculate the results of assigning quotas when picking up @Quotas[0] (where
the first scan is 0) from a range of iterations (say anywhere from 100 to
1,000) where Quotas[1 .. $Inf] is being guessed (to say [350,350,350...] till
infinity). Record it as the temporary optimal result.

2. Calculate the results of assigning quotas for a variable @Quotas[1] with
@Quotas[0] as calculated from Step #1, and the guessed @Quotas[2 .. $Inf] .
Record it as the temporary optimal result.

3. Calculate a variables @Quotas[2] based on @Quotas[0,1] and the guesses.

And so forth.

This will yield @Temp_Optimal_Quotas[0 .. $Num_Quotas] that we can use as a
better starting point.

After that I've been thinking that we can repeat this algorithm only this time
while using @Temp_Optimal_Quotas as the guessed iterations (and so forth until
we become saturated).

It's not a very time-efficient method, and I'm not sure it guarantees good
results, but it should be easy to code, and so I'd like to see if it works,
and how well it improves upon the existing heuristics.

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
My Aphorisms - http://www.shlomifish.org/humour.html

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )

#1027 From: Shlomi Fish <shlomif@...>
Date: Mon Dec 28, 2009 6:42 am
Subject: Re: Algorithm for Optimising the Sequence of Quotas for the Switch Tasking
shlomif2
Send Email Send Email
 
Hi all.

This is a report on my progress.

On Thursday 24 Dec 2009 20:24:14 Shlomi Fish wrote:
> The original algorithm for generating a meta-scan (see http://xrl.us/beuigz
>  ) is:
>
> {{{{
> # First we record the number of iterations (= states scanned) it took the
> scans' to solve a given board for each of a large set of boards. (in our
>  case the Microsoft 32,000).
> # Then, we allocate a certain number of iterations, and assign this quota
>  to the scan that solves the most boards within this quota.
> # Repeat.
> }}}}
>
> So if we have @Quotas = [350, 500, 600, 200...] we will assign 350
>  iterations to the first scan, and then 500 to the second one and then 600
>  to the third one, 200 to the fourh, etc.
>
> Question is: what is the optimal @Quotas-as-a-function-of-$quota_index
> allocation?
>
> For a long time, I couldn't really think of a good way to do that, but
> recently, after experimenting with a more specific problem, I came up with
> this method:
>
> 1. Calculate the results of assigning quotas when picking up @Quotas[0]
>  (where the first scan is 0) from a range of iterations (say anywhere from
>  100 to 1,000) where Quotas[1 .. $Inf] is being guessed (to say
>  [350,350,350...] till infinity). Record it as the temporary optimal
>  result.
>
> 2. Calculate the results of assigning quotas for a variable @Quotas[1] with
> @Quotas[0] as calculated from Step #1, and the guessed @Quotas[2 .. $Inf] .
> Record it as the temporary optimal result.
>
> 3. Calculate a variables @Quotas[2] based on @Quotas[0,1] and the guesses.
>
> And so forth.
>

An Israeli joke tells that once a certain Israeli politician got a puzzle game
with 6 pieces. He locked himself in his office trying to solve it. Two years
later, he comes out in complete disarray, and says "Ha! It says on the box
'3-5 years [old]' and I solved it in two!". In a way, that's how it's been
with me for some time since I wrote the previous message.

What happened was that I implemented the algorithm in Perl 5 based on the code
that I wrote previously, and it was too slow. As a result, I sought a faster
language to implement it. After contemplating writing it in C which I knew
very well, I finally decided to try implementing it in C#/.NET (using Mono -
http://www.mono-project.com/ ), and spent quite a few hours on getting all the
code to run there. At the end of the day, it worked and ran much faster than
the Perl program, and the algorithm finished.

The results were that it yielded a solution in 18,150,636 iterations (which
has been verified using the existing Perl code) instead of in 18,382,968 ,
which is what you get with constant quotas of 350. I noticed and verified that
the algorithm yielded monotonically decreasing results.

That was all nice and dandy, but when I fed the resultant meta-scan into the
solver it ran slightly slower than "-l cool-jives". Moreover, as I noticed it
resulted in a different number of iterations than what the meta-scan-
generating algorithm yielded as an estimate.

I tried using both --scans-synergy's and to increment the quotas by 1 in case
there's an off-by-one error, but while some of them improved the final
iterations count, they did not result in the same iterations numbers.
Therefore, I now need to investigate why the result is different by simulating
the scans and seeing where fc-solve deviates from that.

So that's how far I got for now.

Here's a blog post I wrote about C# in regards to the porting of the Perl
code:

http://community.livejournal.com/shlomif_tech/40163.html

Regards,

	 Shlomi Fish

> This will yield @Temp_Optimal_Quotas[0 .. $Num_Quotas] that we can use as a
> better starting point.
>
> After that I've been thinking that we can repeat this algorithm only this
>  time while using @Temp_Optimal_Quotas as the guessed iterations (and so
>  forth until we become saturated).
>
> It's not a very time-efficient method, and I'm not sure it guarantees good
> results, but it should be easy to code, and so I'd like to see if it works,
> and how well it improves upon the existing heuristics.
>
> Regards,
>
>  Shlomi Fish
>

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
My Aphorisms - http://www.shlomifish.org/humour.html

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )

#1028 From: Shlomi Fish <shlomif@...>
Date: Mon Dec 28, 2009 3:30 pm
Subject: Idea: Adapt the scans based on the parameters of the initial board.
shlomif2
Send Email Send Email
 
Hi all!

Shortly after I worked on the meta-scan optimisation (see the previous
messages), I came up with this idea to further improve the Freecell Solver
performance:

<<<<<<<<<<<<<<<<<<<
* Adapt the scans based on the parameters of the initial board.

** Try to find a correlation between various parameters of the initial board
(such as those calculated in the A* scan or the number of steps required to
sort the cards in each column by rank), and the performance of various scans
and then:
+
1. Calculate the initial parameters on startup.
+
2. See what would be a good meta-scan based on them.
+
3. Use it.
>>>>>>>>>>>>>>>>>>

Any comments?

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
What Makes Software Apps High Quality -  http://shlom.in/sw-quality

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )

#1029 From: "Gary Campbell" <gary@...>
Date: Mon Dec 28, 2009 4:36 pm
Subject: Re: Adapt the scans based on the parameters of the initial board.
jlandgdc
Send Email Send Email
 
I feel like I ought to respond, given that I've been trying for almost
3 years to beat the performance of the solver I released 3 years ago.
I've tried a lot of things similar to what you are suggesting, and have
abandoned them.  I believe I'm working on the most likely-to-succeed
approach yet.  Very roughly it involves gathering 14-bits of data on
each viable alternative move at any given "board layout."  This data
is used to index various lookup tables (256 to 1024 bytes in length).
The lookups are extremely fast, and the initial data can be computed
at a rate several times as fast as my old version processes moves.
I'm in its neighborhood on solution length and processing speed, and
expect to beat it on all measures with this approach.   -Gary Campbell
 
----- Original Message -----
Sent: Monday, December 28, 2009 7:30 AM
Subject: Idea: Adapt the scans based on the parameters of the initial board.

 

Hi all!

Shortly after I worked on the meta-scan optimisation (see the previous
messages), I came up with this idea to further improve the Freecell Solver
performance:

<<<<<<<<<<<<<<<<<<<
* Adapt the scans based on the parameters of the initial board.

** Try to find a correlation between various parameters of the initial board
(such as those calculated in the A* scan or the number of steps required to
sort the cards in each column by rank), and the performance of various scans
and then:
+
1. Calculate the initial parameters on startup.
+
2. See what would be a good meta-scan based on them.
+
3. Use it.
>>>>>>>>>>>>>>>>>>

Any comments?

Regards,

Shlomi Fish

--
----------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
What Makes Software Apps High Quality - http://shlom.in/sw-quality

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )


#1030 From: Shlomi Fish <shlomif@...>
Date: Tue Dec 29, 2009 6:59 pm
Subject: Freecell Solver 2.38.0 Was Released
shlomif2
Send Email Send Email
 
Freecell Solver 2.38.0 was released. You can download the source distribution
from http://fc-solve.berlios.de/ . Here is the news:


Version 2.38.0: (29-Dec-2009)
-----------------------------

1. Made sure that one can build Freecell Solver outside the source directory
without needing AsciiDoc. (That was a major build-sytem problem).

2. Add a missing newline at the end of one of the lines of the help.

3. Add the "-F"/"--pysolfc" flag to board_gen/make_pysol_freecell_board.py
for generating PySolFC deals.

----------------------------------

Happy new year!

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Rethinking CPAN - http://shlom.in/rethinking-cpan

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )

#1031 From: Shlomi Fish <shlomif@...>
Date: Tue Dec 29, 2009 8:57 pm
Subject: Re: Adapt the scans based on the parameters of the initial board.
shlomif2
Send Email Send Email
 
Hi Gary!

On Monday 28 Dec 2009 18:36:15 Gary Campbell wrote:
> I feel like I ought to respond, given that I've been trying for almost
> 3 years to beat the performance of the solver I released 3 years ago.

OK.

> I've tried a lot of things similar to what you are suggesting, and have
> abandoned them.

OK, without the code, your research and your performance data, which I can
examine and verify, I cannot just believe you like that, and will proceed to
investigate it in time. Not now - first things first I'd like to see why the
simulation of the meta-scan yields differenting results in the actual run, and
then I'd like to integrate patsolve's atomic moves scans.

> I believe I'm working on the most likely-to-succeed
> approach yet.  Very roughly it involves gathering 14-bits of data on
> each viable alternative move at any given "board layout."  This data
> is used to index various lookup tables (256 to 1024 bytes in length).
> The lookups are extremely fast, and the initial data can be computed
> at a rate several times as fast as my old version processes moves.

Interesting. Care to share more details? It's hard to understand from it what
it's all about.

> I'm in its neighborhood on solution length and processing speed, and
> expect to beat it on all measures with this approach.   -Gary Campbell
>

Good luck.

Regards,

	 Shlomi Fish

> ----- Original Message -----
> From: Shlomi Fish
> To: fc-solve-discuss@yahoogroups.com
> Sent: Monday, December 28, 2009 7:30 AM
> Subject: Idea: Adapt the scans based on the parameters of the initial
>  board.
>
>
>
> Hi all!
>
> Shortly after I worked on the meta-scan optimisation (see the previous
> messages), I came up with this idea to further improve the Freecell Solver
> performance:
>
> <<<<<<<<<<<<<<<<<<<
> * Adapt the scans based on the parameters of the initial board.
>
> ** Try to find a correlation between various parameters of the initial
>  board (such as those calculated in the A* scan or the number of steps
>  required to sort the cards in each column by rank), and the performance of
>  various scans and then:
> +
> 1. Calculate the initial parameters on startup.
> +
> 2. See what would be a good meta-scan based on them.
> +
> 3. Use it.
>
>
> Any comments?
>
> Regards,
>
> Shlomi Fish
>

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://shlom.in/sussman

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )

#1032 From: "Gary Campbell" <gary@...>
Date: Wed Dec 30, 2009 4:03 pm
Subject: Re: Adapt the scans based on the parameters of the initial board.
jlandgdc
Send Email Send Email
 
Shlomi,
All in good time.  I'm keeping a detailed log, but would rather
proceed than publish at this time.  However, if you want to
get more specific on your algorithms, I'll be glad to comment
in more detail   -Gary
 
----- Original Message -----
Sent: Tuesday, December 29, 2009 12:57 PM
Subject: Re: Adapt the scans based on the parameters of the initial board.

Hi Gary!

On Monday 28 Dec 2009 18:36:15 Gary Campbell wrote:
> I feel like I ought to respond, given that I've been trying for almost
> 3 years to beat the performance of the solver I released 3 years ago.

OK.

> I've tried a lot of things similar to what you are suggesting, and have
> abandoned them. 

OK, without the code, your research and your performance data, which I can
examine and verify, I cannot just believe you like that, and will proceed to
investigate it in time. Not now - first things first I'd like to see why the
simulation of the meta-scan yields differenting results in the actual run, and
then I'd like to integrate patsolve's atomic moves scans.

> I believe I'm working on the most likely-to-succeed
> approach yet.  Very roughly it involves gathering 14-bits of data on
> each viable alternative move at any given "board layout."  This data
> is used to index various lookup tables (256 to 1024 bytes in length).
> The lookups are extremely fast, and the initial data can be computed
> at a rate several times as fast as my old version processes moves.

Interesting. Care to share more details? It's hard to understand from it what
it's all about.

> I'm in its neighborhood on solution length and processing speed, and
> expect to beat it on all measures with this approach.   -Gary Campbell
>

Good luck.

Regards,

Shlomi Fish

> ----- Original Message -----
> From: Shlomi Fish
> To: fc-solve-discuss@yahoogroups.com
> Sent: Monday, December 28, 2009 7:30 AM
> Subject: Idea: Adapt the scans based on the parameters of the initial
>  board.
>
>
>
> Hi all!
>
> Shortly after I worked on the meta-scan optimisation (see the previous
> messages), I came up with this idea to further improve the Freecell Solver
> performance:
>
> <<<<<<<<<<<<<<<<<<<
> * Adapt the scans based on the parameters of the initial board.
>
> ** Try to find a correlation between various parameters of the initial
>  board (such as those calculated in the A* scan or the number of steps
>  required to sort the cards in each column by rank), and the performance of
>  various scans and then:
> +
> 1. Calculate the initial parameters on startup.
> +
> 2. See what would be a good meta-scan based on them.
> +
> 3. Use it.
>
>
> Any comments?
>
> Regards,
>
> Shlomi Fish
>

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://shlom.in/sussman

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fc-solve-discuss/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/fc-solve-discuss/join
    (Yahoo! ID required)

<*> To change settings via email:
    fc-solve-discuss-digest@yahoogroups.com
    fc-solve-discuss-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    fc-solve-discuss-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


#1033 From: Shlomi Fish <shlomif@...>
Date: Fri Jan 1, 2010 11:36 am
Subject: Re: Adapt the scans based on the parameters of the initial board.
shlomif2
Send Email Send Email
 
Hi Gary!

Please configure your mailer to quote the replies and avoid top-posting and do
"top-quoting" and intemingled replies. See:

http://en.wikipedia.org/wiki/Posting_style

And please reply to this note of mine.

On Wednesday 30 Dec 2009 18:03:16 Gary Campbell wrote:
> Shlomi,
> All in good time.  I'm keeping a detailed log, but would rather
> proceed than publish at this time.

OK. Then I cannot trust you.

> However, if you want to
> get more specific on your algorithms, I'll be glad to comment
> in more detail

Please do.

Regards,

	 Shlomi Fish

> -Gary
>

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Best Introductory Programming Language - http://shlom.in/intro-lang

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )

#1034 From: Shlomi Fish <shlomif@...>
Date: Sun Jan 10, 2010 8:28 pm
Subject: New Solver for "Black Hole" Solitaire (in Perl)
shlomif2
Send Email Send Email
 
Hi all!

I wrote a new solver for the solitaire "Black Hole", and it can be found here:

http://svn.berlios.de/svnroot/repos/fc-solve/black-hole-solitaire/

Here's the complete story:

today I was going to play a game on http://www.brainbashers.com/ when I
remembered the Penguin Solitaire variant, which is similar to Freecell and
which I wanted to cover on the Cards Wikia. So I did a Google search for
"penguin solitaire" and saw it had a page on the wikipedia:

http://en.wikipedia.org/wiki/Penguin_%28solitaire%29

There I saw that it was invented by David Parlett:

http://en.wikipedia.org/wiki/David_Parlett

and there I saw he also invented a solitaire called "Black Hole":

http://en.wikipedia.org/wiki/Black_Hole_%28solitaire%29

So I looked for it in PySolFC, read the instructions there and started to
play. The game involves putting a card that is one above or below the
foundation (wrapping from kings to aces). I noticed that there wasn't any
over-populated talon or something like that there, which meant that I could
probably build a DFS-based solver for it. So I set out to see if it was
possible.

The first thing I did was to adapt my PySol/PySolFC game generator to generate
the initial board of the PySolFC deals. This turned out to be a very
complicated and frustrating task for me, because I had to understand what's
going on with the code. But after a lot of playing with it, I was able to get
it to generate the initial deals. The changes for that are in the Freecell
Solver trunk now.

Then I started working on the solver. I decided to write it in Perl 5 because
it's a good prototyping language and I know it well. When writing it, I
heavily optimised for speed and low memory consumption by using bit fields (
see http://perldoc.perl.org/functions/vec.html ) and a gigantic hash lookup.

Then, after it was written, came the moment of truth: I ran it on the board
and it reported success. Great! But what's the solution? So I added some
solution tracing logic, to output the cards that should be moved. Then I was
able to play it and the game was solved. Yay!

I tried it on another game and it also worked. Then I ran it on the first few
games. Game #1 was reported as unsolvable, Game #2 was solved after a while,
and Game #3 consumed over 15% of my RAM and then was solved.

So it seems to be working nicely. The solver's code is made available under
the permissive MIT/X11 licence - share and enjoy.

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
"Humanity" - Parody of Modern Life - http://shlom.in/humanity

Bzr is slower than Subversion in combination with Sourceforge.
( By: http://dazjorz.com/ )

#1035 From: Shlomi Fish <shlomif@...>
Date: Sat Jan 16, 2010 5:37 pm
Subject: Optimising the Sequence of Quotas for the Switch Tasking - Conclusion
shlomif2
Send Email Send Email
 
Hi all!

I previously wrote about it here and here:

* http://tech.groups.yahoo.com/group/fc-solve-discuss/message/1026

* http://tech.groups.yahoo.com/group/fc-solve-discuss/message/1027

I finished by saying that:

<<<<<<<<<<<<<
That was all nice and dandy, but when I fed the resultant meta-scan into the
solver it ran slightly slower than "-l cool-jives". Moreover, as I noticed it
resulted in a different number of iterations than what the meta-scan-
generating algorithm yielded as an estimate.

I tried using both --scans-synergy's and to increment the quotas by 1 in case
there's an off-by-one error, but while some of them improved the final
iterations count, they did not result in the same iterations numbers.
Therefore, I now need to investigate why the result is different by simulating
the scans and seeing where fc-solve deviates from that.
>>>>>>>>>>>>

So I wrote some code to simulate the boards through the quotas, and then a
Ruby program that ran the Freecell Solver range solver vis-á-vis with the
simulation, and realised it started deviating at board 36. After investigating
it yesterday I realised that the Best-First-Search (BeFS) algorithm traversed
different positions than the simulation. I ran it in the command line version
and it indeed resulted in different things.

After a lot of investigation, I realised that the problem was due to the Best-
First-Search weights being inconsistent, which in turn was due to the fact I
forgot to input the 5th one, which made it once 0 and once something else due
to a lack of bounds check in the string processing of the -asw's parameter's
command line argument.

This was fixed and then the BeFS scan ran consistently. However, I still
didn't get identical results. I investigated and it turned out it was caused
by the number of final iterations having an off-by-one error in reporting the
final iterations count. So if Iteration No. 500 was the final state it
reported it solved in 500 iterations instead of 501 (which should be the case
due to the fact that it starts from 0 iterations). So I had to correct the
output.

I realised that some of my tests in the
t/t/intermediate-iterations-are-in-order.t were lacking and omitted some bugs
and so had to fix them and then I had to update the checksums and lengths of
the tests in the identicality test, because the number of iterations reported
was higher.

After all that, I had to fix the scans' results to generate the same tests. I
decided to write a script that will increment the number of iterations it took
the scans to run in the input data by 1, and I rerun the scan for finding the
optimal quota allocation, and it yielded a new preset which I called "blue-
yonder". I timed it against "cool-jives", and it indeed took it two seconds
less to run (though even cool-jives was a bit slower than when I timed it last
time).

Since I have some bug fixes and other stuff, I'm considering to release a new
stable version.

Regards,

	 Shlomi Fish

P.S.: all hail my new signature.

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Parody on "The Fountainhead" - http://shlom.in/towtf

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

#1036 From: Shlomi Fish <shlomif@...>
Date: Wed Jan 27, 2010 9:04 pm
Subject: Freecell Solver 2.40.0 Was Released
shlomif2
Send Email Send Email
 
Freecell Solver 2.40.0 was released. You can download the source distribution
from http://fc-solve.berlios.de/ . Here are the news:

Version 2.40.0: (27-Jan-2010)
-----------------------------

1. make_pysol_freecell_board.py now has support for "Black Hole" dealing. See:
http://www.shlomifish.org/open-source/projects/black-hole-solitaire-solver/ .

2. Added the "Scan:" header to indicate the current scan / soft-thread
when using the -s -i flags.

3. *Security*: Fixed a string overflow bug in +cmd_line.c+ with the +-asw+
weights. As a result of this problem, Freecell Solver can write several NUL
characters ('\0') to after the string specifying the command line argument.
+
Now unspecified +-asw+ are set to 0.

4. Fixed an off-by-1 iterations count report when a board was found to be
solvable.

5. iter_handler is now applied globally across all instances.

6. Add the +-l blue-yonder+ / +-l by+ preset that is extra fast at solving
the Microsoft 32,00 based on running the optimization algorithm:
+
http://tech.groups.yahoo.com/group/fc-solve-discuss/message/1027 .

7. Added a compile-time option to reduce the size of the internal move token
structs. This may make memory consumption smaller, but definitely makes
Freecell Solver run slower, so it is off by default.

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Freecell Solver - http://fc-solve.berlios.de/

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

#1037 From: Shlomi Fish <shlomif@...>
Date: Fri Feb 12, 2010 6:53 pm
Subject: What's New in the Version Control Repository ( r2624 )
shlomif2
Send Email Send Email
 
Hi all!

Here's what's new in the Freecell Solver version control repository, since
Freecell Solver version 2.40.0:

1. I disabled tcmalloc in the debug mode because it messes up the valgrind
results.

2. Converted soft_threads and hard_threads from being vectors of pointers to a
vectors of structs. This was done to prevent memory fragmentation and as a
micro-optimisation.

3. Added a missing break after a case in cmd_line.c.

4. Extracted a few macros for declaring the hard threads and soft threads loop
variables.

5. Merged debug_iter_output into debug_iter_output_func - to decrease
redundnancy.

6. Reduced the size of the game paramaters and place them in one 32-bit
struct.

7. Made the error output of t/t/build-process.t more descriptive and useful.

8. Now installing the new executables ( freecell-solver-fc-pro-range-solve ,
freecell-solver-multi-thread-solve , freecell-solver-range-parallel-solve ,
etc.) by default.

9. Fixed the "pdfs" target.

10. Now testing that asciidoc is not needed for building with cmake.

11. A more robust and portable paths handling in the find_opt.cs file.

12. Convert to the new positions_by_rank - with one slot per card.

13. New benchmarks - we're now solving the Microsoft 32,000 in 95.69 seconds
on a Pentium 4 2.4 GHz machine (334 boards per second).

------------------------

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Parody on "The Fountainhead" - http://shlom.in/towtf

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

#1038 From: Shlomi Fish <shlomif@...>
Date: Sat Feb 20, 2010 7:56 pm
Subject: Forking (= Multiprocessed) Freecell Solver-based Solver
shlomif2
Send Email Send Email
 
Hi all!

Today I took a break from converting the build-system of Website Meta Language
( http://thewml.org/ ) to CMake (which is now also used by Freecell Solver)
and while I waited for my Mandriva packages upgrade to finish, I started
writing a fork()-based multi-processed solver program:

http://en.wikipedia.org/wiki/Fork_%28operating_system%29

fork() is a system call that duplicates the current process, creating a parent
and a child. What my program does is create several child processes, each one
with a single bidirectional pair of pipes for communicating with the master
process (the parent). Each of these processes solves a range of boards that it
received from the master process, while reporting the statistics back to it,
by communicating with it using the pipes.

It took me quite a lot of time to get everything right. The main thing that
delayed me was the fact that I didn't realise that the select system call (see
http://en.wikipedia.org/wiki/Select_%28Unix%29 ) also reported filehandles
that became end-of-file, and so the read of the protocol's response structs
from them silently failed which made the master process hang. Changing the
read to check that it read exactly sizeof(response) bytes solved this problem.

Then I benchmarked it and the results were encouraging:

{{{{{{{{{{{{
Started at 1266685041.258715
Reached Board No. 4000 at 1266685052.702632 (total_num_iters=2232774)
Reached Board No. 8000 at 1266685064.422297 (total_num_iters=4507587)
Reached Board No. 12000 at 1266685075.570034 (total_num_iters=6693689)
Reached Board No. 16000 at 1266685088.051940 (total_num_iters=9077159)
Reached Board No. 20000 at 1266685099.088107 (total_num_iters=11274791)
Reached Board No. 24000 at 1266685110.548054 (total_num_iters=13519808)
Reached Board No. 28000 at 1266685122.337970 (total_num_iters=15802397)
Unsolved Board No. 11982 at 1266685076.187721
Finished at 1266685135.302799 (total_num_iters=18253266)
}}}}}}}}}}}}

Finished at 94.04 seconds (solving 340 boards per second) - versus the multi-
threaded version which took 95.69 seconds, an improvement of over 1.6 seconds.

I ran it like that:

{{{{
ARGS="--worker-step 16 -l by" PROG=./freecell-solver-fork-solve \
bash scripts/time-threads-num.bash 2 4
}}}}

Currently the multi-processed version of the solver is not installed, but
rather only compiled locally.

Enjoy and happy upcoming http://en.wikipedia.org/wiki/Purim !

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
What does "Zionism" mean? - http://shlom.in/def-zionism

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

#1039 From: Shlomi Fish <shlomif@...>
Date: Mon Feb 22, 2010 7:21 pm
Subject: Fwd: Re: Licence of Your Priority Queue Code in http://fc-solve.berlios.de/
shlomif2
Send Email Send Email
 
----------  Forwarded Message  ----------

Subject: Re: Licence of Your Priority Queue Code in http://fc-
solve.berlios.de/
Date: Monday 22 Feb 2010, 20:42:32
From: "Justin Heyes-Jones" <justinhj@...>
To: Shlomi Fish <shlomif@...>

Hi Shlomi

I release all new open source under MIT license so year, I'm happy to apply
that license to the pqueue.c code.

Please accept this email as confirmation that the code is now released under
MIT license.

Thanks

Justin Heyes-Jones

On 22 February 2010 10:00, Shlomi Fish <shlomif@...> wrote:

> Hi Justin!
>
> As you may remember, I have made use of your A* algorithm priority queue
> code
> for Freecell Solver ( http://fc-solve.berlios.de/ ), and you agreed to
> sublicense it under the public domain. Much more recently, I switched the
> Freecell Solver switched from the public domain to the MIT/X11 Licence. See
> these links for the motivation:
>
> * http://zgp.org/pipermail/linux-elitists/2009-March/012856.html
>
> * http://zgp.org/pipermail/linux-elitists/2009-March/012858.html
>
> Now, the problem is that pqueue.h, which is derived from your original
> pqueue.c file has been kept under the public domain because I wasn't
> confident
> in sublicensing it without your permission. So I'm asking you if I can make
> it
> dually-licensed - public domain and/or MIT/X11.
>
> I'm expecting your reply. Also feel free to contact me back using Instant
> Messaging:
>
> http://www.shlomifish.org/me/contact-me/
>
> Best regards,
>
>        Shlomi Fish
>
> P.S: due to mis-understanding your article on A*, I ended up implementing a
> Best-First-Search search in fc-solve instead of an A* scan. Though, it
> still
> gives a run-time choice between that and DFS/randomised-DFS with many
> possible
> parameters.
>
> --
> -----------------------------------------------------------------
> Shlomi Fish       http://www.shlomifish.org/
> Why I Love Perl - http://shlom.in/joy-of-perl
>
> Deletionists delete Wikipedia articles that they consider lame.
> Chuck Norris deletes deletionists whom he considers lame.
>
> Please reply to list if it's a mailing list post - http://shlom.in/reply .
>

-----------------------------------------
--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
"The Human Hacking Field Guide" - http://shlom.in/hhfg

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

#1040 From: Shlomi Fish <shlomif@...>
Date: Thu Feb 25, 2010 6:33 am
Subject: Solution Length Shortening Meta-Scan Performance - The "Flair"-based solver.
shlomif2
Send Email Send Email
 
Hi all.

In a private conversation with Gary Campbell (CCed to this message), he told
me that in one of the versions of his FCELL.COM solver, it solved a given
board using three different scans and then picked up the shortest solution.
This inspired me to do something like that for fc-solve.

I decided to run several scans for certain quotas and pick up the shortest
solution. So I ran a statistical analysis on the iterations of the various
atomic scans in my arsenal using the newly written process-for-shortness.pl
script in the presets directory, and picked up the 90% percentile of every
scan. I gave a top-limit for the iterations' count to 10,000 but the 90% mark
was always lower.

Then I constructed a new meta-scan, based on these alternative instances,
which I temporarily named "flairs"[Flair]. Now since the freecell_solver_user_
API does not yet have a support for it, I decided to prototype it first. I
initially wanted to use python and CTypes for that, but since
fc_pro_range_solver.c was already written in C and contained a lot of logic
that was hard to extract, I used it as a base and wrote it in C instead.

{{{
[Flair] - it's just a word I like. According to
http://en.wiktionary.org/wiki/flair it means "a natural or innate talent or
aptitude; a knack".
}}}

So I wrote the flair-based interpreter and after resolving a few bugs
successfully ran it. The first thing I should note was that it was very slow:
the whole thing took 674,667,532 iterations (670 Million or 0.67
Milliard/Giga) and lasted for 7,514 seconds on my Pentium 4 2.4 GHz machine -
roughly 2.08 hours.

That put aside, the output has improved since the latest shortest-length meta-
scan that I tried (here:
http://tech.groups.yahoo.com/group/fc-solve-discuss/message/980 ). The results
are:

<<<<<
FCS Moves
---------------------------
Min: 69
Max: 211
Average: 106.320603768868
StdDev: 8.77032953217722
Median: 106

FC-Pro Moves
---------------------------
Min: 29
Max: 180
Average: 68.1308165880184
StdDev: 10.6856135271265
Median: 68
>>>>>

Compared to the previous results (of the "gooey-unknown-thing" scan), one can
see that the average decreased by 10 steps, and there was also a decrease of 9
steps in the median, and that the standard deviation has also decreased. The
minimum has decreased, but the maximum increased a little.

In any case, I should note that the only board that this meta-scan reported as
intractable was the unsolvable 11,982, which means all the rest of the boards
were successfully solved. I still haven't resumed the flairs after a case
where they all report the board as intractable, which should yield an even
more accurate result.

Right now I'd like to investigate how to construct configurations that will be
less time intensive and yet yield relatively short solutions. See for example
this Perl Quiz on the subject:

* http://article.gmane.org/gmane.comp.lang.perl.qotw.discuss/2655

* http://community.livejournal.com/shlomif_tech/45610.html

Naturally, I also need to put this in the FCS core.

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
"Star Trek: We, the Living Dead" - http://shlom.in/st-wtld

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

#1041 From: "Donald P. Martin" <dpmartin@...>
Date: Sat Mar 6, 2010 3:35 pm
Subject: RE: Solution Length Shortening Meta-Scan Performance - The "Flair"-based solver.
buythenet
Send Email Send Email
 

Excuse me for entering this conversation.  I am a rank amateur at this subject.  Although I have a EE degree from MIT and have written code in C, I don’t consider myself an expert at either FreeCell or C.

 

I have been using a program called “FreeCell Pro  Solver Evaluation Edition Version 6.5 Build 11 dated 1997 to 2002  Wilson Callan, Adrian Ettlinger, Donald R. Woods”

 

I would like to update to a more recent version of a FreeCell solver, but I am not sure how to go about it. 

 

Any suggestions would be appreciated.

 

Don Martin

 

From: fc-solve-discuss@yahoogroups.com [mailto:fc-solve-discuss@yahoogroups.com] On Behalf Of Shlomi Fish
Sent: Thursday, February 25, 2010 12:34 AM
To: Freecell Solving Discussions
Cc: Gary Campbell
Subject: Solution Length Shortening Meta-Scan Performance - The "Flair"-based solver.

 

 

Hi all.

In a private conversation with Gary Campbell (CCed to this message), he told
me that in one of the versions of his FCELL.COM solver, it solved a given
board using three different scans and then picked up the shortest solution.
This inspired me to do something like that for fc-solve.

I decided to run several scans for certain quotas and pick up the shortest
solution. So I ran a statistical analysis on the iterations of the various
atomic scans in my arsenal using the newly written process-for-shortness.pl
script in the presets directory, and picked up the 90% percentile of every
scan. I gave a top-limit for the iterations' count to 10,000 but the 90% mark
was always lower.

Then I constructed a new meta-scan, based on these alternative instances,
which I temporarily named "flairs"[Flair]. Now since the freecell_solver_user_
API does not yet have a support for it, I decided to prototype it first. I
initially wanted to use python and CTypes for that, but since
fc_pro_range_solver.c was already written in C and contained a lot of logic
that was hard to extract, I used it as a base and wrote it in C instead.

{{{
[Flair] - it's just a word I like. According to
http://en.wiktionary.org/wiki/flair it means "a natural or innate talent or
aptitude; a knack".
}}}

So I wrote the flair-based interpreter and after resolving a few bugs
successfully ran it. The first thing I should note was that it was very slow:
the whole thing took 674,667,532 iterations (670 Million or 0.67
Milliard/Giga) and lasted for 7,514 seconds on my Pentium 4 2.4 GHz machine -
roughly 2.08 hours.

That put aside, the output has improved since the latest shortest-length meta-
scan that I tried (here:
http://tech.groups.yahoo.com/group/fc-solve-discuss/message/980 ). The results
are:

<<<<<
FCS Moves
---------------------------
Min: 69
Max: 211
Average: 106.320603768868
StdDev: 8.77032953217722
Median: 106

FC-Pro Moves
---------------------------
Min: 29
Max: 180
Average: 68.1308165880184
StdDev: 10.6856135271265
Median: 68
>>>>>

Compared to the previous results (of the "gooey-unknown-thing" scan), one can
see that the average decreased by 10 steps, and there was also a decrease of 9
steps in the median, and that the standard deviation has also decreased. The
minimum has decreased, but the maximum increased a little.

In any case, I should note that the only board that this meta-scan reported as
intractable was the unsolvable 11,982, which means all the rest of the boards
were successfully solved. I still haven't resumed the flairs after a case
where they all report the board as intractable, which should yield an even
more accurate result.

Right now I'd like to investigate how to construct configurations that will be
less time intensive and yet yield relatively short solutions. See for example
this Perl Quiz on the subject:

* http://article.gmane.org/gmane.comp.lang.perl.qotw.discuss/2655

* http://community.livejournal.com/shlomif_tech/45610.html

Naturally, I also need to put this in the FCS core.

Regards,

Shlomi Fish

--
----------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
"Star Trek: We, the Living Dead" - http://shlom.in/st-wtld

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .


#1042 From: Shlomi Fish <shlomif@...>
Date: Sat Mar 6, 2010 4:23 pm
Subject: Re: Solution Length Shortening Meta-Scan Performance - The "Flair"-based solver.
shlomif2
Send Email Send Email
 
Hi Donald!

On Saturday 06 Mar 2010 17:35:48 Donald P. Martin wrote:
> Excuse me for entering this conversation.

No problem. Next time when asking a new question, please start a new thread,
and don't reply to an existing one. Send the new E-mail to:

fc-solve-discuss@yahoogroups.com

> I am a rank amateur at this
> subject.  Although I have a EE degree from MIT and have written code in C,
> I don't consider myself an expert at either FreeCell or C.

OK. :-).

>
>
> I have been using a program called "FreeCell Pro  Solver Evaluation Edition
> Version 6.5 Build 11 dated 1997 to 2002  Wilson Callan, Adrian Ettlinger,
> Donald R. Woods"
>
>
>
> I would like to update to a more recent version of a FreeCell solver, but I
> am not sure how to go about it.

I suggest you give PySolFC a try:

http://pysolfc.sourceforge.net/

It has a very good integration with Freecell Solver (fc-solve) and its
developers provide a self-contained Windows package with everything, including
fc-solve.

If you're interested in using FreeCell Pro with the latest Freecell Solver,
you'll need to rebuild it. You can find the sources here:

http://fc-solve.berlios.de/don_woods.html

Adrian told me once that he forgot to include a required file there, so you
may need to ask him about it. I no longer recommend using FC-Pro due to the
many issues it has and in my opinion PySolFC is much better.

Regards,

	 Shlomi Fish

>
>
> Don Martin
>
>
>

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Why I Love Perl - http://shlom.in/joy-of-perl

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

#1043 From: "Gary Campbell" <gary@...>
Date: Sat Mar 6, 2010 4:36 pm
Subject: Re: Solution Length Shortening Meta-Scan Performance - The "Flair"-based solver.
jlandgdc
Send Email Send Email
 
Don,
If your computer runs Windows XP, you can use the FASLO Freecell
Autoplayer at http://numin8r.us/programs.  There is a copious help file
that you can get to by clicking "Player & Solver" and from there you
can click "Laboratory."  If you have any trouble downloading and using
it, send me an email.  If you are successful, email me anyway. I always
appreciate feedback.    -Gary Campbell


----- Original Message -----
From: Donald P. Martin
To: fc-solve-discuss@yahoogroups.com
Cc: 'Gary Campbell'
Sent: Saturday, March 06, 2010 7:35 AM
Subject: RE: Solution Length Shortening Meta-Scan Performance - The
"Flair"-based solver.


Excuse me for entering this conversation.  I am a rank amateur at this subject. 
Although
I have a EE degree from MIT and have written code in C, I don't consider myself
an expert
at either FreeCell or C.



I have been using a program called "FreeCell Pro  Solver Evaluation Edition
Version 6.5
Build 11 dated 1997 to 2002  Wilson Callan, Adrian Ettlinger, Donald R. Woods"



I would like to update to a more recent version of a FreeCell solver, but I am
not sure
how to go about it.



Any suggestions would be appreciated.



Don Martin

#1044 From: Shlomi Fish <shlomif@...>
Date: Mon Mar 22, 2010 12:10 pm
Subject: Benchmarking the first 1 million deals
shlomif2
Send Email Send Email
 
Hi all!

I recently got a new Acer laptop which is x86-64, 3 GB RAM, Dual Core, and
much faster than my Pentium 4 2.4 GHz stationary machine. So I benchmarked
Freecell Solver there (running Mandriva Linux 2010.0):

<<<
$ ARGS="-l by" bash scripts/time-threads-num.bash 2 2
$ perl scripts/time-fcs.pl DUMPS/dump002
36.3274490833282
$ ARGS="-l by" bash scripts/time-threads-num.bash -p 2 2
Testing 2
$ perl scripts/time-fcs.pl DUMPS/dump002
36.3902530670166
>>>

So the first 32,000 are getting solved at 36.3 seconds (880 boards per
second).

Next, by inspiration from the author of freecelljsolver (a solver for Freecell
in Java) I proceeded to benchmark the first 1,000,000 (1 Million) deals. The
results there were that it solved them in 19:42. Here is the complete dump:

<<<<
Started at 1268298933.066073
Reached Board No. 4000 at 1268298937.389454 (total_num_iters=1143353)
Reached Board No. 8000 at 1268298941.828037 (total_num_iters=2267404)
Reached Board No. 12000 at 1268298946.005864 (total_num_iters=5581498)
Unsolved Board No. 11982 at 1268298946.279086
Reached Board No. 16000 at 1268298950.767550 (total_num_iters=7886773)
Reached Board No. 20000 at 1268298955.032365 (total_num_iters=10166041)
Reached Board No. 24000 at 1268298959.380947 (total_num_iters=12405012)
Reached Board No. 28000 at 1268298963.875443 (total_num_iters=14679638)
Reached Board No. 32000 at 1268298968.778228 (total_num_iters=17013594)
Reached Board No. 36000 at 1268298973.391111 (total_num_iters=19415340)
Reached Board No. 40000 at 1268298978.470511 (total_num_iters=21822745)
Reached Board No. 44000 at 1268298983.049699 (total_num_iters=24210087)
Reached Board No. 48000 at 1268298987.282388 (total_num_iters=25326365)
Reached Board No. 52000 at 1268298992.044349 (total_num_iters=26530072)
Reached Board No. 56000 at 1268298996.567089 (total_num_iters=27703771)
Reached Board No. 60000 at 1268299003.330265 (total_num_iters=29312561)
Reached Board No. 64000 at 1268299008.423554 (total_num_iters=30549902)
Reached Board No. 68000 at 1268299013.376478 (total_num_iters=38927559)
Reached Board No. 72000 at 1268299018.419950 (total_num_iters=40132351)
Reached Board No. 76000 at 1268299022.976656 (total_num_iters=43808860)
Reached Board No. 80000 at 1268299027.642054 (total_num_iters=46114156)
Reached Board No. 84000 at 1268299032.461111 (total_num_iters=47331620)
Reached Board No. 88000 at 1268299037.659936 (total_num_iters=48597972)
Reached Board No. 92000 at 1268299042.260931 (total_num_iters=49718575)
Reached Board No. 96000 at 1268299046.715520 (total_num_iters=50850038)
Reached Board No. 100000 at 1268299051.560298 (total_num_iters=58040077)
Reached Board No. 104000 at 1268299055.931224 (total_num_iters=59160301)
Reached Board No. 108000 at 1268299060.643507 (total_num_iters=60384214)
Reached Board No. 112000 at 1268299065.101130 (total_num_iters=61520474)
Reached Board No. 116000 at 1268299069.671932 (total_num_iters=67287216)
Reached Board No. 120000 at 1268299074.315369 (total_num_iters=69580594)
Reached Board No. 124000 at 1268299079.267889 (total_num_iters=71990702)
Reached Board No. 128000 at 1268299083.976145 (total_num_iters=74407545)
Reached Board No. 132000 at 1268299088.789694 (total_num_iters=75593367)
Reached Board No. 136000 at 1268299093.400042 (total_num_iters=79103680)
Reached Board No. 140000 at 1268299098.136549 (total_num_iters=81457524)
Reached Board No. 144000 at 1268299102.689117 (total_num_iters=82622792)
Unsolved Board No. 146692 at 1268299106.516749
Reached Board No. 148000 at 1268299108.122014 (total_num_iters=86292194)
Reached Board No. 152000 at 1268299113.039898 (total_num_iters=87507054)
Reached Board No. 156000 at 1268299117.648090 (total_num_iters=88697179)
Reached Board No. 160000 at 1268299122.225282 (total_num_iters=93482499)
Reached Board No. 164000 at 1268299126.506827 (total_num_iters=95787587)
Reached Board No. 168000 at 1268299131.235822 (total_num_iters=96936849)
Reached Board No. 172000 at 1268299136.028463 (total_num_iters=100426606)
Reached Board No. 176000 at 1268299140.874727 (total_num_iters=101676535)
Reached Board No. 180000 at 1268299145.452187 (total_num_iters=102833030)
Reached Board No. 184000 at 1268299150.014454 (total_num_iters=107586737)
Unsolved Board No. 186216 at 1268299152.719760
Reached Board No. 188000 at 1268299154.804893 (total_num_iters=108792252)
Reached Board No. 192000 at 1268299159.569437 (total_num_iters=112350141)
Reached Board No. 196000 at 1268299164.001027 (total_num_iters=113472558)
Reached Board No. 200000 at 1268299168.588623 (total_num_iters=114654153)
Reached Board No. 204000 at 1268299173.330116 (total_num_iters=115848545)
Reached Board No. 208000 at 1268299178.367911 (total_num_iters=117065219)
Reached Board No. 212000 at 1268299182.728264 (total_num_iters=124060092)
Reached Board No. 216000 at 1268299186.993376 (total_num_iters=126323307)
Reached Board No. 220000 at 1268299191.759577 (total_num_iters=127524123)
Reached Board No. 224000 at 1268299196.575303 (total_num_iters=131017808)
Reached Board No. 228000 at 1268299201.015404 (total_num_iters=133344357)
Reached Board No. 232000 at 1268299205.319767 (total_num_iters=134460282)
Reached Board No. 236000 at 1268299209.699237 (total_num_iters=137818188)
Reached Board No. 240000 at 1268299214.402119 (total_num_iters=139006370)
Reached Board No. 244000 at 1268299219.118482 (total_num_iters=142446650)
Reached Board No. 248000 at 1268299223.717939 (total_num_iters=143608151)
Reached Board No. 252000 at 1268299228.393974 (total_num_iters=144788775)
Unsolved Board No. 254076 at 1268299231.181402
Reached Board No. 256000 at 1268299233.356485 (total_num_iters=145987301)
Reached Board No. 260000 at 1268299238.108245 (total_num_iters=147178626)
Reached Board No. 264000 at 1268299242.934368 (total_num_iters=148371037)
Reached Board No. 268000 at 1268299247.328548 (total_num_iters=156735546)
Reached Board No. 272000 at 1268299252.423965 (total_num_iters=159173130)
Reached Board No. 276000 at 1268299256.971318 (total_num_iters=161519631)
Reached Board No. 280000 at 1268299261.285004 (total_num_iters=163774821)
Reached Board No. 284000 at 1268299265.643881 (total_num_iters=166015024)
Reached Board No. 288000 at 1268299270.637606 (total_num_iters=168369559)
Reached Board No. 292000 at 1268299275.398432 (total_num_iters=170766500)
Reached Board No. 296000 at 1268299279.754515 (total_num_iters=171898380)
Reached Board No. 300000 at 1268299284.776089 (total_num_iters=175507322)
Reached Board No. 304000 at 1268299289.704953 (total_num_iters=176721878)
Reached Board No. 308000 at 1268299294.232020 (total_num_iters=177861884)
Reached Board No. 312000 at 1268299299.012277 (total_num_iters=182569377)
Reached Board No. 316000 at 1268299303.977753 (total_num_iters=183774657)
Reached Board No. 320000 at 1268299308.436219 (total_num_iters=184935469)
Reached Board No. 324000 at 1268299313.018409 (total_num_iters=189642048)
Reached Board No. 328000 at 1268299317.446320 (total_num_iters=190782487)
Reached Board No. 332000 at 1268299322.000125 (total_num_iters=194227739)
Reached Board No. 336000 at 1268299327.133331 (total_num_iters=196654896)
Reached Board No. 340000 at 1268299331.534165 (total_num_iters=199035581)
Reached Board No. 344000 at 1268299336.279351 (total_num_iters=200218178)
Reached Board No. 348000 at 1268299340.722257 (total_num_iters=201350423)
Reached Board No. 352000 at 1268299345.281028 (total_num_iters=205961940)
Reached Board No. 356000 at 1268299350.202568 (total_num_iters=207208438)
Reached Board No. 360000 at 1268299354.714480 (total_num_iters=210645708)
Reached Board No. 364000 at 1268299359.269070 (total_num_iters=211822010)
Reached Board No. 368000 at 1268299363.939199 (total_num_iters=213031388)
Reached Board No. 372000 at 1268299368.732508 (total_num_iters=217666244)
Reached Board No. 376000 at 1268299373.674238 (total_num_iters=218905807)
Reached Board No. 380000 at 1268299378.736419 (total_num_iters=222605752)
Reached Board No. 384000 at 1268299383.365020 (total_num_iters=224992973)
Reached Board No. 388000 at 1268299388.256569 (total_num_iters=227337371)
Reached Board No. 392000 at 1268299393.020713 (total_num_iters=229713730)
Reached Board No. 396000 at 1268299397.452367 (total_num_iters=230787014)
Reached Board No. 400000 at 1268299402.144014 (total_num_iters=234376340)
Reached Board No. 404000 at 1268299406.789507 (total_num_iters=236759686)
Reached Board No. 408000 at 1268299411.774226 (total_num_iters=237949350)
Reached Board No. 412000 at 1268299416.233218 (total_num_iters=241510806)
Reached Board No. 416000 at 1268299420.817549 (total_num_iters=242674718)
Reached Board No. 420000 at 1268299425.753249 (total_num_iters=243839730)
Reached Board No. 424000 at 1268299430.300299 (total_num_iters=248531796)
Reached Board No. 428000 at 1268299434.900021 (total_num_iters=249650699)
Reached Board No. 432000 at 1268299439.399204 (total_num_iters=253162811)
Reached Board No. 436000 at 1268299444.060968 (total_num_iters=254335209)
Reached Board No. 440000 at 1268299448.695516 (total_num_iters=255511700)
Reached Board No. 444000 at 1268299453.648485 (total_num_iters=260253891)
Reached Board No. 448000 at 1268299458.323854 (total_num_iters=261412344)
Reached Board No. 452000 at 1268299463.103133 (total_num_iters=264991462)
Unsolved Board No. 455889 at 1268299467.668028
Reached Board No. 456000 at 1268299467.769560 (total_num_iters=267355024)
Reached Board No. 460000 at 1268299472.286788 (total_num_iters=269678123)
Reached Board No. 464000 at 1268299477.176443 (total_num_iters=270895378)
Reached Board No. 468000 at 1268299481.581185 (total_num_iters=272019151)
Reached Board No. 472000 at 1268299486.678047 (total_num_iters=273256983)
Reached Board No. 476000 at 1268299491.525168 (total_num_iters=274462636)
Reached Board No. 480000 at 1268299496.285560 (total_num_iters=281629652)
Reached Board No. 484000 at 1268299500.969950 (total_num_iters=283982557)
Reached Board No. 488000 at 1268299506.330092 (total_num_iters=285315423)
Reached Board No. 492000 at 1268299510.966458 (total_num_iters=286492701)
Unsolved Board No. 495505 at 1268299515.233634
Reached Board No. 496000 at 1268299515.868401 (total_num_iters=287687859)
Reached Board No. 500000 at 1268299520.540537 (total_num_iters=288871522)
Reached Board No. 504000 at 1268299524.978415 (total_num_iters=289995029)
Reached Board No. 508000 at 1268299530.496896 (total_num_iters=291266895)
Reached Board No. 512000 at 1268299534.870160 (total_num_iters=300873772)
Unsolved Board No. 512118 at 1268299535.224423
Reached Board No. 516000 at 1268299539.631726 (total_num_iters=302093735)
Unsolved Board No. 517776 at 1268299542.204378
Reached Board No. 520000 at 1268299544.872656 (total_num_iters=305565597)
Reached Board No. 524000 at 1268299549.498572 (total_num_iters=308065594)
Reached Board No. 528000 at 1268299554.097664 (total_num_iters=310471486)
Reached Board No. 532000 at 1268299558.865456 (total_num_iters=311677431)
Reached Board No. 536000 at 1268299563.058333 (total_num_iters=315078652)
Reached Board No. 540000 at 1268299567.334492 (total_num_iters=317258999)
Reached Board No. 544000 at 1268299572.175834 (total_num_iters=318490107)
Reached Board No. 548000 at 1268299577.206832 (total_num_iters=319706262)
Reached Board No. 552000 at 1268299581.909397 (total_num_iters=324473743)
Reached Board No. 556000 at 1268299587.005845 (total_num_iters=326873821)
Reached Board No. 560000 at 1268299591.363000 (total_num_iters=329245976)
Reached Board No. 564000 at 1268299595.989695 (total_num_iters=331469643)
Reached Board No. 568000 at 1268299600.481327 (total_num_iters=332628609)
Reached Board No. 572000 at 1268299605.268623 (total_num_iters=336100031)
Reached Board No. 576000 at 1268299609.940968 (total_num_iters=337270945)
Reached Board No. 580000 at 1268299614.192280 (total_num_iters=338397303)
Reached Board No. 584000 at 1268299618.905861 (total_num_iters=339563416)
Reached Board No. 588000 at 1268299623.850622 (total_num_iters=345522498)
Reached Board No. 592000 at 1268299628.549186 (total_num_iters=347940331)
Reached Board No. 596000 at 1268299633.836703 (total_num_iters=349196963)
Reached Board No. 600000 at 1268299638.702806 (total_num_iters=350399879)
Reached Board No. 604000 at 1268299643.452445 (total_num_iters=351531128)
Reached Board No. 608000 at 1268299648.333622 (total_num_iters=352754384)
Reached Board No. 612000 at 1268299653.108385 (total_num_iters=353941299)
Reached Board No. 616000 at 1268299657.650542 (total_num_iters=355102831)
Reached Board No. 620000 at 1268299662.647513 (total_num_iters=356364737)
Reached Board No. 624000 at 1268299667.303008 (total_num_iters=367557553)
Reached Board No. 628000 at 1268299671.965846 (total_num_iters=368772525)
Reached Board No. 632000 at 1268299676.753097 (total_num_iters=369990258)
Reached Board No. 636000 at 1268299681.542495 (total_num_iters=371236530)
Reached Board No. 640000 at 1268299686.089035 (total_num_iters=372395179)
Reached Board No. 644000 at 1268299690.923348 (total_num_iters=379018446)
Reached Board No. 648000 at 1268299695.801712 (total_num_iters=380238041)
Reached Board No. 652000 at 1268299700.270595 (total_num_iters=381392525)
Reached Board No. 656000 at 1268299704.694239 (total_num_iters=382521957)
Reached Board No. 660000 at 1268299709.655299 (total_num_iters=388483543)
Reached Board No. 664000 at 1268299714.031201 (total_num_iters=389554486)
Reached Board No. 668000 at 1268299719.061633 (total_num_iters=390757657)
Reached Board No. 672000 at 1268299723.548048 (total_num_iters=391893563)
Reached Board No. 676000 at 1268299728.748415 (total_num_iters=397960113)
Reached Board No. 680000 at 1268299733.716742 (total_num_iters=399208886)
Reached Board No. 684000 at 1268299738.566489 (total_num_iters=400357711)
Reached Board No. 688000 at 1268299743.022496 (total_num_iters=405180344)
Reached Board No. 692000 at 1268299747.867138 (total_num_iters=406413020)
Reached Board No. 696000 at 1268299752.481609 (total_num_iters=409913743)
Reached Board No. 700000 at 1268299757.445001 (total_num_iters=412335962)
Reached Board No. 704000 at 1268299761.914429 (total_num_iters=413492622)
Reached Board No. 708000 at 1268299766.609923 (total_num_iters=417000599)
Reached Board No. 712000 at 1268299771.464150 (total_num_iters=418247675)
Reached Board No. 716000 at 1268299776.171579 (total_num_iters=419428731)
Reached Board No. 720000 at 1268299780.961003 (total_num_iters=424130527)
Reached Board No. 724000 at 1268299785.485628 (total_num_iters=425284492)
Reached Board No. 728000 at 1268299790.075786 (total_num_iters=428858071)
Reached Board No. 732000 at 1268299794.760918 (total_num_iters=430041026)
Reached Board No. 736000 at 1268299799.836342 (total_num_iters=431293458)
Unsolved Board No. 739671 at 1268299804.262154
Reached Board No. 740000 at 1268299804.571853 (total_num_iters=432483464)
Reached Board No. 744000 at 1268299809.259376 (total_num_iters=433659196)
Reached Board No. 748000 at 1268299813.696949 (total_num_iters=440729441)
Reached Board No. 752000 at 1268299818.437200 (total_num_iters=443072966)
Reached Board No. 756000 at 1268299823.613610 (total_num_iters=444384859)
Reached Board No. 760000 at 1268299828.610735 (total_num_iters=448019375)
Reached Board No. 764000 at 1268299833.148221 (total_num_iters=450411187)
Reached Board No. 768000 at 1268299837.751770 (total_num_iters=452742401)
Reached Board No. 772000 at 1268299842.409534 (total_num_iters=453862507)
Reached Board No. 776000 at 1268299847.048449 (total_num_iters=457380042)
Reached Board No. 780000 at 1268299851.489713 (total_num_iters=459702461)
Unsolved Board No. 781948 at 1268299854.074747
Reached Board No. 784000 at 1268299856.657110 (total_num_iters=462030129)
Reached Board No. 788000 at 1268299861.258809 (total_num_iters=464444557)
Reached Board No. 792000 at 1268299866.048832 (total_num_iters=466848651)
Reached Board No. 796000 at 1268299870.986462 (total_num_iters=468080331)
Reached Board No. 800000 at 1268299875.916308 (total_num_iters=471668577)
Reached Board No. 804000 at 1268299880.883919 (total_num_iters=474194120)
Reached Board No. 808000 at 1268299885.291986 (total_num_iters=476511705)
Reached Board No. 812000 at 1268299889.964176 (total_num_iters=477702621)
Reached Board No. 816000 at 1268299895.009056 (total_num_iters=478936278)
Reached Board No. 820000 at 1268299899.516220 (total_num_iters=483628289)
Reached Board No. 824000 at 1268299904.261913 (total_num_iters=484806350)
Reached Board No. 828000 at 1268299909.028399 (total_num_iters=485995107)
Reached Board No. 832000 at 1268299913.552536 (total_num_iters=487116058)
Reached Board No. 836000 at 1268299918.886227 (total_num_iters=488352119)
Reached Board No. 840000 at 1268299923.657791 (total_num_iters=489566985)
Reached Board No. 844000 at 1268299928.375754 (total_num_iters=498000707)
Reached Board No. 848000 at 1268299933.075622 (total_num_iters=500368790)
Reached Board No. 852000 at 1268299937.304520 (total_num_iters=502627136)
Reached Board No. 856000 at 1268299942.268452 (total_num_iters=503900026)
Reached Board No. 860000 at 1268299946.866283 (total_num_iters=505065618)
Reached Board No. 864000 at 1268299951.284089 (total_num_iters=506158314)
Reached Board No. 868000 at 1268299956.129914 (total_num_iters=511937441)
Reached Board No. 872000 at 1268299961.417360 (total_num_iters=514294702)
Reached Board No. 876000 at 1268299966.807938 (total_num_iters=516928967)
Reached Board No. 880000 at 1268299971.533521 (total_num_iters=518136152)
Reached Board No. 884000 at 1268299976.557082 (total_num_iters=521858115)
Reached Board No. 888000 at 1268299981.245458 (total_num_iters=524299888)
Reached Board No. 892000 at 1268299986.188179 (total_num_iters=525500515)
Reached Board No. 896000 at 1268299990.713759 (total_num_iters=526664542)
Reached Board No. 900000 at 1268299995.739821 (total_num_iters=527926824)
Reached Board No. 904000 at 1268300000.489644 (total_num_iters=529110717)
Reached Board No. 908000 at 1268300005.265323 (total_num_iters=530330424)
Reached Board No. 912000 at 1268300010.302728 (total_num_iters=538612241)
Reached Board No. 916000 at 1268300014.936253 (total_num_iters=541003316)
Reached Board No. 920000 at 1268300019.815608 (total_num_iters=542257353)
Reached Board No. 924000 at 1268300024.224253 (total_num_iters=545704875)
Reached Board No. 928000 at 1268300028.848974 (total_num_iters=548047654)
Reached Board No. 932000 at 1268300033.390843 (total_num_iters=549215012)
Reached Board No. 936000 at 1268300038.219946 (total_num_iters=550432918)
Reached Board No. 940000 at 1268300043.035433 (total_num_iters=555100890)
Reached Board No. 944000 at 1268300047.548588 (total_num_iters=556266424)
Reached Board No. 948000 at 1268300052.294947 (total_num_iters=559842298)
Reached Board No. 952000 at 1268300057.144714 (total_num_iters=561098477)
Reached Board No. 956000 at 1268300062.123361 (total_num_iters=562326093)
Reached Board No. 960000 at 1268300066.816339 (total_num_iters=563555404)
Reached Board No. 964000 at 1268300071.826200 (total_num_iters=564704346)
Reached Board No. 968000 at 1268300076.470503 (total_num_iters=571857361)
Reached Board No. 972000 at 1268300081.530385 (total_num_iters=573083585)
Reached Board No. 976000 at 1268300086.582952 (total_num_iters=574258624)
Reached Board No. 980000 at 1268300091.304346 (total_num_iters=579136119)
Reached Board No. 984000 at 1268300095.797490 (total_num_iters=581459830)
Reached Board No. 988000 at 1268300100.553171 (total_num_iters=582643828)
Reached Board No. 992000 at 1268300105.348527 (total_num_iters=583830403)
Reached Board No. 996000 at 1268300109.951174 (total_num_iters=584968878)
Reached Board No. 1000000 at 1268300115.056821 (total_num_iters=591048851)
Finished at 1268300115.060314 (total_num_iters=592211578)
>>>>

It reports 10 boards as unsolved:

<<<
Unsolved Board No. 11982 at 1268298946.279086
Unsolved Board No. 146692 at 1268299106.516749
Unsolved Board No. 186216 at 1268299152.719760
Unsolved Board No. 254076 at 1268299231.181402
Unsolved Board No. 455889 at 1268299467.668028
Unsolved Board No. 495505 at 1268299515.233634
Unsolved Board No. 512118 at 1268299535.224423
Unsolved Board No. 517776 at 1268299542.204378
Unsolved Board No. 739671 at 1268299804.262154
Unsolved Board No. 781948 at 1268299854.074747
>>>

According to the Freecell FAQ , there are 8 unsolvable deals below 1 million
and they are:

<<<
11982, 146692, 186216, 455889, 495505, 512118, 517776, 781948
>>>

So fc-solve could not solve deal No. 254,076 and deal No. 739,671 with the "-l
by" configuration. However:

<<<
shlomi:~$ pi-make-microsoft-freecell-board 254076 | fc-solve | tail -3
This game is solveable.
Total number of states checked is 5314.
This scan generated 5416 states.
shlomi:~$ pi-make-microsoft-freecell-board 254076 | fc-solve -l cj | tail -3
This game is solveable.
Total number of states checked is 26810.
This scan generated 18025 states.
shlomi:~$
>>>

So it is generally solvable by the meta-move-based fc-solve. The other game is
not solvable using it, but it is using "-l gi":

<<<
$ pi-make-microsoft-freecell-board 739671 | fc-solve -l gi | tail -3
This game is solveable.
Total number of states checked is 1193481.
This scan generated 1133337 states.
>>>

I don't understand why "-l by" erroneously reports 254,076 as unsolvable since
it should yield the same verdicts as "-l cj" and an option less "fc-solve". So
I guess I'll need to investigate.

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Freecell Solver - http://fc-solve.berlios.de/

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

#1045 From: Shlomi Fish <shlomif@...>
Date: Thu Mar 25, 2010 6:50 am
Subject: Re: Benchmarking the first 1 million deals
shlomif2
Send Email Send Email
 
On Monday 22 Mar 2010 14:10:22 Shlomi Fish wrote:
> Hi all!
>
> I recently got a new Acer laptop which is x86-64, 3 GB RAM, Dual Core, and
> much faster than my Pentium 4 2.4 GHz stationary machine. So I benchmarked
> Freecell Solver there (running Mandriva Linux 2010.0):
>
> <<<
> $ ARGS="-l by" bash scripts/time-threads-num.bash 2 2
> $ perl scripts/time-fcs.pl DUMPS/dump002
> 36.3274490833282
> $ ARGS="-l by" bash scripts/time-threads-num.bash -p 2 2
> Testing 2
> $ perl scripts/time-fcs.pl DUMPS/dump002
> 36.3902530670166
> >>>
>
> So the first 32,000 are getting solved at 36.3 seconds (880 boards per
> second).
>
> Next, by inspiration from the author of freecelljsolver (a solver for
> Freecell in Java) I proceeded to benchmark the first 1,000,000 (1 Million)
> deals. The results there were that it solved them in 19:42. Here is the
> complete dump:
[SNIP]
>

I've now ran the same benchmark without KDE (or any graphical environment)
running and the 1M-deals benchmark finished in 19:35 minutes, which is an
improvement of 7 seconds (851 deals per second).

> It reports 10 boards as unsolved:
>
> <<<
> Unsolved Board No. 11982 at 1268298946.279086
> Unsolved Board No. 146692 at 1268299106.516749
> Unsolved Board No. 186216 at 1268299152.719760
> Unsolved Board No. 254076 at 1268299231.181402
> Unsolved Board No. 455889 at 1268299467.668028
> Unsolved Board No. 495505 at 1268299515.233634
> Unsolved Board No. 512118 at 1268299535.224423
> Unsolved Board No. 517776 at 1268299542.204378
> Unsolved Board No. 739671 at 1268299804.262154
> Unsolved Board No. 781948 at 1268299854.074747
> >>>
>
> According to the Freecell FAQ , there are 8 unsolvable deals below 1
> million and they are:
>
> <<<
> 11982, 146692, 186216, 455889, 495505, 512118, 517776, 781948
> >>>
>
> So fc-solve could not solve deal No. 254,076 and deal No. 739,671 with the
> "-l by" configuration. However:
>
> <<<
> shlomi:~$ pi-make-microsoft-freecell-board 254076 | fc-solve | tail -3
> This game is solveable.
> Total number of states checked is 5314.
> This scan generated 5416 states.
> shlomi:~$ pi-make-microsoft-freecell-board 254076 | fc-solve -l cj | tail
> -3 This game is solveable.
> Total number of states checked is 26810.
> This scan generated 18025 states.
> shlomi:~$
> >>>
>
> So it is generally solvable by the meta-move-based fc-solve. The other game
> is not solvable using it, but it is using "-l gi":
>
> <<<
> $ pi-make-microsoft-freecell-board 739671 | fc-solve -l gi | tail -3
> This game is solveable.
> Total number of states checked is 1193481.
> This scan generated 1133337 states.
> >>>
>
> I don't understand why "-l by" erroneously reports 254,076 as unsolvable
> since it should yield the same verdicts as "-l cj" and an option less
> "fc-solve". So I guess I'll need to investigate.
>

I've now found the reason. When the scans synergy was set to mark-dead-ends, I
stopped after the first scan reported a "cannot solve" verdict. But it's
possible it was blocked from solving by other scans (a.k.a "soft threads"),
and as a result it yielded a false report. This is now fixed in trunk.

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://shlom.in/sussman

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

#1046 From: Shlomi Fish <shlomif@...>
Date: Thu Mar 25, 2010 7:35 am
Subject: What's New in the Version Control Repository ( r2748 )
shlomif2
Send Email Send Email
 
Hi all!

Here's what's new in the Freecell Solver version control repository, since the
last update ( http://tech.groups.yahoo.com/group/fc-solve-discuss/message/1037
) at r2624:

1. I created a branch for integrating the patsolve solving logic:

http://svn.berlios.de/viewcvs/fc-solve/branches/integrate-patsolve-atomic-
moves-logic/

It's not working satisfactorily yet, and I've neglected it, because it's a lot
of work and the Patsolve code is all over the place.

2. I added the forking range solver and fixed some bugs in it:

http://tech.groups.yahoo.com/group/fc-solve-discuss/message/1038

It's now working and on my stationary machine yielded somewhat faster results
than the multi-threaded solver.

3. The time-threads-num.bash script was refactored and enhanced - it now
accepts several flags.

4. I wrote an E-mail about a Perl quiz to find an optimal allocation:

/trunk/fc-solve/presets/soft-threads/meta-moves/auto-gen/docs/

No one took part in that quiz, though.

5. I converted char * to const char * in the interface where appropriate and
then created a typedef for it with a flag that people can use to link against
older versions.

6. pqueue.h was converted to the MIT/X11 licence, with the permission of its
author. Freecell Solver is now fully MIT/X11.

7. Implemented the optimise-for-shortness scheme using the so-called "flair-
based solvers":

http://tech.groups.yahoo.com/group/fc-solve-discuss/message/1040

8. Fixed a Best-First-Search recycling memory leak that was reported by
valgrind.

9. Added a "Tatzer" theme for x86-64 benchmarking.

10. Updated the links on the front page. Thanks to Jurij Bortnik . Added a
link to freecelljsolver and fixed more links.

11. Continuing a solution if a is_a_complete_scan thread terminates upon
synergy.

This is done to avoid states reported as falsely unsolvable such as MS 254,076
with -l by.

12. Add the -o / --output flag to output to a file.

13. Now caching the pointers to the move functions in the BeFS/BrFS scans.

14. In the instance and soft_thread structs several flags were implemented as
32-bit integers. As a result, the occupied a lot of space. In a series of
patches, they were converted to bits inside 8-bit fields. Furthermore, two
dwords were converted to a byte.

----------------------

Enjoy!

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Best Introductory Programming Language - http://shlom.in/intro-lang

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

#1047 From: Shlomi Fish <shlomif@...>
Date: Sat Mar 27, 2010 3:57 pm
Subject: Freecell Solver 2.42.0 Was Released
shlomif2
Send Email Send Email
 
Freecell Solver 2.40.0 was released. You can download the source distribution
from http://fc-solve.berlios.de/ . Here are the news :

Version 2.42.0: (27-March-2010)
-------------------------------

1. Add the +-o+ / +--output+ flag to +fc-solve+ to output to a file.

2. Now installing the new executables ( freecell-solver-fc-pro-range-solve ,
freecell-solver-multi-thread-solve , freecell-solver-range-parallel-solve ,
etc.) by default.

3. Bug fix: added a missing break after a case in cmd_line.c.

4. Fixed the Makefile's "pdfs" target.

5. Converted many +char *+ data types in the interface to
+freecell_solver_string_t+, which can be +const char *+. The default is
+const char *+.

6. +pqueue.h+ was converted to the MIT/X11 license, with the permission of its
author. Freecell Solver is now fullly MIT/X11.

7. Fixed a Best-First-Search recycling memory leak that was reported by
valgrind.

8. Bug fix: now continuing a solution if a is_a_complete_scan thread
terminates
with the scans synergy set to +dead-end-marks+. This was done to avoid states
reported as falsely unsolvable such as MS 254,076 with +-l by+.

9. Added a forking range solver - not installed by default. See:
http://tech.groups.yahoo.com/group/fc-solve-discuss/message/1038 . Sometimes
it yields somewhat better performance.

10. Disabled tcmalloc in debug mode because it messes things up.

11. Various internals cleanups and optimizations.

Regards,

	 Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
List of Portability Libraries - http://shlom.in/port-libs

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

#1048 From: Shlomi Fish <shlomif@...>
Date: Sat Mar 27, 2010 8:43 pm
Subject: Re: Freecell Solver 2.42.0 Was Released
shlomif2
Send Email Send Email
 
On Saturday 27 Mar 2010 18:57:52 Shlomi Fish wrote:
> Freecell Solver 2.40.0 was released. You can download the source
> distribution from http://fc-solve.berlios.de/ . Here are the news :
>

That's supposed to be version 2.42.0 - not 2.40.0. And there's now a Windows
binary release at:

http://fc-solve.berlios.de/download.html#latest-stable

Regards,

	 Shlomi Fish

> Version 2.42.0: (27-March-2010)
> -------------------------------
>
> 1. Add the +-o+ / +--output+ flag to +fc-solve+ to output to a file.
>
> 2. Now installing the new executables ( freecell-solver-fc-pro-range-solve
> , freecell-solver-multi-thread-solve ,
> freecell-solver-range-parallel-solve , etc.) by default.
>
> 3. Bug fix: added a missing break after a case in cmd_line.c.
>
> 4. Fixed the Makefile's "pdfs" target.
>
> 5. Converted many +char *+ data types in the interface to
> +freecell_solver_string_t+, which can be +const char *+. The default is
> +const char *+.
>
> 6. +pqueue.h+ was converted to the MIT/X11 license, with the permission of
> its author. Freecell Solver is now fullly MIT/X11.
>
> 7. Fixed a Best-First-Search recycling memory leak that was reported by
> valgrind.
>
> 8. Bug fix: now continuing a solution if a is_a_complete_scan thread
> terminates
> with the scans synergy set to +dead-end-marks+. This was done to avoid
> states reported as falsely unsolvable such as MS 254,076 with +-l by+.
>
> 9. Added a forking range solver - not installed by default. See:
> http://tech.groups.yahoo.com/group/fc-solve-discuss/message/1038 .
> Sometimes it yields somewhat better performance.
>
> 10. Disabled tcmalloc in debug mode because it messes things up.
>
> 11. Various internals cleanups and optimizations.
>
> Regards,
>
>  Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Stop Using MSIE - http://www.shlomifish.org/no-ie/

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Messages 1019 - 1048 of 1345   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help