Пример #1
0
 public QBoard(QBoard original)
 {
     this.board = new byte[16];
     original.board.CopyTo(this.board, 0);
     this.unplayedPieces = new List <byte>(original.unplayedPieces);
     this.legalMoves     = new List <byte>(original.legalMoves);
 }
Пример #2
0
 /* ***CONSTRUCTORS*** */
 public MCTSNode_QAI(int Wval = 2, int Lval = 0, int Tval = 1)
 {
     flag             = new bool[] { false, false, false, false, false, false };
     nodeValue        = 0;
     children         = new List <MCTSNode_QAI>();
     boardLogic       = new QBoard();
     possibleChildren = new List <byte>();
     score            = new Tuple <long, long>(0, 0);
 }
Пример #3
0
 public MCTSNode_QAI(MCTSNode_QAI parent, byte givenValue)
 {
     this.nodeValue = givenValue;
     this.flag      = new bool[6];
     parent.flag.CopyTo(this.flag, 0);
     this.flag[qflags.TYPE] = !this.flag[qflags.TYPE];
     if (!this.flag[qflags.TYPE])
     {
         this.flag[qflags.OWNER] = !this.flag[qflags.OWNER];
     }
     if (this.flag[qflags.TYPE])
     {
         this.possibleChildren = new List <byte>(parent.boardLogic.legalMoves);
     }
     else
     {
         this.possibleChildren = new List <byte>(parent.boardLogic.unplayedPieces);
     }
     this.children = new List <MCTSNode_QAI>();
     boardLogic    = new QBoard(parent.boardLogic);
     this.score    = new Tuple <long, long>(0, 0);
 }