Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How do you represent chess boards in your chess programms

Author: Robert Hyatt

Date: 07:19:21 09/26/99

Go up one level in this thread


On September 26, 1999 at 03:11:21, Christophe Theron wrote:

>On September 25, 1999 at 23:20:02, Robert Hyatt wrote:
>
>>>There are hundreds of millions of 16 and 32 bits PCs in the world today. How
>>>many 64 bits PCs? NONE, ZERO, NIL, NADA.
>>>
>>
>>
>>this is wrong.  Ask bruce as he owns a PC with a 533 mhz alpha in it, made
>>by Polywell.  There are several such machines.  PC magazine has even covered
>>them in detail.
>
>
>OK, sorry. You are right, let's be accurate. From a mathematical point of view
>the 64 bits PCs represent a percentage strictly greater than 0. Say 0.1%, OK?
>
>
>
>>>It will take several years (maybe 10) before the number of 64 bits PCs becomes
>>>larger than the number of 16 and 32 bits ones.
>>>
>>
>>folks were saying that about the 386 not replacing the 286 for most businesses
>>too.  Care to guess how many 286's are left?  :)
>
>I'm not saying they will not replace older computers. I'm just saying it will
>take time.
>
>And that non bitboard program will also benefit from more powerful computers.
>
>
>
>>>You live in a country where only a fraction of your monthly salary is enough to
>>>buy a new powerful personal computer.
>>>
>>>Of course you know it's not the case everywhere in the world.
>>>
>>>So maybe you can easily erase 16 and 32 bits computers from your memory as soon
>>>as Intel produces a 64 bits processor, but there are many people in the world
>>>who will stick to 16 and 32 bits for 10 years or more.
>>
>>
>>
>>that is crazy.  How many people do you know with 286 computers?  they are
>>10 years old. How many do you know with 486 computers? They are 5 years old.
>>How many do you know with p5 pentium machines?  they are 4 years old.  How
>>about pentium pros?  3 years.  Pentium II?  1.5, pentium III?  < 1 year.
>
>A friend of mine stopped using his 286 2 years ago. Another one had upgraded
>from 286 to 486 the year before.
>
>Here the majority of computers are 486.
>
>
>
>>People replace technology _all_ the time.  I don't know of _anybody_ that
>>doesn't have at least a pentium CPU.    Which means _no_ machines I know of are
>>over 3 years old.  These are home computers.  Office computers.  Business
>>computers.  Game computers. Etc.
>
>
>Looks like we are not living in the same world...
>
>
>
>>Sticking to 16 bits won't be possible if the new software releases don't support
>>it.  Care to boot up windows 2000 on a 286?  That's only a 10 year old processor
>>so it ought to work right?
>
>
>My 386sx20 (1990) notebook boots Windows 95.
>
>I know next versions of Windows won't run anymore on it (I did not even try
>W98).
>
>Guess why?
>
>The industry needs a strong reason to push people to buy new computers.
>
>
>
>>>Funny you mention this. I was recently thinking that I could produce a 16 bits
>>>version of Chess Tiger.
>>>
>>>In 1997 I rewrote everything to port from 16 to 32 bits. In fact, the rewrite
>>>was essentially optmizing my algorithms for efficiency. I have used my older 16
>>>bits version as a laboratory. I was very flexible, so I could try many different
>>>things, but because of this was not optimized.
>>>
>>>So I rewrote everything with the algorithm I was targetting for in mind.
>>>Additionnaly, I thought I would take advantage of 32 bits processing where it
>>>would make sense.
>>>
>>>Recently I realized that I needed 32 bits integer very unfrequently. In fact I
>>>could use 16 bits integer in 99% of my program. The 32 bits integer processing
>>>is needed only for hash keys calculations and hash table access, and a 16 bits
>>>processor can emulate them with only a very small speed penalty.
>>>
>>
>>
>>From a performance perspective, you are thinking wrongly.  You don't want
>>to think "How can I reduce my data sizes so that 16 bits works?"  You do
>>want to ask "How can I increase my data sizes to 64 bits so that I can use
>>the increased data density in a 64 bit cpu?"
>
>
>I understand, and I suppose bitboards fit very well this goal. It's just that I
>don't think this power is needed. What we need is mainly more speed, and better
>parallelism. I guess you are going to say that processing the 64 squares in one
>operation is a kind of parallelism... :)
>

Actually, yes. I've used the term "bit parallelism" for several years, and it
pretty accurately describes what is going on.. ie "is this pawn passed?" is a
complex question involving many squares, but it gets answered in one AND
operation.  Can the king stop this passer from queening? also gets answered with
one AND.  It requires a lot of 'unlearning' and then 're-thinking' to get into
this however. As sometimes the solutions to specific problems are non-intuitive
until you get into the mode of "think bitmaps" after a while.  IE this new
candidate passed pawn code was amazingly simple...



>
>
>>As a challenge, I'll get you time on a Cray.  Let's see how well you run on
>>that machine compared to a program that is optimized for it.  My eyes were
>>opened years ago to this problem...
>
>
>I take the offer. How can I compile my program for the Cray?
>


you use the same sort of compiler (command line) that you would on any unix
platform.  Here's the expected result:  Cray Blitz runs at about 220K nodes
per second on a single Cray T932 CPU.  I compiled gnuchess on that machine to
see how it would do.  It was unable to reach 30K nodes per second.  Because it
doesn't have any 'vectorizable' code to speak of.  That is almost a factor of
10x slower than Cray Blitz.  And Gnu is known to be very fast...

there is a factor of 5x waiting for anyone willing to invest in "learn the
architecture and learn it well" for almost any architecture around.  Of course
Intel is not the same as it is a very primitive architecture to start with.  8
registers is not exactly overwhelming when you run on any other machine (A
sparc has 32 registers using a sliding window so that you don't have to
physically save/restore registers across procedure calls...  The cray has 8
registers that hold 128 words each, enough to hold the entire chess board in
one register, even if you use 0x88.  But that doesn't happen for programs that
treat the chess board like N integer variables...

>
>
>    Christophe



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.