0x88 engines

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Robert Pope
Posts: 392
Joined: Sat Mar 25, 2006 7:27 pm

0x88 engines

Post by Robert Pope » Fri May 01, 2009 3:19 am

I've been rewriting my chess program with an 0x88 format. Are there any decent examples of 0x88 engines that have source code public that I can compare with?

User avatar
hgm
Posts: 22274
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: 0x88 engines

Post by hgm » Fri May 01, 2009 5:47 am

In't Fruit 0x88 ? Or is that another mailbox format?

Edmund
Posts: 668
Joined: Mon Dec 03, 2007 2:01 pm
Location: Barcelona, Spain
Contact:

Re: 0x88 engines

Post by Edmund » Fri May 01, 2009 8:26 am

If you are looking for a tutorial engine, you could have a look at the CPW engine: http://chessprogramming.wikispaces.com/CPW-Engine

Indeed Fruit is 0x88 as well.

User avatar
kranium
Posts: 1768
Joined: Thu May 29, 2008 8:43 am

Re: 0x88 engines

Post by kranium » Fri May 01, 2009 10:07 am

Robert Pope wrote:I've been rewriting my chess program with an 0x88 format. Are there any decent examples of 0x88 engines that have source code public that I can compare with?
hi Robert-
as Edmund and HG point out...Fruit is an excellent example, but the board representation is rather uniquely complicated, and personally i find it more difficult to conceptualize...it uses a 16x12 board, combining 10x12 (mailbox) with 16x8 (0x88).

really great example of pure 0x88 -> pre-version 2 Glaurung i.e. 1.21 (before it went bitboard)...

User avatar
Zach Wegner
Posts: 1922
Joined: Wed Mar 08, 2006 11:51 pm
Location: Earth
Contact:

Re: 0x88 engines

Post by Zach Wegner » Fri May 01, 2009 2:25 pm

I was under the impression that Glaurung 1.x was 16x16. I remember Tord described his mailbox approach here before, and I want to say it was the same as he used in Glaurung.

Gerbil is the only other one off the top of my head I can think of that is pure 0x88. It's probably a better idea to look at Fruit though.

User avatar
kranium
Posts: 1768
Joined: Thu May 29, 2008 8:43 am

Re: 0x88 engines

Post by kranium » Fri May 01, 2009 3:28 pm

Zach Wegner wrote:I was under the impression that Glaurung 1.x was 16x16. I remember Tord described his mailbox approach here before, and I want to say it was the same as he used in Glaurung.

Gerbil is the only other one off the top of my head I can think of that is pure 0x88. It's probably a better idea to look at Fruit though.
that may be right, Glaurung seems to use a lot of 128 byte arrays when referencing the board, but there are also some 256...so i'm a little confused now, will have to take a closer look. (i had always assumed it was pure 0x88...)

Norm

User avatar
kranium
Posts: 1768
Joined: Thu May 29, 2008 8:43 am

Re: 0x88 engines

Post by kranium » Fri May 01, 2009 4:19 pm


Dann Corbit
Posts: 8662
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: 0x88 engines

Post by Dann Corbit » Fri May 01, 2009 6:47 pm

Here is a very simple 0x88 chess engine which is good to learn from:
http://cap.connx.com/chess-engines/new- ... ess26a.zip

Dann Corbit
Posts: 8662
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: 0x88 engines

Post by Dann Corbit » Fri May 01, 2009 6:50 pm

Here is a C++ 0x88 move generator derived from vchess:
http://cap.connx.com/chess-engines/new- ... ovegen.zip

I have written permission from Shaun Press to give this away.

diep
Posts: 1780
Joined: Thu Mar 09, 2006 10:54 pm
Location: The Netherlands
Contact:

Re: 0x88 engines

Post by diep » Fri May 01, 2009 9:00 pm

Robert Pope wrote:I've been rewriting my chess program with an 0x88 format. Are there any decent examples of 0x88 engines that have source code public that I can compare with?
Hi,

my move generator is for free.
drop me an email or your email adress and i'll email it.
i had put it in GPL.

At todays hardware, the fastest possible engine you can write however better in a combination of a 16x16 board (like fruit) with the pregenerated tables in the manner how i've got them, so all you need to do is rewrite the initialisation of the tables that's all.

16x16 allows storage in 1 byte, meanwhile check detection and generation goes at light speed at the Fruit datastructure in itself if you create a few tables which are real tiny.

So everything garantueed keeps totally within L1 cache.

Originaly 0x88 wasn't 16x16 board but more like 10x12 board or something.

However the huge advantage of a 16x16 board is that you can way more effective generate checks with just a few + and - signs in a simple tiny lookup array. That works in even the tiniest L1 caches of today.

You won't ever touch the L2 other than for transpositiontable in that manner, which is a serious advantage.

Such a datastructure easily gives you 5 million nps at todays hardware single core.

Datastructure i've got i got, but that's diep datastructure compatible (as i called search from within diep to estimate tactics near the tips), about 2.5 million nps at a k7 2.1Ghz. As i do not own core2 i never could benchmark it there. I'd expect it to be a lot faster there, as it has very few difficult to predict branches.

Post Reply