Examples of EyeHealthEvaluator


Examples of com.barrybecker4.game.twoplayer.go.board.analysis.group.eye.EyeHealthEvaluator

        // first come up with some approximation for the health so update eyes can be done more accurately.
        float numEyes = eyeCache_.calcNumEyes();
        int numStones = group_.getNumStones();
        LifeAnalyzer lifeAnalyzer = new LifeAnalyzer(group_, board, analyzerMap_);
        EyeHealthEvaluator eyeEvaluator = new EyeHealthEvaluator(lifeAnalyzer);

        absoluteHealth_ = eyeEvaluator.determineHealth(side, numEyes, numLiberties, numStones);

        GoProfiler.getInstance().startUpdateEyes();
        eyeCache_.updateEyes(board)// expensive
        GoProfiler.getInstance().stopUpdateEyes();

        float eyePotential = eyeCache_.getEyePotential();
        float revisedNumEyes = eyeCache_.calcNumEyes();
        numEyes = Math.max(eyePotential, revisedNumEyes);

        // health based on eye shape - the most significant factor
        float health = eyeEvaluator.determineHealth(side, numEyes, numLiberties, numStones);

        // No bonus at all for false eyes
        absoluteHealth_ = health;
        if (Math.abs(absoluteHealth_) > 1.0) {
            GameContext.log(0"Warning: health exceeded 1.0: " +" health="+health+" numEyes="+numEyes);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.