Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Questions to Paul Hunter about the assembly

Author: Lance Perkins

Date: 13:37:13 08/23/04

Go up one level in this thread


On August 23, 2004 at 14:56:56, Gerd Isenberg wrote:

>
>No. Some posted C-Code snippets may produce same assembly.

Huh? The entire computer science community is laughing here. Prove then that you
can write a different C code that will produce this same assembly. Then tell
that to Bob since he teaches these things in school.

I've written compiler backends, btw. Its an exact science.

>
>Ok, that looks odd.
>
>OTOH it sounds logical to me that EvaluateMate returns VALUE_MATE but for some
>reason this executable was compiled with other #define switches for instance.
>Wasn't such tautological conditions a former trick to align code and to have
>influence on branch predictions inside this code cache line?

Are you just throwing out random words here? You add a check to align code?
Also, there is nothing to predict here as far as branching is concerned. There
should be no branching at all. The correct C code should be:
int ms=EvaluateMate(tree);
// if (ms == 99999) break; /* removed */
score+=ms;

>
>Such statements might be possible in a lot of other chess programs.
>What secret algorithm is inside the if-body?
>
>if ((TotalBlackPieces==0) && (TotalWhitePieces==6) &&
>      (!WhitePawns) && (!BlackPawns) && WhiteBishops && WhiteKnights) {
>

I've only commented on a portion of the code. Can't you figure out the rest by
yourself?



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.