Monte-Carlo graph search from first principles
github.com
github.com
What might be a step forward is a joint learning of the state representation with the search algorithm. Search algorithm explores the NN representation of the state for which you can get the cost.
https://sites.google.com/view/genie-2024/
Genie from DeepMind is a good demonstration where discrete state is being modeled. NN learns a very complex representation with collision detection and actions. Instead of decoding that state into pixels, search could probably be done directly on that state.
Of course, this architecture could be very different.
1. Given a collection of logical arguments, figure out how to assign a hash to each argument.
2. Build a Merkle tree representing the argument's hashes, nesting according to first principles.
3. If an argument is challenged successfully, the argument's hash changes, rendering descendent argument hashes invalid.
His posts on https://www.reddit.com/r/cbaduk/ are consistently excellent.
MCTS as commonly implemented is deterministic? How strange! I assumed there was randomness in the sampling.
So the monte-carlo turned out to be an unessential (and suboptimal) part of what is now still called MCTS, making the name a bit unfortunate.
So while it's very much a specialization of MCTS and probably should go by a different name, one could argue it's still using monte carlo methods.
However something interesting of note is that since most applications of monte carlo methods rely on PRNGs instead of true RNGs, they are technically deterministic (as given the same PRNG seed you should always get the same result for a given input).
So what this algorithm is doing instead of using a normal PRNG and a separate heuristic, is to instead query the neural network. This works because the neural net is an heuristic over a massive search space which ends up acting like a very poor PRNG that is heavily biased towards specific results based on the training of the neutal net, which in turn ends up looking like a PRNG with a set of heuristics applied.
The important thing to note is that this is a specialisation of MCTS and as such shouldn't technically work for all use cases.
This article is a nice exploration of an approach called Graph Search, which essentially trades compute for memory by doing extra compute work (hashing the game states) to check to see if the nodes are already visited. That saves us from re-recording nodes we already saw, and consequently converts trees (free of cycles) into directed acyclic graphs.
This forces some tinkering with the tree search to get correct results, specifically it demands a focus more on edges (actions or moves) as the unit of optimization, rather than on vertices (states). It’s a well written technical essay in literate programming written by someone who understands their subject.
Applying the algorithm adds a hash associated with each node, and a counter on each edge. On the other side you're de-duplicating identical states in your search space, saving the memory of duplicate nodes but more importantly saving compute by not requiring independent searches of the same state space. Whether this trade off actually saves memory will be determined based on how likely duplicate states are in your search space.
Otherwise your summary is absolutely spot on.