Hacker News new | ask | show | jobs
by dfan 4399 days ago
You should indeed study Stockfish's source, not because it is the strongest computer chess engine, but because it is exceedingly well-written. Most engines that are public are a big hacky mess, but the Stockfish maintainers have made cleanliness a really high priority (sometimes proposed changes that increase the engine's strength are rejected because they're too much code), and it has clearly paid off.
2 comments

Rejecting an improvement because it's just "too much code" is... brilliant, disciplined, and extremely difficult to do. Such a high percentage of software development is maintenance, and it's easy to underestimate that long-term maintenance cost.
>sometimes proposed changes that increase the engine's strength are rejected because they're too much code

that seems insane.

I know, doesn't it? But sometimes someone finds a way to simplify the patch so it's less code and almost as effective, and sometimes future improvements are made easier because the existing code is easier to work with. And it's hard to argue with the results.
Insane in the short term. But in the long term, if they make the program less maintainable, they may prevent future improvements.