Exemplo n.º 1
0
 public GreedyCooperativeSolver(bool[,,] whatToFill, bool[,,] state, IOracle oracle, ICandidatesOrdering candidatesOrdering = null)
 {
     this.whatToFill         = whatToFill;
     this.state              = state;
     this.oracle             = oracle;
     this.candidatesOrdering = candidatesOrdering ?? new BuildAllStayingStill();
     R = whatToFill.GetLength(0);
 }
 public GreedyParallel(Matrix whatToFill, Vec pos, IOracle oracle, ICandidatesOrdering candidatesOrdering = null)
 {
     this.whatToFill = whatToFill;
     bots            = new Dictionary <int, BotState>();
     bots[0]         = new BotState {
         Position = pos
     };
     this.oracle             = oracle;
     this.candidatesOrdering = candidatesOrdering ?? new BuildAllStayingStill();
     R             = whatToFill.R;
     filled        = new Matrix(R);
     blockedBefore = new Matrix <int>(R);
 }
 public GreedyFill(DeluxeState state, Bot bot, IOracle oracle, ICandidatesOrdering candidatesOrdering = null)
     : base(state, bot)
 {
     this.oracle             = oracle;
     this.candidatesOrdering = candidatesOrdering ?? new BuildAllStayingStill();
 }
 public GreedyPartialSolver(Matrix targetMatrix, Matrix sourceMatrix, IOracle oracle, ICandidatesOrdering candidatesOrdering = null)
     : this(targetMatrix.Voxels, sourceMatrix.Voxels, Vec.Zero, oracle, candidatesOrdering)
 {
 }
 public GreedyPartialSolver(Matrix targetMatrix, IOracle oracle, ICandidatesOrdering candidatesOrdering = null)
     : this(targetMatrix.Voxels, new bool[targetMatrix.R, targetMatrix.R, targetMatrix.R], Vec.Zero, oracle, candidatesOrdering)
 {
 }
Exemplo n.º 6
0
 public CooperativeGreedyFill(DeluxeState state, Bot bot, HashSet <Vec> candidates, ICandidatesOrdering candidatesOrdering = null)
     : base(state, bot)
 {
     this.candidates         = candidates;
     this.candidatesOrdering = candidatesOrdering ?? new BottomToTopBuildingAround();
 }