Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: On Beowulf - long post (more info) (even more info)

Author: Vincent Diepeveen

Date: 06:24:29 06/06/01

Go up one level in this thread


On June 05, 2001 at 22:59:20, Robert Hyatt wrote:

>On June 05, 2001 at 22:56:04, Robert Hyatt wrote:
>
>>On June 05, 2001 at 19:58:38, Vincent Diepeveen wrote:
>>
>>>On June 05, 2001 at 14:04:42, Robert Hyatt wrote:
>>>
>>>>On June 05, 2001 at 11:29:41, Vincent Diepeveen wrote:
>>>>
>>>>>On June 05, 2001 at 11:14:29, Robert Hyatt wrote:
>>>>>
>>>>>>>
>>>>>>>Now see what i get in beowulf. Instead of that in 2001 dudes program
>>>>>>>better they program things out FOR EVERY PIECE.
>>>>>>>
>>>>>>>Even blackpawns and whitepawns are written out.
>>>>>>>
>>>>>>>Man such a student i would directly ship back.
>>>>>>>
>>>>>>>   "Please make the code more general student, if you multiply a 2048 x 2048
>>>>>>>    array you don't write out every multiplication either!".
>>>>>>>
>>>>>>>See here below the horror which i found in moves.c from beowulf project.
>>>>>>>
>>>>>>>How do you plan to let people learn from this code?
>>>>>>>
>>>>>>>They must learn to "write everything out"??
>>>>>>>
>>>>>>>Please use a few for loops, even in bitboards you can do that,
>>>>>>>or have you forgotten how loops work?
>>>>>>
>>>>>>Depends on the purpose.  "unrolling" is a well-known way to speed up code.
>>>>>>Compact does not always equal fast.  Unrolling also eliminates some tests and
>>>>>>branches, which is also good.
>>>>>
>>>>>I know, where did you hear me talk about getting it faster this generator?
>>>>>
>>>>>Dann Corbitt said this project was setup to let people learn how to write
>>>>>their own chessprogram and to show how algorithms and implementing
>>>>>a chessprogram in a nice manner works.
>>>>>
>>>>>So my comment on this piece of code is that it's not written in a way
>>>>>where students learn from.
>>>>>
>>>>>They learn directly how to hack from this: "write everything out".
>>>>>
>>>>>In this piece of crap code i see everywhere:
>>>>>
>>>>>    if (side == WHITE)
>>>>>        tsq = B->WhiteKnights;
>>>>>    else
>>>>>        tsq = B->BlackKnights;
>>>>>
>>>>>Note you can eliminate these branches, which speeds code up bigtime.
>>>>
>>>>A decent compiler won't use a branch there _anyway_.  It will use a
>>>>conditional move.
>>>
>>>I'm no compiler expert, but it might not generate it,
>>>because it might not know that it's legal to access
>>>B->WhiteKnights as B could be NULL. That of course it could
>>>already deduce that B isn't NULL because it gets referenced anyway
>>>is a step which would surprise me if compilers take it :)
>>>
>>>Lucky we have some compiler experts here.
>>>
>>>Now when do i get a visual c++ compiler which can generate PIII code,
>>>mine only generates stupid 486 code which btw isn't having any
>>>CMOV instructions :)
>>>
>>>However those compilers that do generate a CMOV here still are
>>>slower as that 486 compiler. Don't ask me why. Just measure the
>>>speed diff :)
>>>
>>>>
>>>>>
>>>>>In a test to generate for white a few million of times a list of moves
>>>>>the branches will be correctly predicted, but normally spoken you get
>>>>>a big misprediction there as then you generate for white and next
>>>>>move for black, that hurts :)
>>>
>>>>Just don't do a branch.  :)
>>>
>>>>
>>>>>
>>>>>Apart from that it's very ugly to see code like that,
>>>>>i prefer more compact code to teach students and those who
>>>>>want to start their own program!
>>>>
>>>>What they see is what they will do.  I think it better to show how it
>>>>_should_ be done, as opposed to teaching bad habits by showing how it
>>>>could be done more concisely.
>>>
>>>I'm not here to reveal code of mine. All programs here get 2 times
>>>faster suddenly :)
>
>
>
>
>I should also have added:  If _everybody_ on here was that selfish and
>disinterested in helping others, do you think you would have been running on
>a quad xeon 700 for your last tournament?  Think about it.  This is a two-way
>street.  If you want help, you should be willing to offer help as well...

I think i have posted more ideas and thoughts as any commercial programmer
here. Also indicating where things are wrong is important, as chess is a
worst case game.

I do not have much secrets in my search. I hardly keep results for myself.

If i think an algorithm works for me, i post it. If i think it doesn't,
i post it too.

This in complete contradiction with commercial programmers who checkout
everything here but post nothing. Say nothing. Do as if they're dumb.

Even spreading misinformation sometimes in tournaments, though sometimes
not meant as such.

For example in I-CSVN i won't quote the names of the persons.
Some commercial programmer J de K shouts after some talks: "the only interesting
thing
is the number of nodes you see, not how much you prune, how you
search or whatever algorithm or extension you use".
He meant it as a joke i guess. Some amateurs
in that room remembered it though. Later one
of them talks to me about it.

Now i directly pointed him to the fact that this wasn't serious meant,
but it was TAKEN serious by this kid.

He's posting daily here.

He's able to litterary quote J de K on this and do as if it's the
truth.

So the only thing which isn't said isn't even meant serious. How many
postings do you see here from J de K about how he has done his cool
extensions, about how he is doing his mobility, what king safety terms
he considers important?

ZERO.

On the other hand i shout something about that i win every 10th game
(this was in 1998 or something) game at the auto232 player because of
pawn majority with DIEP.

2 years later everyone mentions 'pawnmajority' as one of the features
of his evaluation.

So i am very happy with the system time i get from you on your quad,
let's be clear here!

But some publish more as others. You happen to be one of the persons
who publishes *everything*. Now that's good. But it won't bring you money.

It will bring you fame & glory though.

The number of programs using bitboards since crafty was started is
amazing. Before that i can't remember how many.

So it's hard to deny people FOLLOW your thoughts and improvements
step by step.

Best regards,
Vincent





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.