all: add `nitish` tag for code-blocks skipped by nitunit
[nit.git] / lib / ai / search.nit
index 248ab7c..64904ee 100644 (file)
@@ -99,7 +99,7 @@ interface SearchProblem[S: Object, A]
        # An heuristic of the estimated `cost` going from `state` to a goal state.
        #
        # Is is expected that the heuristic is *admissible*, it means its is an
-       # optimistic estimation that never an over-estimate, thus is cannot be#
+       # optimistic estimation and never an over-estimate, thus is cannot be
        # higher than the lowest possible remaining cost.
        # See `SearchSolver::do_revisit` for details.
        #
@@ -199,7 +199,7 @@ end
 # 2. Apply the method `run`, that will search and return a solution.
 # 3. Retrieve information from the solution.
 #
-# ~~~~
+# ~~~~nitish
 # var p: SearchProblem = new MyProblem
 # var res = p.astar.run
 # if res != null then print "Found plan with {res.depth} actions, that cost {res.cost}: {res.plan.join(", ")}"
@@ -608,7 +608,8 @@ end
 # Used to compare nodes with their score.
 # Smaller is score, smaller is the node.
 private class NodeComparator[S: Object, A]
-       super Comparator[SearchNode[S, A]]
+       super Comparator
+       redef type COMPARED: SearchNode[S, A]
        redef fun compare(a,b) do return a.score <=> b.score
 end