private int alpha_beta(BoardNode root,int a, int b, int d) {
		int i,var;
		BoardNode tmp;
			
		if(d==0){/*if reach the max depth, return the static value */

			var = this.evaluator.Evaluate(root, this.myClr);
			return var;
		}
		
		if (root.isMAX){/*for max node*/
			for(i=0;i<7;i++)
			{
				if((tmp=root.NewNode(i))==null)/*if this column is full, try the next node*/
					continue;
				var = alpha_beta(tmp,a, b, d-1);
				
				if(var>=a)
				{
					a = var;
				}
				
				if (a>=b)
					return b;
			}
			return a;
			
		}else			/*for min node*/
		{
			for(i=0;i<7;i++)
			{
				if((tmp=root.NewNode(i))==null)/*if this column is full, try the next node*/
					continue;
				b = min(b,alpha_beta(root.NewNode(i),a, b, d-1));
				if (b<=a)
					return a;
			}
			return b;
		}
		
	}