Ejemplo n.º 1
0
        public override void AddEvaluations()
        {
            base.AddEvaluations();

            //	Outpost Evaluations
            if ((Knight != null && Knight.Enabled) ||
                (Bishop != null && Bishop.Enabled))
            {
                OutpostEval = new OutpostEvaluation();
                if (Knight != null && Knight.Enabled)
                {
                    OutpostEval.AddOutpostBonus(Knight);
                }
                if (Bishop != null && Bishop.Enabled)
                {
                    OutpostEval.AddOutpostBonus(Bishop, 10, 2, 5, 5);
                }
                AddEvaluation(OutpostEval);
            }

            //	Rook-type Evaluations (rook-mover on open file
            //	and rook-mover on 7th ranks with enemy king on 8th)
            if ((Rook != null && Rook.Enabled) ||
                (Queen != null && Queen.Enabled))
            {
                RookTypeEval = new RookTypeEvaluation();
                if (Rook != null && Rook.Enabled)
                {
                    RookTypeEval.AddOpenFileBonus(Rook);
                }
            }
        }
Ejemplo n.º 2
0
        public override void AddEvaluations()
        {
            base.AddEvaluations();
            RookTypeEvaluation eval = new RookTypeEvaluation();

            eval.AddOpenFileBonus(Rook);
            eval.AddRookOn7thBonus(Rook, King);
            AddEvaluation(eval);

            OutpostEvaluation outpost = new OutpostEvaluation();

            outpost.AddOutpostBonus(Knight);
            outpost.AddOutpostBonus(Bishop, 10, 2, 5, 5);
            AddEvaluation(outpost);
        }
Ejemplo n.º 3
0
        public override void AddEvaluations()
        {
            base.AddEvaluations();

            //	Outpost Evaluations
            if ((Knight != null && Knight.Enabled) ||
                (Bishop != null && Bishop.Enabled))
            {
                OutpostEval = new OutpostEvaluation();
                if (Knight != null && Knight.Enabled)
                {
                    OutpostEval.AddOutpostBonus(Knight);
                }
                if (Bishop != null && Bishop.Enabled)
                {
                    OutpostEval.AddOutpostBonus(Bishop, 10, 2, 5, 5);
                }
                AddEvaluation(OutpostEval);
            }

            //	Rook-type Evaluations (rook-mover on open file
            //	and rook-mover on 7th ranks with enemy king on 8th)

            //	Do we have a royal king?
            CheckmateRule rule      = (CheckmateRule)FindRule(typeof(CheckmateRule));
            bool          royalKing = rule != null && King != null && King.Enabled && rule.RoyalPieceType == King;

            if ((Rook != null && Rook.Enabled) ||
                (Queen != null && Queen.Enabled && royalKing))
            {
                RookTypeEval = new RookTypeEvaluation();
                if (Rook != null && Rook.Enabled)
                {
                    RookTypeEval.AddOpenFileBonus(Rook);
                    if (royalKing)
                    {
                        RookTypeEval.AddRookOn7thBonus(Rook, King);
                    }
                }
                if (Queen != null && Queen.Enabled && royalKing)
                {
                    RookTypeEval.AddRookOn7thBonus(Queen, King, 2, 8);
                }
                AddEvaluation(RookTypeEval);
            }
        }
Ejemplo n.º 4
0
        public override void AddEvaluations()
        {
            base.AddEvaluations();

            if (RookTypeEval == null)
            {
                RookTypeEval = new RookTypeEvaluation();
                AddEvaluation(RookTypeEval);
            }
            if (ChargingRook != null)
            {
                RookTypeEval.AddRookOn7thBonus(ChargingRook, King);
            }
            if (ShortRook != null)
            {
                RookTypeEval.AddOpenFileBonus(ShortRook);
                RookTypeEval.AddRookOn7thBonus(ShortRook, King);
            }
            if (Colonel != null)
            {
                RookTypeEval.AddRookOn7thBonus(Colonel, King, 2, 8);
            }
            if (Chancellor != null)
            {
                RookTypeEval.AddRookOn7thBonus(Chancellor, King, 2, 8);
            }

            if (OutpostEval == null)
            {
                OutpostEval = new OutpostEvaluation();
                AddEvaluation(OutpostEval);
            }
            if (ChargingKnight != null)
            {
                OutpostEval.AddOutpostBonus(ChargingKnight);
            }
            if (NarrowKnight != null)
            {
                OutpostEval.AddOutpostBonus(NarrowKnight);
            }
            if (Phoenix != null)
            {
                OutpostEval.AddOutpostBonus(Phoenix);
            }
            if (WarElephant != null)
            {
                OutpostEval.AddOutpostBonus(WarElephant, 10, 2, 5, 5);
            }
            if (Cleric != null)
            {
                OutpostEval.AddOutpostBonus(Cleric, 10, 2, 5, 5);
            }
            if (Lion != null)
            {
                OutpostEval.AddOutpostBonus(Lion, 10, 2, 5, 5);
            }
            if (Bishop != null)
            {
                OutpostEval.AddOutpostBonus(Bishop, 10, 2, 5, 5);
            }
            if (Tower != null)
            {
                OutpostEval.AddOutpostBonus(Tower, 10, 2, 5, 5);
            }
        }