SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

SCOUG-Programming Mailing List Archives

Return to [ 04 | April | 2003 ]

<< Previous Message <<


Date: Fri, 4 Apr 2003 16:35:08 PST8
From: "Gregory W. Smith" <gsmith@well.com >
Reply-To: scoug-programming@scoug.com
To: < "scoug-programming@scoug.com" > scoug-programming@scoug.com >
Subject: SCOUG-Programming: Message Six


Content Type: text/plain

Content-Transfer-Encoding: 7bit

On Fri, 4 Apr 2003 07:21:24 PST8, Lynn H. Maxson wrote:
>Now we have had some doubts raised about this approach
>comparing it to using a Swiss army knife with a general
>purpose blade against a filet knife to filet a fish:
>"Well, at least we have moved the analogy to something
>somewhat more accurate. I have a good collection of
>Victronix, ToolLogic, Leatherman, etc.... Nothing like having a
>bottle opener, can opener, corkscrew, AND a knife all in one
>package. A Swiss Army Knife is great for a picnic, but a REAL
>fillet knife is much better for cleaning fish."--Gregory W.
>Smith.
>
>Perhaps no better counter as to which knife one has in
>multi-purpose software lies in Greg's Python coding example
>where he offers solutions for multiple peg solitaire formations.
>Perhaps when he reviews his source code with us, his Swiss
>army knife of peg solitaire solutions, he will point out the
>compromises he made in providing this general solution as
>opposed to separate program solutions for each formation.

Well, I am one step closer to making my point--after failing utterly so
far. Each failure is one step closer to success. My Python example
was NOT meant to be a "Swiss army knife of peg solitaire solutions".

I was trying to make another point entirely.

My first shot at peg solitaire in Python is attached. I only solves
the complete board layout--or it should. I set it loose on my 1.6 GHz
Pentium over three weeks ago; I expect to start getting solutions RSN
(Real Soon Now). It has the same depth-first, recursive descent
solution routine in my first post.

My Python code in the first post was to make the point that automatic
generation of test data may be fine in theory but not practical.
Giving thought to the initial test data may have a better payoff than
brute force. I have been willing to wait a few weeks on PegSolve2a.py
since I did a bit of additional work after it had run a few days. My
additional work required review of this particular problem to find the
extra test cases. The selected test data proves that complete
solutions exist for 6, 9, and 11 pegs. Solutions exist for 16, 17, and
21 pegs, but I did not let them run to completion.

As for 24 and 32 pegs--time will tell. I will let the original run
until the next meeting (or until the next power failure) and report on
it then. Maybe by that time I will have some hands on experience with
the profiler and we can also look at optimization.

Until then, I will retain my skepticism about an Esperanto of process
specification languages. The evolution of PL/1 to PL/S gives me hope;
the existence of Perl tempers my hope with despair.


Content Type: application/octet-stream

File attachment: PegSolve2a.py


<< Previous Message <<

Return to [ 04 | April | 2003 ]



The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.