It's going to be a more technical post, which will require a higher level of algorithmic thinking to understand.
Algorithms in a human mind, just like computer algorithms, aren't always in their purest basic form. I usually describe mind programs in their basic version. But just because I give their simplest possible form, it doesn't mean that people are always executing them exactly the way I describe it.
Sometimes it can be difficult to see that some behavior is based on a particular program. Sometimes it's not easy to realize that it all boils down to one algorithm when this algorithm is just a foundation for a much bigger structure and it is not in its basic version.
To show you what I mean, let's take for example Minimax algorithm:
https://en.wikipedia.org/wiki/Minimax
It's an algorithm used for example in chess-playing programs. Its function is to search through the tree of all possible moves on the board, to find the best one. As you can see, the pseudocode for this algorithm has just 13 lines.
But in real chess programs, this algorithm is never used in its simplest form. First of all, there's always added Alpha-beta pruning in all modern chess engines (programs playing chess):
https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning
There are also Transposition tables always added to all Minimax based engines. Minimax itself can be implemented in a different way – as Negamax:
https://en.wikipedia.org/wiki/Negamax
As you can see, Negamax with Alpha-beta pruning and Transposition tables is already starting to look very different from the original Minimax pseudocode. Can you see the Minimax algorithm in this last pseudocode?
And it's just simple pseudocode. Now try to find it in a real engine, for example in Stockfish. It is probably somewhere in this file:
https://github.com/official-stockfish/Stockfish/blob/master/src/search.cpp
I haven't really tried, so I don't know if I could precisely pinpoint Minimax in Stockfish. But I can assure you that it is there because Stockfish is a Minimax based program. Minimax is the key algorithm for Stockfish and all other algorithms arise from it. Although Minimax is not in its basic version, it is still present as a fundamental algorithm for Stockfish.
It's the same with mind programs. Sometimes they are not in their basic version, but they are still present as fundamental algorithms for human behavior.
No comments:
Post a Comment