File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
core/src/main/scala/aima/core/search/local Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ object SimulatedAnnealingSearch {
6767 }
6868 }
6969
70- final case class StateValueNode (state : State , value : Double ) extends State
70+ final case class StateValueNode (state : State , value : Double )
7171
7272 def apply (stateToValue : State => Double , problem : Problem ): Try [State ] =
7373 apply(stateToValue, problem, BasicSchedule .schedule)
@@ -94,7 +94,7 @@ object SimulatedAnnealingSearch {
9494 successor
9595 }
9696
97- def recurse (current : StateValueNode , t : TimeStep ): Try [State ] = {
97+ def recurse (current : StateValueNode , t : TimeStep ): Try [StateValueNode ] = {
9898 import time .TimeStep .Implicits ._
9999 val T = schedule(t)
100100
@@ -123,6 +123,6 @@ object SimulatedAnnealingSearch {
123123
124124 }
125125
126- recurse(makeNode(problem.initialState), TimeStep .start)
126+ recurse(makeNode(problem.initialState), TimeStep .start).map(_.state)
127127 }
128128}
You can’t perform that action at this time.
0 commit comments