Search found 242 matches

by Fulvio
Sat Dec 19, 2020 4:14 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Position Causes Stockfish and Komodo To Crash
Replies: 135
Views: 23146

Re: Position Causes Stockfish and Komodo To Crash

It also depends on the language you can/want use. c++ isn't so good for internet development, but I can point you to the SCID's code: https://github.com/benini/scid/blob/github/src/position.cpp#L2665 https://github.com/benini/scid/blob/github/gtest/test_position.cpp#L270 That doesn't test semantics...
by Fulvio
Sat Dec 19, 2020 2:53 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Position Causes Stockfish and Komodo To Crash
Replies: 135
Views: 23146

Re: Position Causes Stockfish and Komodo To Crash

You have not answered my question. I repeat. Do you think it would be ok for ld to crash when encountering an unknown file format? A simple yes or no is sufficient. Your question has been answered many times: Stockfish requires valid input, otherwise it's behavior is undefined. I can post another l...
by Fulvio
Sat Dec 19, 2020 2:36 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Position Causes Stockfish and Komodo To Crash
Replies: 135
Views: 23146

Re: Position Causes Stockfish and Komodo To Crash

It also appears to be rudimentary, e.g. doesn't test if both sides are in check: https://github.com/ornicar/scalachess/blob/master/src/main/scala/variant/Variant.scala#L172 It also depends on the language you can/want use. c++ isn't so good for internet development, but I can point you to the SCID'...
by Fulvio
Sat Dec 19, 2020 1:34 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Position Causes Stockfish and Komodo To Crash
Replies: 135
Views: 23146

Re: Position Causes Stockfish and Komodo To Crash

Good engineering is not about right and wrong, good or evil; it is about building things that works as expected. Exactly. And regardless of what you say, people do not expect software to crash on invalid input, except in some very specific circumstances. People? The product should meet the specific...
by Fulvio
Sat Dec 19, 2020 10:28 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Position Causes Stockfish and Komodo To Crash
Replies: 135
Views: 23146

Re: Position Causes Stockfish and Komodo To Crash

So, if you abandon your crusade about the only proper and right way, There is a right way and a wrong way here - which is why input validation has been standard practice in software engineering for decades. Except apparently some chess engine programmers, people have gotten that message. Nope, engi...
by Fulvio
Sat Dec 19, 2020 10:08 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Position Causes Stockfish and Komodo To Crash
Replies: 135
Views: 23146

Re: Position Causes Stockfish and Komodo To Crash

a related question: My chess site allows users to probe a running Stockfish' hash for fairly arbitrary positions. I would like to verify the FENs in the frontend, to make sure Stockfish does not crash on them. How should I go about this? Do what the other chess sites did: https://lichess.org/forum/...
by Fulvio
Wed Dec 16, 2020 5:21 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Position Causes Stockfish and Komodo To Crash
Replies: 135
Views: 23146

Re: Position Causes Stockfish and Komodo To Crash

Stockfish choose to be low level and crash on invalid inputs? That's ok It's not OK for low level code to be shoddy. That's not how you get robust systems. Even inside a car, each controller has to deal with possibly invalid inputs from other controllers because you don't want e.g. a glitchy tyre s...
by Fulvio
Wed Dec 16, 2020 12:54 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Position Causes Stockfish and Komodo To Crash
Replies: 135
Views: 23146

Re: Position Causes Stockfish and Komodo To Crash

There are various levels for interfaces, it is not a particularly complicated concept, I am amazed that so many who have written in this thread cannot understand it. High level, for example a car dashboard. It is not acceptable to press wrong commands and have the engine explode. Low level, I open t...
by Fulvio
Fri Nov 20, 2020 6:42 pm
Forum: Computer Chess Club: General Topics
Topic: Dragon versus Nakamura
Replies: 91
Views: 21605

Re: Dragon versus Nakamura

It was an interesting and fun show: thanks for the new engine and to Naka.
The last game he really tried to play its best, with very few chatting. It was amazing how the engine gained so much space (poor Naka's bishop on h8!) and even before the blunder the position seemed so difficult for an human!
by Fulvio
Mon Nov 09, 2020 12:00 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Best way to store games
Replies: 26
Views: 6149

Re: Best way to store games

pieceNr = pieces[moveCode]; step = steps[moveCode]; fromSqr = location[pieceNr]; toSqr = fromSqr + step & 0x77; board[toSqr] = board[fromSqr]; board[fromSqr] = 0; location[pieceNr] = toSqr; This is similar to how the moves are stored in SCID: https://github.com/benini/scid/blob/github/src/bytebuf.h...