LMR

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Bas Hamstra

Re: Hi Dann

Post by Bas Hamstra »

Because I want to have a SEE value with one table lookup. Try that with bitboards.

Bas



> Why do you want to abandon bitboards? They are really coming
> into .their own with 64 bit hardware and operating systems. Maybe
> you can just switch from rotated bitboards to magic bitboards or
> something like that.
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Hi Dann

Post by Tord Romstad »

Dann Corbit wrote:Why do you want to abandon bitboards? They are really coming into their own with 64 bit hardware and operating systems.
The problem is that 64-bit hardware is currently not relevant for computer chess, and seems unlikely to ever be relevant. Today, only desktop and full-featured laptop computers use 64-bit CPUs, and these computers are invariably so fast that any half decent chess program will beat virtually all users, regardless of the board representation used by the chess program (seriously, when was the last time you beat Phalanx XXII on a Core 2 Duo?). The only platforms where playing strength still matters are slow handheld computers like netbooks, PDAs and mobile phones, and these are still mostly 32-bit. They'll probably get to 64-bit eventually, but by that time, they will almost certainly be so fast that your program will be strong enough no matter what board representation you use.

I'm a bitboarder myself, but I realize that using bitboards was a design error.
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: LMR

Post by Tord Romstad »

Dann Corbit wrote:All the strongest programs use it, but it is very fiddly to get it right.
That should be most (not all) of the strongest programs, and I don't think it's very fiddly to get it mostly right. Just reducing all non-captures after the first three or four moves at all nodes, and re-searching those moves which returns a score above alpha with full depth, should be enough to give a significant increase in strength for most programs. More complex schemes would perhaps work better, but even this very simplistic implementation should work better than nothing for the majority of programs.
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Hi Dann

Post by Gerd Isenberg »

Tord Romstad wrote: I'm a bitboarder myself, ... <blasphemy deleted>
May be a semi-bitboarder ;-)
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Hi Dann

Post by Dann Corbit »

Bas Hamstra wrote:Because I want to have a SEE value with one table lookup. Try that with bitboards.

Bas



> Why do you want to abandon bitboards? They are really coming
> into .their own with 64 bit hardware and operating systems. Maybe
> you can just switch from rotated bitboards to magic bitboards or
> something like that.
Easy as falling off of a log.

Send me an email and I will tell you how to do it.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Hi Dann

Post by Dann Corbit »

Tord Romstad wrote:
Dann Corbit wrote:Why do you want to abandon bitboards? They are really coming into their own with 64 bit hardware and operating systems.
The problem is that 64-bit hardware is currently not relevant for computer chess, and seems unlikely to ever be relevant. Today, only desktop and full-featured laptop computers use 64-bit CPUs, and these computers are invariably so fast that any half decent chess program will beat virtually all users, regardless of the board representation used by the chess program (seriously, when was the last time you beat Phalanx XXII on a Core 2 Duo?). The only platforms where playing strength still matters are slow handheld computers like netbooks, PDAs and mobile phones, and these are still mostly 32-bit. They'll probably get to 64-bit eventually, but by that time, they will almost certainly be so fast that your program will be strong enough no matter what board representation you use.

I'm a bitboarder myself, but I realize that using bitboards was a design error.
I guess that PDAs and cell phones will be 64 bit very soon.

The programs will never be strong enough.

Right now, with Rybka and 4 CPUs @ 3GHz, using 1 GB RAM, given 10 hours of analysis time I often get unsatisfying answers (that I know are wrong). Sometimes, 50 hours is not sufficient (though less than 1% of the time or so). If I could get these answers in one second, I would come up with much harder questions.
User avatar
Zach Wegner
Posts: 1922
Joined: Thu Mar 09, 2006 12:51 am
Location: Earth

Re: Hi Dann

Post by Zach Wegner »

Bas Hamstra wrote:Because I want to have a SEE value with one table lookup. Try that with bitboards.

Bas
That's just from using an attack table, which doesn't require a mailbox representation. I used to have attack tables in an old bitboard program, and I had a nice SEE lookup table (with indices [6][256][256]). I described it a bit in this very old thread: http://www.open-aurec.com/wbforum/viewt ... f=4&t=1626

I think it's less important these days to do a full SEE, usually a quick approximation is fine (such as a SEE with alpha-beta pruning that only determines whether a capture is losing or not). Using that, SEE becomes a very small portion of runtime. Also, bitboards can do setwise SEE (or at least an approximation of it), which is way cooler than a table lookup :)

Bitboards offer advantages in other places. Though "common knowledge" is that bitboards are more complicated, I find them much easier to deal with than mailbox approaches. For most things you want to do you can just do a few operations on the fly, whereas in mailbox you usually need to keep around other data structures to run at an acceptable speed (e.g. the pawn file stuff in Fruit, which is basically just a convoluted way of having pawn bitboards). Another example is the in_check function, which needs a bunch of trickery to be fast in mailbox (looking at the last move, and checking based on array lookups whether the move could allow the king to be attacked), but is ridiculously simple and straightforward in bitboards.
Uri Blass
Posts: 10282
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Hi Dann

Post by Uri Blass »

Tord Romstad wrote:
Dann Corbit wrote:Why do you want to abandon bitboards? They are really coming into their own with 64 bit hardware and operating systems.
The problem is that 64-bit hardware is currently not relevant for computer chess, and seems unlikely to ever be relevant. Today, only desktop and full-featured laptop computers use 64-bit CPUs, and these computers are invariably so fast that any half decent chess program will beat virtually all users, regardless of the board representation used by the chess program (seriously, when was the last time you beat Phalanx XXII on a Core 2 Duo?). The only platforms where playing strength still matters are slow handheld computers like netbooks, PDAs and mobile phones, and these are still mostly 32-bit. They'll probably get to 64-bit eventually, but by that time, they will almost certainly be so fast that your program will be strong enough no matter what board representation you use.

I'm a bitboarder myself, but I realize that using bitboards was a design error.
1)Computer chess is not about beating humans but about beating other programs so I think that 64 bit hardware is clearly relevant for computer chess.

2)I think that speed of data structure is not very important and I think that the main question is if it is easier to write code for evaluation with bitboards.

Rybka3 32 bits beat every 64 bits program that you can find(of course rybka is using bitboards but I guess that rybka could also get at least the same strength as rybka3 32 bits without bitboards and the question is if you need more code in the evaluation for it).

Uri
plattyaj

Re: Hi Dann

Post by plattyaj »

Tord Romstad wrote:The problem is that 64-bit hardware is currently not relevant for computer chess, and seems unlikely to ever be relevant. Today, only desktop and full-featured laptop computers use 64-bit CPUs, and these computers are invariably so fast that any half decent
Actually I doubt you could easily buy a laptop that didn't have a 64 bit chip in it these days. I just checked Dell's lowest entry laptop right now (Celeron 743) and that's 64 bit.

Not that I disagree that you can't have a 32 bit engine that can whip 99% of players.

Andy.
pijl

Re: LMR

Post by pijl »

Gerd Isenberg wrote:
Bas Hamstra wrote:Hi Gerd, you old friend! I miss the good old dutch CC championship and feel nostalgic about the atmosphere there :-) I remember Tony (after quite a number of beers) fixing bugs in a program of a friend of mine, in the hotelbar, very late at night :-)

Bas
No problem to fulfill your nostalgic desires. Take the 16th off this month and register here! Would be great to meet again.

Gerd
... and pick up on our private little matches during the breaks!
(no LMR in the latest (private) versions of the Baron although I'm contemplating adding at least the option to use it again)
Richard.