/////////////////////////////////////////////////////////////////////////////////
//                                                                             //
//                                                                             //
// RDDL MDP version of Wildlife Preserve instance #04 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__04 {
    domain = wildlife-preserve_04_mdp;

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

    non-fluents {
        DEFENDER-REWARD(@a1) = 5.58;
        DEFENDER-PENALTY(@a1) = -6.89;
        DEFENDER-REWARD(@a2) = 8.94;
        DEFENDER-PENALTY(@a2) = -4.99;
        DEFENDER-REWARD(@a3) = 0.48;
        DEFENDER-PENALTY(@a3) = -0.25;
        DEFENDER-REWARD(@a4) = 3.83;
        DEFENDER-PENALTY(@a4) = -0.73;
        DEFENDER-REWARD(@a5) = 9.45;
        DEFENDER-PENALTY(@a5) = -3.87;

        // 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 = -22.88, w2 = 0.87, w3 = 0.56
        // reward for poacher p1 in area @a1 is: 5.83
        // penalty for poacher p1 in area @a1 is: -5.94
        // reward for poacher p1 in area @a2 is: 4.75
        // penalty for poacher p1 in area @a2 is: -7.99
        // reward for poacher p1 in area @a3 is: 0.41
        // penalty for poacher p1 in area @a3 is: -2.29
        // reward for poacher p1 in area @a4 is: 2.15
        // penalty for poacher p1 in area @a4 is: -4.19
        // reward for poacher p1 in area @a5 is: 3.40
        // penalty for poacher p1 in area @a5 is: -7.56

        // weights for poacher p2 are: w1 = -23.47, w2 = 0.59, w3 = 0.19
        // reward for poacher p2 in area @a1 is: 6.40
        // penalty for poacher p2 in area @a1 is: -5.32
        // reward for poacher p2 in area @a2 is: 5.80
        // penalty for poacher p2 in area @a2 is: -8.49
        // reward for poacher p2 in area @a3 is: 0.53
        // penalty for poacher p2 in area @a3 is: -2.36
        // reward for poacher p2 in area @a4 is: 1.04
        // penalty for poacher p2 in area @a4 is: -4.90
        // reward for poacher p2 in area @a5 is: 3.61
        // penalty for poacher p2 in area @a5 is: -8.65

        ATTACK-WEIGHT_0(p1, @a1) = 5.62724;
        ATTACK-WEIGHT_1(p1, @a1) = 0.00006;
        ATTACK-WEIGHT_2(p1, @a1) = 0.00000;
        ATTACK-WEIGHT_0(p1, @a2) = 0.69765;
        ATTACK-WEIGHT_1(p1, @a2) = 0.00001;
        ATTACK-WEIGHT_2(p1, @a2) = 0.00000;
        ATTACK-WEIGHT_0(p1, @a3) = 0.39495;
        ATTACK-WEIGHT_1(p1, @a3) = 0.00000;
        ATTACK-WEIGHT_2(p1, @a3) = 0.00000;
        ATTACK-WEIGHT_0(p1, @a4) = 0.61586;
        ATTACK-WEIGHT_1(p1, @a4) = 0.00001;
        ATTACK-WEIGHT_2(p1, @a4) = 0.00000;
        ATTACK-WEIGHT_0(p1, @a5) = 0.27511;
        ATTACK-WEIGHT_1(p1, @a5) = 0.00000;
        ATTACK-WEIGHT_2(p1, @a5) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a1) = 16.65002;
        ATTACK-WEIGHT_1(p2, @a1) = 0.00013;
        ATTACK-WEIGHT_2(p2, @a1) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a2) = 6.46819;
        ATTACK-WEIGHT_1(p2, @a2) = 0.00005;
        ATTACK-WEIGHT_2(p2, @a2) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a3) = 0.88353;
        ATTACK-WEIGHT_1(p2, @a3) = 0.00001;
        ATTACK-WEIGHT_2(p2, @a3) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a4) = 0.74602;
        ATTACK-WEIGHT_1(p2, @a4) = 0.00001;
        ATTACK-WEIGHT_2(p2, @a4) = 0.00000;
        ATTACK-WEIGHT_0(p2, @a5) = 1.70993;
        ATTACK-WEIGHT_1(p2, @a5) = 0.00001;
        ATTACK-WEIGHT_2(p2, @a5) = 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;
}