Package org.encog.ml.graph

Examples of org.encog.ml.graph.BasicNode


      if (this.goal.isGoalMet(path)) {
        this.solution = path;
        return;
      }

      BasicNode state = path.getDestinationNode();
      this.explored.add(state);
     
      for (BasicEdge connection : state.getConnections()) {
        if( !this.explored.contains(connection.getTo()) &&
          !this.frontier.containsDestination(connection.getTo())) {
          BasicPath path2 = new BasicPath(path, connection.getTo());
          this.frontier.add(path2);
        }
View Full Code Here


  }

  public double calculatePathCost(BasicPath path) {
   
    double result = 0;
    BasicNode lastNode = null;
   
    for(BasicNode node: path.getNodes()) {
      double hc = this.estimator.estimateCost(node, getGoal());
      double stepCost = 0;
     
      if( lastNode!=null ) {
        stepCost = lastNode.getCost(node);
      }
     
      result+=(hc+stepCost);
     
      lastNode = node;
View Full Code Here

TOP

Related Classes of org.encog.ml.graph.BasicNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.