Author: James Swafford
Date: 11:24:04 12/20/99
Go up one level in this thread
There is no such thing as a position with two legal ep captures. The ep flag is cleared immediately, so your code is crap. Next time, email me. You know the address; we just exchanged emails last week. There's a link on my site. -- James On December 20, 1999 at 12:57:08, Nicolas Carrasco wrote: >Dear Guys, > >While I started studying how to write a Bitboard chess engine I read “Galahad >Chess Engine” move generator from James F. Swafford publicated on: >http://members.xoom.com/jswaff/chessprg/ at Move Generation section. >NOTE: At the end you will have a link to download the move-gen. > >I wrote him several e-mails but never recived a reply. > >To generate the EP captures he does this that I think is wrong because he forget >a position with two possible EP captures. > > if (posptr->epsquare<64) { > to_map=bpmoves[posptr->epsquare]&posptr->whitepawns; > if (to_map) { > from_sq=LSB(to_map); > m->m.b.from=from_sq; > m->m.b.to=posptr->epsquare; > m->m.b.promote=0; > m->m.b.bits=21; > m->score=0; > m++; > } > } > >And nothing else for EP captures. > >I think the correct way is: > > if (posptr->epsquare<64) { > to_map=bpmoves[posptr->epsquare]&posptr->whitepawns; > while (to_map) { > from_sq=LSB(to_map); > to_map^=mask[to_sq]; > m->m.b.from=from_sq; > m->m.b.to=posptr->epsquare; > m->m.b.promote=0; > m->m.b.bits=21; > m->score=0; > m++; > } > } > >Or: > > if (posptr->epsquare<64) { > to_map=bpmoves[posptr->epsquare]&posptr->whitepawns; > if (to_map) { > from_sq=LSB(to_map); > to_map^=mask[to_sq]; > m->m.b.from=from_sq; > m->m.b.to=posptr->epsquare; > m->m.b.promote=0; > m->m.b.bits=21; > m->score=0; > m++; > if (to_map) { > from_sq=LSB(to_map); > m->m.b.from=from_sq; > m->m.b.to=posptr->epsquare; > m->m.b.promote=0; > m->m.b.bits=21; > m->score=0; > m++; > } > } > } > >To James: Can you tell me your usual e-mail address? > >Thanks in advance and good luck.
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.