Example #1
0
 public SimulatedAnnealingSearch(IToDoubleFunction <Node <S, A> > h, Scheduler scheduler, NodeExpander <S, A> nodeExpander)
 {
     this.h            = h;
     this.scheduler    = scheduler;
     this.nodeExpander = nodeExpander;
     nodeExpander.addNodeListener((node) => metrics.incrementInt(METRIC_NODES_EXPANDED));
 }
Example #2
0
 public RecursiveBestFirstSearch(IToDoubleFunction <Node <S, A> > evalFn, bool avoidLoops,
                                 NodeExpander <S, A> nodeExpander)
 {
     this.evalFn       = evalFn;
     this.avoidLoops   = avoidLoops;
     this.nodeExpander = nodeExpander;
     nodeExpander.addNodeListener((node) => metrics.incrementInt(METRIC_NODES_EXPANDED));
     metrics = new Metrics();
 }
Example #3
0
 /** Stores the provided node expander and adds a node listener to it. */
 protected QueueSearch(NodeExpander <S, A> nodeExpander)
 {
     this.nodeExpander = nodeExpander;
     nodeExpander.addNodeListener((node) => metrics.incrementInt(METRIC_NODES_EXPANDED));
 }
Example #4
0
 public void addNodeListener(Consumer <Node <S, A> > listener)
 {
     nodeExpander.addNodeListener(listener);
 }
 public HillClimbingSearch(IToDoubleFunction <Node <S, A> > h, NodeExpander <S, A> nodeExpander)
 {
     this.h            = h;
     this.nodeExpander = nodeExpander;
     nodeExpander.addNodeListener((node) => metrics.incrementInt(METRIC_NODES_EXPANDED));
 }