Reply
 
LinkBack Thread Tools Display Modes
  #1   Report Post  
Old March 30th 04, 06:12 PM
Filipe Maia
 
Posts: n/a
Default Eval function

Does a chess program needs an extensive eval function to be good?
I've looked at crafty's function while trying to build the eval for my
engine and i have to
admit i was intimidated. Then i looked at Sjeng Free and it was pretty
manageable, only 700 lines.
So do i need to add a lot of fine parameters to my eval function or is it
possible to build
a good engine with a dumb fast eval function that only does a bit more
extensive eval on pawn
structure (because i can do it for free with the pawn hash table)?


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
  #2   Report Post  
Old March 30th 04, 09:58 PM
Mikko Nummelin
 
Posts: n/a
Default Eval function

On Tue, 30 Mar 2004, Filipe Maia wrote:

Does a chess program needs an extensive eval function to be good?


Unfortunately yes. The values for different positional advantages or
drawbacks have also to be chosen very precisely.

I've looked at crafty's function while trying to build the eval for my
engine and i have to admit i was intimidated. Then i looked at Sjeng
Free and it was pretty manageable, only 700 lines. So do i need to add a
lot of fine parameters to my eval function or is it possible to build a
good engine with a dumb fast eval function that only does a bit more
extensive eval on pawn structure (because i can do it for free with the
pawn hash table)?


Evaluation function is perhaps the most difficult task to do when writing
a chess program. For example in my program, Needle, see

http://www.math.hut.fi/~mnummeli/needle

, I am far from satisfied of the quality of that part of the program.


Mikko Nummelin
  #3   Report Post  
Old March 31st 04, 08:15 AM
Alex
 
Posts: n/a
Default Eval function

While search engines serves to choose the best position at some ply depth
using some logic, evaluation function provides the values for position
choice.
The less options and factors you have, the more search engine in troubles
to choose between two different positions with the same evaluation.
As a critical case if eval function evaluates only material, it will only
able to keep material balance using sophisticated tactics and avoiding
material loss, but it has to lead its side to win or draw, not just
material dominance. Good eval must lead to win even in circumstances
of balanced material.

"Filipe Maia" wrote in message
news
Does a chess program needs an extensive eval function to be good?
I've looked at crafty's function while trying to build the eval for my
engine and i have to
admit i was intimidated. Then i looked at Sjeng Free and it was pretty
manageable, only 700 lines.
So do i need to add a lot of fine parameters to my eval function or is it
possible to build
a good engine with a dumb fast eval function that only does a bit more
extensive eval on pawn
structure (because i can do it for free with the pawn hash table)?


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/



  #4   Report Post  
Old March 31st 04, 08:48 AM
Noah Roberts
 
Posts: n/a
Default Eval function

Filipe Maia wrote:
Does a chess program needs an extensive eval function to be good?
I've looked at crafty's function while trying to build the eval for my
engine and i have to
admit i was intimidated. Then i looked at Sjeng Free and it was pretty
manageable, only 700 lines.
So do i need to add a lot of fine parameters to my eval function or is
it possible to build
a good engine with a dumb fast eval function that only does a bit more
extensive eval on pawn
structure (because i can do it for free with the pawn hash table)?



You can evaluate in stages. If evaluation of simple stuff, like
material, causes a cutoff so great that the rest of the evaluation
cannot help the position then you don't do it. This is something I plan
on testing in my own engine, I have not used it to see what kind of
performance it gets.

--
"I'm a war president. I make decisions here in the Oval Office
in foreign policy matters with war on my mind." - Bush

  #5   Report Post  
Old March 31st 04, 10:59 AM
Jonathan Beckett
 
Posts: n/a
Default Eval function

On Wed, 31 Mar 2004 11:15:36 +0400, "Alex" wrote:

While search engines serves to choose the best position at some ply depth
using some logic, evaluation function provides the values for position
choice.


The less options and factors you have, the more search engine in troubles
to choose between two different positions with the same evaluation.


I believe the Deep Blue team used the "Singular Extensions" idea to
solve this - i.e. if there are no clear winning lines, start exploring
deeper into the equality lines.

They also had a panic mode, where if the engine could find no decent
move, it did a wider AND deeper search, which of course eats into the
clock.


Jon Beckett


  #6   Report Post  
Old March 31st 04, 12:44 PM
Mikko Nummelin
 
Posts: n/a
Default Eval function

On Wed, 31 Mar 2004, Jonathan Beckett wrote:

They also had a panic mode, where if the engine could find no decent
move, it did a wider AND deeper search, which of course eats into the
clock.


Deeper searches are anyway done in iterative deepening after a specified
ply depth is done with appropriate extensions (whatever they are). Wider
searches are done if a narrow search fails either low or high (in
iterative deepening's aspiration) or fails just high (in PVS when
considering other moves than the first one on the ordered list,a
fail-high means that we have probably come to a better move than
previous principal variation was). It is _never_ appropriate to pass wider
window than well-known alpha and beta values.

But ... these are search techniques, NOT static evaluation principles!


Mikko Nummelin
  #7   Report Post  
Old March 31st 04, 01:20 PM
Simon Waters
 
Posts: n/a
Default Eval function

Mikko Nummelin wrote:
On Tue, 30 Mar 2004, Filipe Maia wrote:


Does a chess program needs an extensive eval function to be good?



Unfortunately yes.


For some value of "good".

Mikko,

You can play pretty good chess on modern hardware with material,
mobility, and some pawn structure info, which is a lot under 700 lines.

You don't have to write a 700 line function all at once, write the most
critical 70 lines and then grow it as the weaknesses become obvious.

In doing so you might address classic problems in different ways. An
example would be a trapped Bishop ( w P's a2 b2 c2 , 1. .... Bxa2 2.
b3) many programs penalise this in the evaluation function, but you
might think it should be a search extension or something else as
sometimes 2. ... Bb1 or even 2. ...Bxb3 wins.

Most people don't need another chess program that beats them - very few
people have the problem of defeating their chess computer too easily -
but people do want instructive chess programs, variant playing chess
programs, programs they can beat(!) etc etc.

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAard2GFXfHI9FVgYRAh5uAJ9UIrpmlx7i2cqd3tp0ih zC10q0kACeJI5F
15Y8dT7fX8o61GzzY0PAcms=
=XZ4r
-----END PGP SIGNATURE-----

  #8   Report Post  
Old March 31st 04, 01:43 PM
Mikko Nummelin
 
Posts: n/a
Default Eval function

On Wed, 31 Mar 2004, Simon Waters wrote:

Mikko,

You can play pretty good chess on modern hardware with material,
mobility, and some pawn structure info, which is a lot under 700 lines.


Needle ( http://www.math.hut.fi/~mnummeli/needle ) has 995 lines of
evaluation function(s) (see: "evaluate.c"), but it does not play well
enough to keep me satisfied. Although it beats me overwhelmingly in blitz
and in most longer games also, it loses more than half of games to engines
which are rated low and play in Ridderkerk's ( http://wbec-ridderkerk.nl/
) 6th division. I have made extensive tests by setting up tourneys on
Jori Ostrovskij's WBTM ( http://koti.mbnet.fi/~jorio/tourney/ )

The basic idea of Needle's evaluation is as follows:

First, calculate and evaluate material and pick positions of pieces,
then calculate three different values, "endgame value", "midgame value"
and supremum of weighted white's and black's piece value sums
(Q=9p,R=5p,B=N=3p). If that value exceeds MIDGAME_LIMIT (25 pawns), then
we follow only the "midgame value", if it is below ENDGAME_LIMIT (10
pawns), then we follow only the "endgame value". Otherwise we calculate a
weighted average of these values.

Midgame value is sum of "development and mobility", "midgame king safety"
and "midgame pawn structure" values. Endgame value is sum of "endgame king
safety" and "endgame pawn structure" values.

"Development and mobility" calculates bishop mobility on long diagonals,
possible existence of bishop pair, open files for rook and some penalties
for trapped bishops. Uses also some static patterns to give more value for
centralized bishops and knights than those who cling on the edge. "Pawn
structure" looks for double, passed, isolated, etc. special cases in pawn
structure. "King safety" differs radically from midgame to endgame. In
midgame a good king position is solid castling position without enemy
threats or enemy pieces too near, in endgame a good king position is king
in center. See the code for the perhaps-somewhat-buggy details.


Mikko Nummelin
  #9   Report Post  
Old March 31st 04, 06:59 PM
Daniel Lidstrom
 
Posts: n/a
Default Eval function

On Wed, 31 Mar 2004 14:44:42 +0300, Mikko Nummelin wrote:

On Wed, 31 Mar 2004, Jonathan Beckett wrote:

They also had a panic mode, where if the engine could find no decent
move, it did a wider AND deeper search, which of course eats into the
clock.


Deeper searches are anyway done in iterative deepening after a specified
ply depth is done with appropriate extensions (whatever they are). Wider
searches are done if a narrow search fails either low or high (in
iterative deepening's aspiration) or fails just high (in PVS when
considering other moves than the first one on the ordered list,a
fail-high means that we have probably come to a better move than
previous principal variation was). It is _never_ appropriate to pass wider
window than well-known alpha and beta values.


If the score is not well-known, I've found it best to pass infinite window
to PVS for re-search. In that case, one cannot pass -move-score as upper
bound because this score is not well-known (i.e. it may come from a
forward cut). For my Othello program, I have to do this. The extension I
have is called multi-prob cut.

--
Daniel

  #10   Report Post  
Old March 31st 04, 07:04 PM
Daniel Lidstrom
 
Posts: n/a
Default Eval function

On Wed, 31 Mar 2004 15:43:44 +0300, Mikko Nummelin wrote:

On Wed, 31 Mar 2004, Simon Waters wrote:

Mikko,

You can play pretty good chess on modern hardware with material,
mobility, and some pawn structure info, which is a lot under 700 lines.


Needle ( http://www.math.hut.fi/~mnummeli/needle ) has 995 lines of
evaluation function(s) (see: "evaluate.c"), but it does not play well
enough to keep me satisfied. Although it beats me overwhelmingly in
blitz

[...]

My Othello program's evaluation function consists of ca 113878*50 values,
all automatically tuned :-) And there is no human in the world who can
beat the program!
Off-topic I guess... sorry

--
Daniel

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alpha-beta + variable eval functions Arnold Meijster rec.games.chess.computer (Computer Chess) 8 December 18th 03 08:17 PM
Compiling Crafty 19.5 on linux Neko rec.games.chess.computer (Computer Chess) 14 November 30th 03 12:25 AM
bitboards and evaluation function... Tommy rec.games.chess.computer (Computer Chess) 30 November 25th 03 04:31 AM
Crazy idea for neural net eval function Noah Roberts rec.games.chess.computer (Computer Chess) 1 August 6th 03 06:34 PM


All times are GMT +1. The time now is 07:50 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ChessBanter.
The comments are property of their posters.
 

About Us

"It's about Chess"

 

Copyright © 2017