Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Problem searching too deep!

Author: Sune Fischer

Date: 08:08:00 05/28/02

Go up one level in this thread


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 :)

>
>>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.

>>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 :)

Yes, I do have some checks on the FEN, but I have not accounted for every
possible broken fen possible. 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.



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.