Ejemplo n.º 1
0
 public static ForwardNode MakeRegularNode(WorldState worldState, INodeExpander <ForwardNode> nodeExpander)
 {
     return(new ForwardNode(
                PreconditionUtils.EnsureNotNull(worldState, "worldState"),
                PreconditionUtils.EnsureNotNull(nodeExpander, "nodeExpander"),
                default(Goal),
                false
                ));
 }
Ejemplo n.º 2
0
 public static RegressiveNode MakeRegular(
     RegressiveState currentConstraints,
     WorldState initialState,
     INodeExpander <RegressiveNode> nodeExpander
     )
 {
     return(new RegressiveNode(
                currentConstraints,
                initialState,
                PreconditionUtils.EnsureNotNull(nodeExpander, "nodeExpander"),
                false
                ));
 }
Ejemplo n.º 3
0
        // Preconditions are checked in static factory methods Make*()
        private ForwardNode(WorldState worldState, INodeExpander <ForwardNode> nodeExpander, Goal goal, bool isGoal)
        {
            DebugUtils.Assert(
                isGoal || nodeExpander != null,
                "nodeExpander must not be null for regular (non-goal) nodes"
                );

            this.worldState   = worldState;
            this.nodeExpander = nodeExpander;
            this.goal         = goal;
            this.IsGoal       = isGoal;

            this.outgoingEdges = null;
        }
Ejemplo n.º 4
0
        private RegressiveNode(
            RegressiveState currentConstraints,
            WorldState initialState,
            INodeExpander <RegressiveNode> nodeExpander,
            bool isTarget
            )
        {
            DebugUtils.Assert(
                isTarget || nodeExpander != null,
                "Unless isTarget is true, nodeExpander must not be null"
                );

            this.currentConstraints = currentConstraints;
            InitialState            = initialState;
            this.nodeExpander       = nodeExpander;
            IsTarget = isTarget;
        }
Ejemplo n.º 5
0
 public IterativeDeepeningSearch(INodeExpander <State, Node <State> > expander, SearchMode mode, int depthLimit = Int32.MaxValue - 1)
 {
     Expander   = expander;
     Mode       = mode;
     DepthLimit = depthLimit;
 }
Ejemplo n.º 6
0
 public RecursiveBestFirstSearch(INodeExpander <State, TNode> expander)
 {
     Expander = expander;
 }
Ejemplo n.º 7
0
 public GraphSearch(INodeExpander <A, S, T, C> expander)
     : base(expander)
 {
 }
Ejemplo n.º 8
0
 public TreeSearch(INodeExpander <A, S, T, C> expander)
     : base(expander)
 {
 }
 public InstrumentedNodeExpander(INodeExpander <A, S, T, C> expander)
     : base(expander)
 {
     ClearMetrics();
 }
Ejemplo n.º 10
0
 public BreathFirstSearch(INodeExpander <State, Node <State> > expander, SearchMode mode)
 {
     Expander = expander;
     Mode     = mode;
 }
 public AStarIterativeDeepeningSearch(INodeExpander <State, AStarNode <State> > expander, SearchMode mode, int costLimit = Int32.MaxValue - 1)
 {
     Expander  = expander;
     Mode      = mode;
     CostLimit = costLimit;
 }
 public NodeExpanderDelegator(INodeExpander <A, S, T, C> expander)
 {
     this.expander = expander;
 }
Ejemplo n.º 13
0
 public CostLimitedDepthFirstSearch(INodeExpander <TState, TNode> expander, SearchMode mode, int costLimit)
     : base(expander, mode, costLimit)
 {
 }
Ejemplo n.º 14
0
 public DepthLimitedNodeExpander(INodeExpander <A, S, T, C> expander, INodeLimiter <T, C> limit)
     : base(expander)
 {
     this.limit = limit;
 }
 public AbstractSearchStrategy(INodeExpander <A, S, T, C> expander)
 {
     this.expander = expander;
 }
Ejemplo n.º 16
0
 public InspectableTreeSearch(INodeExpander <CodeSequence, SpriteGeneratorState, SpriteGeneratorSearchNode, IntegerCost> expander)
     : base(expander)
 {
 }
 public RecursiveBestFirstSearchStrategy(INodeExpander <A, S, T, C> expander)
     : base(expander)
 {
 }
Ejemplo n.º 18
0
 public DepthFirstSearch(INodeExpander <TState, TNode> expander, SearchMode mode, int depthLimit = Int32.MaxValue)
 {
     Expander   = expander;
     Mode       = mode;
     DepthLimit = depthLimit;
 }