AlvaroBegue wrote:
Which of the standard algorithms do you find useful in a chess engine? I am genuinely interested, not being sarcastic or anything: Tone is hard to get right when writing in a foreign language.
All the sorting ones, like std::nth_element:
let's say you have 4 threads and want to let them analyze the best 4 moves, without sorting all the movelist
All the std::copy, std::fill, std::remove, etc... because if you tell the compiler exactly what you want it will generate faster code
All the find function, std::find, std::lower_bound, adjacent_find, etc.., for example to find a position
The general idea is to know and use all the available algorithm. In the talk he invented the "no raw loops"; it is pretty extreme and mind blowing: every time you start writing a C-style for or while loop you should stop and take your time to think about it, because you are probably doing something wrong.