Exemplo n.º 1
0
 public AllAlternatigJumpsTreeCollection(IJumpNodeTreeWithFactory parent, IAlphaBetaOptions alphaBetaOptions, ISearchNodeVisitor <JumpNode> afterMoveVisitor)
 {
     _alphaBetaOptions = alphaBetaOptions;
     _afterMoveVisitor = afterMoveVisitor;
     Parent            = parent;
     _parentJumpNode   = Parent.Node;
 }
Exemplo n.º 2
0
 public AlphaBetaSearch(IValueOf <T> valuer, IAlphaBetaOptions maxDepth, ISearchNodeVisitor <T> nodeVisitor)
 {
     _valuer       = valuer;
     _maxDepth     = maxDepth.SearchDepth;
     _depthCounter = new DepthCounterNodeVisitor <T>();
     _nodeVisitor  = _depthCounter.FollowedBy(nodeVisitor);
 }
 public AlphaBetaMoveFindingStrategy(IPlayersState playersState, 
     IAlphaBetaOptions alphaBetaSearchDepth,
     Func< IFieldsGraph,IJumpNodeTree> movesFactory
     )
 {
     _playersState = playersState;
     _alphaBetaSearchDepth = alphaBetaSearchDepth;
     _movesFactory = movesFactory;
 }
Exemplo n.º 4
0
 public AlphaBetaMoveFindingStrategy(IPlayersState playersState,
                                     IAlphaBetaOptions alphaBetaSearchDepth,
                                     Func <IFieldsGraph, IJumpNodeTree> movesFactory
                                     )
 {
     _playersState         = playersState;
     _alphaBetaSearchDepth = alphaBetaSearchDepth;
     _movesFactory         = movesFactory;
 }
 public TowardsTargetBorderStonePlacer(IAlphaBetaOptions alphaBetaOptions)
 {
     _alphaBetaOptions = alphaBetaOptions;
     _allUpper = Direction.AllUpper.Take(5)
         .Concat(new[]{ Direction.N.Multiply(2).Add(Direction.W), Direction.N.Multiply(2).Add(Direction.E) })
         .Shuffle();
     _allBottom = Direction.AllBottom.Take(5)
         .Concat(new[] { Direction.S.Multiply(2).Add(Direction.W), Direction.S.Multiply(2).Add(Direction.E) })
         .Shuffle();
 }
Exemplo n.º 6
0
 public TowardsTargetBorderStonePlacer(IAlphaBetaOptions alphaBetaOptions)
 {
     _alphaBetaOptions = alphaBetaOptions;
     _allUpper         = Direction.AllUpper.Take(5)
                         .Concat(new[] { Direction.N.Multiply(2).Add(Direction.W), Direction.N.Multiply(2).Add(Direction.E) })
                         .Shuffle();
     _allBottom = Direction.AllBottom.Take(5)
                  .Concat(new[] { Direction.S.Multiply(2).Add(Direction.W), Direction.S.Multiply(2).Add(Direction.E) })
                  .Shuffle();
 }
Exemplo n.º 7
0
 public FirstJumpThenPlaceStones(IJumpNodeTreeWithFactory parent, IAlphaBetaOptions options, IPlayersState playerState)
 {
     _parent      = parent;
     _options     = options;
     _playerState = playerState;
 }
Exemplo n.º 8
0
 public JumpCollectWhiteStonePlacesThenPutBlack(IJumpNodeTreeWithFactory parent, IAlphaBetaOptions options, IPlayersState playerState)
 {
     _parent      = parent;
     _options     = options;
     _playerState = playerState;
 }
Exemplo n.º 9
0
 public AllAlternatigJumpsTreeCollection(IJumpNodeTreeWithFactory parent, IAlphaBetaOptions alphaBetaOptions)
     : this(parent, alphaBetaOptions, new EmptyNodeVisitor <JumpNode>())
 {
 }