Computer Chess Club Archives


Search

Terms

Messages

Subject: Writing a meta-language to describe eval function

Author: Andrei Fortuna

Date: 12:29:28 07/01/03


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.

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.

So I was thinking that a meta language for eval would be a wonderful tool. What
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 !

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

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

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 ?

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
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 !

What do you think ? Is this a crazy idea ? I see that the hardest part would be
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
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 ?

Please share your thoughts,
Sincerily,
Andrei






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