Als Antwort auf:/In reply to: Re: Gothmog 0.4.8 en-passant bug geschrieben von:/posted by: Sune Fischer at 08 June 2004 01:20:48:
Then allocate 12000 plies (or surrender like your program does). But to simply crash because of bounds over-write is not an acceptable solution because it is not guaranteed to happen. Allowing writes past the end of an array is undefined behavior that is often exploited.No you can't expect that of a GUI, but you don't need it either.Hi DannThe maximum possible chess game is about 6000 moves.HiDanChess has a serious crashing problem. Among other crashes, I also noticed a crash at the 231st move. I hope it can be fixed soon.
Maximum set of moves allowed in DanChess was 460 half moves[230 full moves].
I increased that to 330 full moves now. I will send you a bug fixed version tommorrow.
I have computer games with more than 500 full moves in them.
I have made it 1000 half moves now.
In my opinion , the GUI has to stop a drawish game after some time.
best
daniel
Frenzee has a max game length of 1000 plies minus max search depth of 64,
if the game reaches 935 plies it must stop or it will crash, so it resigns.
It has never happened yet AFAIK so it's not costing any points, but it does
prevent even a theoretical crash.
I think it by far the easiest solution, the alternative is to fiddle with remallocs and stuff, it's bound to get ugly.
If you hardcode an array length that can be overwritten, then your program is a virus engine. It is no different than a program that does gets(string) because the program can be used to take over a machine and do vicious things. It is criminal negligence, as far as I am concerned.
my ftp site {remove http:// unless you like error messages}