Computer Chess Club Archives


Search

Terms

Messages

Subject: A little knowledge is a dangerous thing

Author: Steven Edwards

Date: 07:18:04 03/14/04

Go up one level in this thread


>On March 13, 2004 at 21:35:17, Steven Edwards wrote:
>>On March 13, 2004 at 12:37:36, Vincent Diepeveen wrote:
>>>On March 13, 2004 at 11:52:07, Steven Edwards wrote:
>>
>>>>So, here's some sample test code to recognize, without search, potentially
>>>>interesting knight forks.  It's an example of bridging the gap between bitboards
>>>>and ideas.
>>>
>>>oh what a horrible code.
>>>
>>>Am i glad that i program in C.
>>
>>Thank you for your obviously well-considered and professional opinion.
>>
>>Seriously: Vincent, if you think it's bad, then I must be on the right track!
>
>I'm sure you will have many fans when writing it in a functional language.

First, let me clarify the idea of a functional language, as you are unclear on
this point.  A functional programming model eliminates the use of destructive
modification of generalized variables.  Roughly speaking, this means no explicit
assignment statements and no global variables.  The Lisp dialect Scheme is
usually employed in a strict functional manner.  Lisp can be used strictly
functionally, but it is not mandatory to do so.  My use of ChessLisp is not
strictly functional (it uses the "setf" intrinsic, among several other
destructive modifiers), but overall the use of generalized variables is
relatively minimal.  In Symbolic, there is only one global variable, and that
could be eliminated (although at a slight decrease in efficiency).

>I wrote once a checkersprogram in a functional language very similar to this one
>(but of course developed at university Amsterdam: gofer), so i'm sure that from
>all the posters here i'm the only one trying to figure out the many bugs in your
>detection code.

I've tested the SuggestKnightForks code on plenty of positions with no crashes
and no errors in the results.  I welcome any bug reports, but false claims of
"many" bugs are not helpful.

>Meanwhile realizing that when you extend your functional code to a big program,

Combined with the interpreter and the toolkit, the system source is already 65K+
lines (2M+ bytes).

>that you will suffer from all the big problems that such languages give:
>  - Maintainability (no one can maintain this)

There are large Lisp systems that have been around for years that are
successfully maintained.  Compared with some C/C++ projects I've seen,
maintaining well designed Lisp systems is a breeze.

>  - Responsibility (who created that bug in my companies code?)

How Lisp or Scheme or Prolog any different from other programming environments
in this aspect?

>  - Development time (takes 10 years to make something simple)

You have it reversed; prototyping in Lisp is almost always faster than with
other languages.

>  - Execution speed (factor 10000 slower when interpreted than the well known

I assure you that my interpreter proves you are in error by a factor of greater
than 1,000.

>  - Readability (no one can read your code)

I know of hundreds of people who can read my Lisp code without difficulty.  Of
course, they are mostly Lispers and Schemers that have attended somewhat decent
universities.

>  - Complexibility (you make it yourself as usual too complex to do
>    something simple, so extending code is a no-no)

Most would disagree on this point, as Lisp was intended from the start to be an
extendible language.

>  - Survivability (if you die no one else can maintain it)

Hah!  I've seen your "world's fastest move generator" source, and if that's your
idea of easily maintained code, well ...

>... and that's just the quicko's, there is much more problems...
>
>Now imagine that a strong chessprogram from 1 MB+ source code using all this
>type of cryptic stuff would be running in a tournament.

It's over 2M+.  It's not cryptic to me.  And yes, it will be running in
tournaments.

>What time would it take to develop all that in a functional language?

I estimate a little over a year at roughly five hours per week.

>How many years would it take to search to the same search depth like his
>opponent?

If the program were smart enough, a single ply depth would be sufficient.  You
are oblivious to the concept of doing CC with other than a full width search and
a prayer to the goddess EnnPeeEss.

>A functional program from 1MB source code, ever seen it?

Yes.  Macsyma and similar algebraic manipulation programs.

>I have, it's hell!

Supporters of U.S. President Harry Truman would sometimes tell him "Give 'em
Hell, Harry!" and the phrase became a nickname of sorts.  Truman replied to this
with "I don't give them Hell; I just tell them the truth and they think it's
Hell."



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.