Author: Heiner Marxen
Date: 10:45:29 05/28/02
Go up one level in this thread
On May 28, 2002 at 11:08:00, Sune Fischer wrote: >On May 28, 2002 at 10:45:10, Daniel Clausen wrote: > >>On May 28, 2002 at 09:30:48, Sune Fischer wrote: >> >>>"careless" :) >> >>Maybe that's not the appropriate word, but my native language is not English, so >>please bear with me. :) > >Woohoo, welcome to the club. > >>>Hmm, I don't know. I need to extend ~100 plies(!!) to get a crash for a total >>>of 200 plies search! Can you come up with any kind of position that would even >>>slightly challenge this limit? >> >>I just "play it safe" in my engine. It's just a simple if-statement which most >>likely costs almost nothing. I don't _have_ to think about what might happen in >>some obscure position. :) I've learned that "I'm sure that this won't happen" >>happens more than people think. > >Well its not something that I make a habbit of :) Habit or Hobbit? :-)) >>>I also have the maximum number of pseudo legal moves set to 255, this must be >>>a potential bug too then? >> >>I think that the max number of legal moves is around 220. It's very well >>possible that the number of pseudo legal moves is above 255. So to answer your >>question: yes =) > >Hmmm 35 pins in one position I dare say must be impossible. Not 35 pins, but 35 pseudo legal moves, which are not legal since pinned. The following position e.g. has 41 illegal but pseudo legal moves: [D]4k3/3r4/6r1/4b2B/Q7/8/8/1K2R3 b - - Obviously, there can be significantly more. >>>Well I'm not going to check before adding a move if there is still room, call >>>me careless if you must ;) >> >>Feel free. :) >> >>Hint: Another possibility would be to check at the end of movegen how many moves >>you added in total. If your movegen gets a 'move_t *' and increments this >>pointer each time you add a move, it's a simple subtraction to find out the >>number of generated moves. (and an if-statement of course for the test :) > >Actually this is exactly how I do it :) >but checking _after_ I add the move is too late, I need to check before adding, >it is the adding that will crash it if array bounds are exceeded. > >>>These are the only known limitations I have, anything else shouldn't crash if >>>the position is technical legal. >> >>[now getting real picky :)] >> >>If the position is technically illegal, your engine shouldn't accept it, >>especially when it 'destroys' your internal data structures. >> >>Rule: When an application crashes because of user input, it's _always_ the >>application's fault - one way or the other. >> >>Sargon (very picky today :) I agree with Daniel (aka Sargon) here 100%. >Yes, I do have some checks on the FEN, but I have not accounted for every >possible broken fen possible. That is not necessary. Just make sure, it cannot crash your program. If e.g. your program does well with 15 white queens, you need not reject that. But if it would crash and burn on that, better provide an error message, telling what's wrong. > It's something I do plan to secure in the future, >but its not very high on my list of priorities to be honest. > >-S. Your priorities are all yours, of course :-) Cheers, Heiner
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.