The CPW needs YOU!

Discussion of chess software programming and technical issues.

Moderator: Ras

Tony Thomas

Re: The CPW needs YOU!

Post by Tony Thomas »

Harald wrote:Sherwin Bitboards are included now.
http://chessprogramming.wikispaces.com/ ... +Bitboards

There may be minor flaws in the wiki page layout. Perhaps one of the wiki
experts can correct this. I am new to wiki writing.

Is the name Sherwin Bitboards ok or is there a better name?

Harald
Yes, call it goatlover bitboard. :lol:
Gerd Isenberg
Posts: 2251
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: The CPW needs YOU!

Post by Gerd Isenberg »

Gerd Isenberg wrote: I strongly support your appeal!

But working on the wiki should not imply to make this place or other chess-programming fora redundant ;-)
Concerning the winboard forum, which is already locked.
I feared that, because the wiki somehow fills the niche the winboard forum had quite exclusively, at least concerning the programming forum - to have a long time archive and to re-edit posts. At least since CCC has become a php-forum and wraps through, making posts lost forever.

I am sorry, Volker felt offended by advertising for the wiki. And I think an attendant forum is still useful and the wiki is no replacement for a forum like this (the winboard programming forum) - but a better medium to archive and interlink interesting stuff.

For the sake of knowledge, I would appreciate a university or the ICGA to host all that stuff - rather than a private person or a commercial organization.

Gerd
Pradu
Posts: 287
Joined: Sat Mar 11, 2006 3:19 am
Location: Atlanta, GA

Re: The CPW needs YOU!

Post by Pradu »

Gerd Isenberg wrote:
Gerd Isenberg wrote: I strongly support your appeal!

But working on the wiki should not imply to make this place or other chess-programming fora redundant ;-)
Concerning the winboard forum, which is already locked.
I feared that, because the wiki somehow fills the niche the winboard forum had quite exclusively, at least concerning the programming forum - to have a long time archive and to re-edit posts. At least since CCC has become a php-forum and wraps through, making posts lost forever.

I am sorry, Volker felt offended by advertising for the wiki. And I think an attendant forum is still useful and the wiki is no replacement for a forum like this (the winboard programming forum) - but a better medium to archive and interlink interesting stuff.

For the sake of knowledge, I would appreciate a university or the ICGA to host all that stuff - rather than a private person or a commercial organization.

Gerd
How about we make our own nonprofit-organization dedicated to this? I'm willing to pay completely for the hosting for the initial startup if necessary (~$100/year for hosting and domain can host the WB forum and the Wiki). Splitting it up would be a easier though. 8-) In addition, we'd have direct control over the content. Direct access to backups of all the content is a necessity. I believe it is possible to do this for the CPW as of right now but AFAIK it isn't possible for forums.

University hosting it is a good option. However, I don't know how we'd request a University to host or if any University would be willing to host.
Ron Murawski
Posts: 397
Joined: Sun Oct 29, 2006 4:38 am
Location: Schenectady, NY

Re: The CPW needs YOU!

Post by Ron Murawski »

Pradu wrote:
Gerd Isenberg wrote:
Gerd Isenberg wrote: I strongly support your appeal!

But working on the wiki should not imply to make this place or other chess-programming fora redundant ;-)
Concerning the winboard forum, which is already locked.
I feared that, because the wiki somehow fills the niche the winboard forum had quite exclusively, at least concerning the programming forum - to have a long time archive and to re-edit posts. At least since CCC has become a php-forum and wraps through, making posts lost forever.

I am sorry, Volker felt offended by advertising for the wiki. And I think an attendant forum is still useful and the wiki is no replacement for a forum like this (the winboard programming forum) - but a better medium to archive and interlink interesting stuff.

For the sake of knowledge, I would appreciate a university or the ICGA to host all that stuff - rather than a private person or a commercial organization.

Gerd
How about we make our own nonprofit-organization dedicated to this? I'm willing to pay completely for the hosting for the initial startup if necessary (~$100/year for hosting and domain can host the WB forum and the Wiki). Splitting it up would be a easier though. 8-) In addition, we'd have direct control over the content. Direct access to backups of all the content is a necessity. I believe it is possible to do this for the CPW as of right now but AFAIK it isn't possible for forums.

University hosting it is a good option. However, I don't know how we'd request a University to host or if any University would be willing to host.
I'm with Pradu. I would gladly join a non-profit chess programming group.

Ron
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: The CPW needs YOU!

Post by Michael Sherwin »

Harald wrote:Sherwin Bitboards are included now.
http://chessprogramming.wikispaces.com/ ... +Bitboards

There may be minor flaws in the wiki page layout. Perhaps one of the wiki
experts can correct this. I am new to wiki writing.

Is the name Sherwin Bitboards ok or is there a better name?

Harald
JUST SAW THIS:

Hi Harald,

Thank you for creating a page for the wiki about my bitboard attempt. I did not think that any interest for them extended past the very gracious and fair test that you gave them. I am very happy! :D

I have been improving (i hope) the idea and I want to share my progress.

With what seems very little work (inside the functions) I have gotten both the bishop and rook(!) down to 3 lookups instead of 6 and 8 respectively.

I found a very natural way to split the 64 bit occupancy into 32 bit halves that works equally well for 32 bit and 64 bit machines. On 32 bit machines the only 64 bit operation is the final return!

Code: Select all

// shift the upper 32 bits up by one rank and combine with lower 32 bits shift
// all down by 9. Now there are three rows of bits.
// preform an 'or' of three lookups to map the bits to an index.
// the first lookup also holds the base index for the square.

u64 BishopAttacks32(s32 sq, u32 *occ) {
  u32 o = ((occ[0] & loBishopBits[sq]) | ((occ[1] & hiBishopBits[sq])<<8)) >> 9; 
  u32 i = bRow[sq][0][o&0x3f] | bRow[sq][1][(o>>8)&0x3f] | bRow[sq][2][o>>16];
  return bishopAttacks[i];
}

// shift the upper 32 bits up by one rank and combine with lower 32 bits shift
// all down by 9. Now there are three rows of bits.
// the three lookups contain 64 bit super sets 'allowed' by the row bits. It is
// the attack set as if the other indexs were zero.
// when the super sets are anded together that which remains is the correct set.

u64 BishopAttacks64(s32 sq, u32 *occ) {
  u32 o = (occ[0] & loBishopBits[sq]) | ((occ[1] & hiBishopBits[sq]) << 8) >> 9; 
  return bRow[sq][0][o&0x3f] & bRow[sq][1][(o>>8)&0x3f] & bRow[sq][2][o>>16];
}

// into a 32 bit quantity put the vertical lo bits to the second file with the
// vertical hi bits 'ored' to the first file
// ........
// hl......
// hl......
// hl......
// use the rank bits as an index to a fill table to fill in the rank bits
// ........
// hlrr....
// hlrr....
// hlrr....
// then use the indexs just as the bishop above.

u32 RookAttacks32(s32 sq, u32 *occ) {
  u32 o = ((occ[0] & loRookBits[sq]) >> (Row(sq) + 7)) 
        | ((occ[1] & hiRookBits[sq]) >> (Row(sq)))
        | rankFill[sq][(occ[sq&32] >> rankShift[sq]) & 0x3f];
  u32 i = rRow[sq][0][o&0x3f] | rRow[sq][1][(o>>8)&0x3f] | rRow[sq][2][o>>16];
  return rookAttacks[i];
}

u32 RookAttacks64(s32 sq, u32 *occ) {
  u32 o = ((occ[0] & loRookBits[sq]) >> (Row(sq) + 7)) 
        | ((occ[1] & hiRookBits[sq]) >> (Row(sq)))
        | rankFill[sq][(occ[sq&32] >> rankShift[sq]) & 0x3f]; 
  return rRow[sq][0][o&0x3f] & rRow[sq][1][(o>>8)&0x3f] & rRow[sq][2][o>>16];
}
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: The CPW needs YOU!

Post by Michael Sherwin »

In the above rook functions substitute Col for Row, I think. :lol:

Well anyway it should be the file number 0-7! 8-)
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through