/////////////////////////////////////////////////////////////////////////////////
//                                                                             //
//                                                                             //
// RDDL MDP version of Cooperative Recon instance #13 for IPC 2018 by Thomas   //
// Keller (tho.keller [at] unibas.ch), based on the IPC 2011 domain by Tom     //
// Walsh (thomasjwalsh [at] gmail.com).                                        //
//                                                                             //
//                                                                             //
/////////////////////////////////////////////////////////////////////////////////

instance cooperative-recon_inst_mdp__13 {
    domain = cooperative-recon_mdp;

    objects { 
        xpos               : { x00, x01, x02, x03, x04, x05, x06 };
        ypos               : { y00, y01, y02, y03, y04, y05, y06 };
        object-of-interest : { obj00, obj01, obj02, obj03, obj04, obj05, obj06 };
        agent              : { a00, a01 };
        tool               : { w00, l00, c00, w01, l01, c01 };
    };

    non-fluents {
        // ADJACENCY
        ADJACENT_LEFT(x00, x01);
        ADJACENT_RIGHT(x01, x00);
        ADJACENT_LEFT(x01, x02);
        ADJACENT_RIGHT(x02, x01);
        ADJACENT_LEFT(x02, x03);
        ADJACENT_RIGHT(x03, x02);
        ADJACENT_LEFT(x03, x04);
        ADJACENT_RIGHT(x04, x03);
        ADJACENT_LEFT(x04, x05);
        ADJACENT_RIGHT(x05, x04);
        ADJACENT_LEFT(x05, x06);
        ADJACENT_RIGHT(x06, x05);
        ADJACENT_DOWN(y00, y01);
        ADJACENT_UP(y01, y00);
        ADJACENT_DOWN(y01, y02);
        ADJACENT_UP(y02, y01);
        ADJACENT_DOWN(y02, y03);
        ADJACENT_UP(y03, y02);
        ADJACENT_DOWN(y03, y04);
        ADJACENT_UP(y04, y03);
        ADJACENT_DOWN(y04, y05);
        ADJACENT_UP(y05, y04);
        ADJACENT_DOWN(y05, y06);
        ADJACENT_UP(y06, y05);

        // BASE
        BASE(x00, y02);

        // TOOLS
        WATER_TOOL(w00);
        HAS_TOOL(a00, w00);
        LIFE_TOOL(l00);
        HAS_TOOL(a00, l00);
        CAMERA_TOOL(c00);
        HAS_TOOL(a00, c00);
        WATER_TOOL(w01);
        HAS_TOOL(a01, w01);
        LIFE_TOOL(l01);
        HAS_TOOL(a01, l01);
        CAMERA_TOOL(c01);
        HAS_TOOL(a01, c01);

        // DAMAGE_PROBS
        DAMAGE_PROB(x00, y00) = 0.61;
        DAMAGE_PROB(x00, y01) = 0.26;
        DAMAGE_PROB(x01, y00) = 0.46;
        DAMAGE_PROB(x01, y03) = 0.19;
        DAMAGE_PROB(x01, y06) = 0.19;
        DAMAGE_PROB(x02, y00) = 0.75;
        DAMAGE_PROB(x02, y01) = 0.61;
        DAMAGE_PROB(x02, y02) = 0.19;
        DAMAGE_PROB(x02, y03) = 0.53;
        DAMAGE_PROB(x02, y04) = 0.19;
        DAMAGE_PROB(x02, y05) = 0.19;
        DAMAGE_PROB(x02, y06) = 0.36;
        DAMAGE_PROB(x03, y00) = 0.89;
        DAMAGE_PROB(x03, y01) = 0.93;
        DAMAGE_PROB(x03, y02) = 0.41;
        DAMAGE_PROB(x03, y03) = 0.19;
        DAMAGE_PROB(x03, y04) = 0.28;
        DAMAGE_PROB(x03, y06) = 0.40;
        DAMAGE_PROB(x04, y00) = 0.21;
        DAMAGE_PROB(x04, y01) = 0.41;
        DAMAGE_PROB(x04, y03) = 0.28;
        DAMAGE_PROB(x04, y04) = 0.62;
        DAMAGE_PROB(x04, y05) = 0.49;
        DAMAGE_PROB(x04, y06) = 0.37;
        DAMAGE_PROB(x05, y04) = 0.28;
        DAMAGE_PROB(x05, y05) = 0.40;
        DAMAGE_PROB(x05, y06) = 0.22;
        DAMAGE_PROB(x06, y04) = 0.40;
        DAMAGE_PROB(x06, y05) = 1.00;
        DAMAGE_PROB(x06, y06) = 0.40;

        // DETECT_PROBS
        DETECT_PROB = 0.6;
        DETECT_PROB_DAMAGED = 0.3;
        DETECT_PROB_WITH_SUPPORT = 0.8;
        DETECT_PROB_DAMAGED_WITH_SUPPORT = 0.4;

        // OBJECT_AT
        OBJECT_AT(obj00, x02, y04);
        OBJECT_AT(obj01, x06, y02);
        OBJECT_AT(obj02, x02, y02);
        OBJECT_AT(obj03, x05, y01);
        OBJECT_AT(obj04, x03, y05);
        OBJECT_AT(obj05, x06, y04);
        OBJECT_AT(obj06, x03, y00);

        // REWARDS
        GOOD_PIC_REWARD(obj00) = 2.00;
        BAD_PIC_REWARD(obj00) = 0.92;
        GOOD_PIC_REWARD(obj01) = 13.88;
        BAD_PIC_REWARD(obj01) = 12.21;
        GOOD_PIC_REWARD(obj02) = 9.46;
        BAD_PIC_REWARD(obj02) = 5.88;
        GOOD_PIC_REWARD(obj03) = 3.00;
        BAD_PIC_REWARD(obj03) = 0.60;
        GOOD_PIC_REWARD(obj04) = 25.69;
        BAD_PIC_REWARD(obj04) = 8.93;
        GOOD_PIC_REWARD(obj05) = 12.48;
        BAD_PIC_REWARD(obj05) = 10.04;
        GOOD_PIC_REWARD(obj06) = 2.50;
        BAD_PIC_REWARD(obj06) = 2.03;

    };

    init-state { 
        agent-at(a00, x01, y04);
        agent-at(a01, x01, y00);

    };

    horizon = 60;

    discount = 1.0;
}