private void Init()
		{
			foreach (var field in Book.GetLoss())
			{
				tree[9][field] = new SearchTreeBookNode(field, 9, Scores.YelWin >> 3);
			}
			foreach (var field in Book.GetDraws())
			{
				tree[9][field] = new SearchTreeBookNode(field, 9, Scores.Draw);
			}

			var ply2 = Generator.GetMoves(Field.Empty, true);

			tree[2][ply2[0]] = new SearchTreeBookNode(ply2[0], 1, Scores.YelWin >> 3);
			tree[2][ply2[1]] = new SearchTreeBookNode(ply2[1], 1, Scores.YelWin >> 3);
			tree[2][ply2[2]] = new SearchTreeBookNode(ply2[2], 1, Scores.Draw);
			tree[2][ply2[3]] = new SearchTreeBookNode(ply2[3], 1, Scores.RedWin >> 3);
			tree[2][ply2[4]] = new SearchTreeBookNode(ply2[4], 1, Scores.Draw);
			tree[2][ply2[5]] = new SearchTreeBookNode(ply2[5], 1, Scores.YelWin >> 3);
			tree[2][ply2[6]] = new SearchTreeBookNode(ply2[6], 1, Scores.YelWin >> 3);

			var knowns = SearchTreeKnownNodes.Get();

			foreach (var known in knowns.Values)
			{
				var win = Scores.GetPlyToWinning(known.Score);
				if (win < known.Depth || win > 42)
				{
				}
				if (win > known.Depth)
				{
					tree[known.Depth][known.Field] = known;
					tree[known.Depth][known.Field.Flip()] = known.Flip();
				}
			}
		}
		/// <summary>Gets a node with the field to search for.</summary>
		/// <param name="search">
		/// The field to search for.
		/// </param>
		/// <param name="ply">
		/// The current ply. This should be 1 higher than the discs at the field.
		/// </param>
		/// <returns>
		/// An existing node if already existing, otherwise a new one.
		/// </returns>
		public ISearchTreeNode GetNode(Field search, byte ply)
		{
			ISearchTreeNode node;

			var redToMove = (ply & 1) == 1;

			if (!tree[ply].TryGetValue(search, out node))
			{
				// Losses and draws are already added, so the missing a wins.
				if (ply == 9)
				{
					if (search.IsScoreYellow())
					{
						node = new SearchTreeEndNode(9, Scores.YelWins[9]);
					}
					else
					{
						node = new SearchTreeBookNode(search, 9, Scores.RedWin >> 3);
					}
				}
				else
				{
					var score = Evaluator.GetScore(search, ply);

					// If the node is final for the other color, no need to search deeper.
					if ((!redToMove && score == Scores.RedWins[ply -1]) ||
						(redToMove && score == Scores.YelWins[ply -1]))
					{
						node = new SearchTreeEndNode(ply, score);
					}
					// Game is done.
					else if (ply == MaximumDepth)
					{
						node = new SearchTreeEndNode(MaximumDepth, 0);
					}
					else if (redToMove)
					{
						node = new SearchTreeRedNode(search, ply, score);
					}
					else
					{
						node = new SearchTreeYellowNode(search, ply, score);
					}
					tree[ply][search] = node;
				}
			}
			else
			{
				trans[ply]++;
			}
			return node;
		}