Will your search or evaluation depend on the number of legal moves?
Otherwise postponing legality checks until you actually consider performing the move, seems like a win.
Legal or Pseudo-Legal Move generation
Moderators: hgm, Rebel, chrisw
-
- Posts: 243
- Joined: Sat Mar 11, 2006 8:31 am
- Location: Malmö, Sweden
- Full name: Bo Persson
-
- Posts: 2250
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: Legal or Pseudo-Legal Move generation
The lazy paradigm to do stuff as late as possible, which might be never due to cut-off or standing pat in QS, might be relativated by doing stuff in parallel with higher ipc or while waiting for some memory reads...
Some other aspects pro legal movegen - one is aware of stalemate and mate in advance and may use "tactical" information from legal movegen elsewhere i.e. pins in eval or mate at a glance.
Some other aspects pro legal movegen - one is aware of stalemate and mate in advance and may use "tactical" information from legal movegen elsewhere i.e. pins in eval or mate at a glance.
-
- Posts: 27809
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Legal or Pseudo-Legal Move generation
You assume here that legal move generation is done by first doing pseudo-legal move generation, followed by checking the move for legality. This need not be true.Bo Persson wrote:Otherwise postponing legality checks until you actually consider performing the move, seems like a win.
For instance, when I have identified a pinned piece, I don't even generate moves for it that leave the pin line. So there is nothing to check, and time is saved on generating the 'pseudo-legal' moves along the pin ray. (Which, in fact, are guaranteed to be legal, and thus need not be checked either.
-
- Posts: 64
- Joined: Thu Feb 19, 2009 5:34 pm
- Location: Mexico, Mexico
Re: Legal or Pseudo-Legal Move generation
My vote is for pseudolegal movement generation, is the trick to make Toledo Nanochess very small.
By the way, my vote was rejected with a message of 'you're not eligible for this poll'. What this means? I'm too young?, I'm too tall?, Too few posts?
By the way, my vote was rejected with a message of 'you're not eligible for this poll'. What this means? I'm too young?, I'm too tall?, Too few posts?
All good things are difficult to achieve.
Toledo Nanochess book http://www.amazon.com/Toledo-Nanochess- ... 1304864375
Toledo Nanochess book http://www.amazon.com/Toledo-Nanochess- ... 1304864375
-
- Posts: 931
- Joined: Tue Mar 09, 2010 3:46 pm
- Location: New York
- Full name: Álvaro Begué (RuyDos)
Re: Legal or Pseudo-Legal Move generation
I've only ever used pseudo-legal move generation, but this idea of not trying to move pinned pieces out of their line seems very attractive.
Too handsome. It has to be that. I got the same message.nanochess wrote:By the way, my vote was rejected with a message of 'you're not eligible for this poll'. What this means? I'm too young?, I'm too tall?, Too few posts?
-
- Posts: 588
- Joined: Thu Mar 09, 2006 4:47 pm
- Location: Singapore
Re: Legal or Pseudo-Legal Move generation
The only reason most don't do full legal moves generation is all about the cost of knowing the sliding pins; if I am not wrong, there is no cheap workaround, whatever the board representation.AlvaroBegue wrote:I've only ever used pseudo-legal move generation, but this idea of not trying to move pinned pieces out of their line seems very attractive.
...
Bob Hyatt's earliest argument was for getting exposed illegality at the gen_of_capture at the next node for XxK. This is what I am doing.
Rasjid