/////////////////////////////////////////////////////////////////////////////////
//                                                                             //
//                                                                             //
// RDDL MDP version of Wildlife Preserve instance #06 for IPC 2018 by Fei Fang //
// (feifang [at] cmu.edu), Thanh Hong Nguyen (thanhhng [at] umich.edu) and     //
// Thomas Keller (tho.keller [at] unibas.ch), based on the papers "When        //
// Security Games Go Green: Designing Defender Strategies to Prevent Poaching  //
// and Illegal Fishing" by Fei Fang, Peter Stone and Milind Tambe (IJCAI 2015) //
// and "Analyzing the Effectiveness of Adversary Modeling in Security Games"   //
// by Thanh H. Nguyen, Rong Yang, Amos Azaria, Sarit Kraus and Milind Tambe    //
// (AAAI 2013).                                                                //
//                                                                             //
//                                                                             //
/////////////////////////////////////////////////////////////////////////////////

instance wildlife-preserve_inst_mdp__06 {
    domain = wildlife-preserve_06_mdp;

    objects {
        ranger  : { r1, r2 };
        poacher : { p1, p2 };
    };

    non-fluents {
        DEFENDER-REWARD(@a1) = 3.45;
        DEFENDER-PENALTY(@a1) = -4.79;
        DEFENDER-REWARD(@a2) = 3.47;
        DEFENDER-PENALTY(@a2) = -6.41;
        DEFENDER-REWARD(@a3) = 4.33;
        DEFENDER-PENALTY(@a3) = -1.04;
        DEFENDER-REWARD(@a4) = 7.12;
        DEFENDER-PENALTY(@a4) = -2.70;
        DEFENDER-REWARD(@a5) = 5.89;
        DEFENDER-PENALTY(@a5) = -7.94;
        DEFENDER-REWARD(@a6) = 7.30;
        DEFENDER-PENALTY(@a6) = -3.93;

        // correlation between attacker reward and defender penalty as well as
        // attacker penalty and defender reward is 0.80 for all poachers and all areas

        // weights for poacher p1 are: w1 = -15.67, w2 = 0.67, w3 = 0.32
        // reward for poacher p1 in area @a1 is: 4.26
        // penalty for poacher p1 in area @a1 is: -4.28
        // reward for poacher p1 in area @a2 is: 5.63
        // penalty for poacher p1 in area @a2 is: -2.85
        // reward for poacher p1 in area @a3 is: 2.02
        // penalty for poacher p1 in area @a3 is: -3.80
        // reward for poacher p1 in area @a4 is: 3.49
        // penalty for poacher p1 in area @a4 is: -5.77
        // reward for poacher p1 in area @a5 is: 6.68
        // penalty for poacher p1 in area @a5 is: -5.13
        // reward for poacher p1 in area @a6 is: 3.30
        // penalty for poacher p1 in area @a6 is: -6.24

        // weights for poacher p2 are: w1 = -20.24, w2 = 0.77, w3 = 0.35
        // reward for poacher p2 in area @a1 is: 5.40
        // penalty for poacher p2 in area @a1 is: -3.49
        // reward for poacher p2 in area @a2 is: 6.51
        // penalty for poacher p2 in area @a2 is: -2.96
        // reward for poacher p2 in area @a3 is: 1.96
        // penalty for poacher p2 in area @a3 is: -3.58
        // reward for poacher p2 in area @a4 is: 2.22
        // penalty for poacher p2 in area @a4 is: -5.83
        // reward for poacher p2 in area @a5 is: 7.39
        // penalty for poacher p2 in area @a5 is: -5.74
        // reward for poacher p2 in area @a6 is: 4.42
        // penalty for poacher p2 in area @a6 is: -6.94

        ATTACK-WEIGHT_0(p1, @a1) = 4.29762;
        ATTACK-WEIGHT_1(p1, @a1) = 0.00170;
        ATTACK-WEIGHT_2(p1, @a1) = 0.00000;
        ATTACK-WEIGHT_0(p1, @a2) = 17.07643;
        ATTACK-WEIGHT_1(p1, @a2) = 0.00676;
        ATTACK-WEIGHT_2(p1, @a2) = 0.00000;
        ATTACK-WEIGHT_0(p1, @a3) = 1.12392;
        ATTACK-WEIGHT_1(p1, @a3) = 0.00044;
        ATTACK-WEIGHT_2(p1, @a3) = 0.00000;
        ATTACK-WEIGHT_0(p1, @a4) = 1.58397;
        ATTACK-WEIGHT_1(p1, @a4) = 0.00063;
        ATTACK-WEIGHT_2(p1, @a4) = 0.00000;
        ATTACK-WEIGHT_0(p1, @a5) = 16.43685;
        ATTACK-WEIGHT_1(p1, @a5) = 0.00651;
        ATTACK-WEIGHT_2(p1, @a5) = 0.00000;
        ATTACK-WEIGHT_0(p1, @a6) = 1.19774;
        ATTACK-WEIGHT_1(p1, @a6) = 0.00047;
        ATTACK-WEIGHT_2(p1, @a6) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a1) = 18.69908;
        ATTACK-WEIGHT_1(p2, @a1) = 0.00075;
        ATTACK-WEIGHT_2(p2, @a1) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a2) = 52.90132;
        ATTACK-WEIGHT_1(p2, @a2) = 0.00213;
        ATTACK-WEIGHT_2(p2, @a2) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a3) = 1.28490;
        ATTACK-WEIGHT_1(p2, @a3) = 0.00005;
        ATTACK-WEIGHT_2(p2, @a3) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a4) = 0.71224;
        ATTACK-WEIGHT_1(p2, @a4) = 0.00003;
        ATTACK-WEIGHT_2(p2, @a4) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a5) = 39.22177;
        ATTACK-WEIGHT_1(p2, @a5) = 0.00158;
        ATTACK-WEIGHT_2(p2, @a5) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a6) = 2.62016;
        ATTACK-WEIGHT_1(p2, @a6) = 0.00011;
        ATTACK-WEIGHT_2(p2, @a6) = 0.00000;

        POACHER-REMEMBERS(p1, @1);
        POACHER-REMEMBERS(p1, @2);
        POACHER-REMEMBERS(p2, @1);
        POACHER-REMEMBERS(p2, @2);

    };

    init-state {
        ~was-defended(@a1,@1);
    };

    horizon = 60;

    discount = 1.0;
}