Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Writing a meta-language to describe eval function

Author: Vincent Diepeveen

Date: 09:19:14 07/02/03

Go up one level in this thread


On July 01, 2003 at 15:29:28, Andrei Fortuna wrote:

>cout << "Hello Friends" << endl;
>
>I'll begin by saying that I am an adept of complex evaluation functions. I am
>convinced that a well written evaluation function is essential for a top playing
>program.

I agree. Guess what diep is doing :)

>The problem seems that when you get to the tiny details it is hard to write a
>very complex eval function in C/C++. Actually not hard to write but hard to
>debug and hard to add new terms for eval and modify values for existing ones.
>Not to mention hard to quickly test new ideas for eval.

Not so much C/C++ is the problem, but the actual 1/0 behaviour of a computer
where a human can weight everything.

>So I was thinking that a meta language for eval would be a wonderful tool. What

And wonderful slow.

>I have in mind is something that would translate my human-like meta language
>into machine code that will replace my current evaluation function. Maybe even a
>translator that will generate valid C/C++ code tailored for my engine !

Nah even better would be a robot creating the entire evaluation for us while we
lie down at the couch :)

>Now : I know this or something very similar have been tried before. My questions
>to you, my friends, are :

No it has not been tried before. Nimzo had some simplistic preprocessor language
one day but you could not define loops or scanning with it. Just simple
patterns.

>1) Do you have references to previous work on this area ? I am sure that I have
>read a paper which describes specifying eval func in human language so there
>certainly must be previous work

Everyone keeps a big lock on their evaluatoin source code in general.

>2) What tools would you recommend for writing my translator ? I don't have the
>resources to write from scratch a compiler for the meta-language so I would have
>to use something existent. Lexx/yacc ? Or something else ?

The question would be whether the language in the end wouldn't be looking very
similar to C or C++. In short, why not directly write it in C/C++ then?

>It just occured to me that we could start an OpenSource project for this
>meta-language. Imagine : having an universal language to write our eval

Then i bet after 6 months when you have written yourself 100 source code lines,
then some Dann Corbitt takes over your project as no one else cares for it. Then
he will convert your pretty code to bitboards and your program slows down 5
times first then secondly the meta language will be bad documented and end up
being even worse than writing it directly in C.

>functions , and then each programmer writes (or modifies existing
>compiler/translator) to produce code (c/c++ or binary code) tailored for his
>engine and the structures used in his engine from this meta-languages !

Which programmer do you refer to? Know an open source programmer that is rated
above 1200 and is interested in helping you?

>What do you think ? Is this a crazy idea ? I see that the hardest part would be

It is a nice idea, regrettably it is not going to work for a number of reasons
which are trivial.

My tip to you would be that you do some effort yourself before asking some
others to write something for you. As we have a saying here:
  "someone else will do it for you" :)

>to define this meta language so it will be useful to all (simple enough human
>like language to describe eval functions) but easy to convert to (binary/C++)
>code. But once this is done we will have huge freedom to test our ideas and even
>non-programmers will be able to use it into practice ! Imagine giving such a

How in jupiter will non programmers be able to program evaluation for you in an
imperative language?

Note that you need imperative language, because if you make it a functional
language the average slowdown will be around 10000 times when compared to
optimized C code.

>tool in the hand of a grandmaster to tune your engine ! Not to mention how easy
>will be to understand the ideas from other's functions (have you ever tried to
>understand what somebody else's program does ? then you know what I am talking
>about).
>
>Or am I just daydreaming ?

For sure

>Please share your thoughts,
>Sincerily,
>Andrei



This page took 0.01 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.