ai :: SearchProblem :: make_memory
In order to try more configurations with run_config
, this method
is called to provide alternative implementation.
For instance, a subclass can redefine this method and extends the result with an additional RBTreeMap
.
Note: because the true nature of the sates S
is left to the user, some
specific Map implementation could be more efficient than a HashMop.
Default: A HashMap
# Various Map implementations of memory.
# In order to try more configurations with `run_config`, this method
# is called to provide alternative implementation.
#
# For instance, a subclass can redefine this method and extends the result with an additional `RBTreeMap`.
# Note: because the true nature of the sates `S` is left to the user, some
# specific Map implementation could be more efficient than a HashMop.
#
# Default: A `HashMap`
fun make_memory: Array[Map[S, SearchNode[S, A]]]
do
var res = new Array[Map[S, SearchNode[S, A]]]
res.add new HashMap[S, SearchNode[S, A]]
return res
end
lib/ai/search.nit:169,2--183,4