some repairs for transition vars
authorAlexander Fedotov <soyaxhoya@gmail.com>
Wed, 13 Apr 2016 17:00:10 +0000 (19:00 +0200)
committerAlexander Fedotov <soyaxhoya@gmail.com>
Wed, 13 Apr 2016 17:00:10 +0000 (19:00 +0200)
modelchecker/coord.c

index e54fe56..1caff39 100644 (file)
@@ -264,6 +264,7 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                y = bddxy->value.y;
                if (check_space(x, y, dir, 1, bm) == 0){
 
+            //Agent -> Agent
                        //1 1 0 0 1 1 (1 0 1 -> 1 0 1)
                        BDDVAR relvars[6] = {i * 3, i * 3 + 1, i * 3 + 2, i * 3 + 3, i * 3 + 4, i * 3 + 5};
                        BDDSET relvarset = sylvan_set_fromarray(relvars, 6);
@@ -276,6 +277,7 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        trs_current->next_rel = trs;
                        trs = trs_current;
 
+            //Targagent -> Targagent
                        //1 1 1 1 0 0 (1 1 0 -> 1 1 0)
                        relvars[0] = i * 3;
                        relvars[1] = i * 3 + 1;
@@ -304,6 +306,7 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        xy_bddvar_map *bddvar = getxy(x + xdelta, y + ydelta, bm->f);
                        int deltai = bddvar->value.var[0];
 
+            //Free Agent -> Agent Free
                        //(0 1 0 0 1 1 1 0 0 0 1 1)
                        BDDVAR relvars[12]  = {deltai*3, deltai*3+1, deltai*3+2, deltai*3+3, deltai*3+4, deltai*3+5, i*3, i*3+1, i*3+2, i*3+3, i*3+4, i*3+5};
                        BDDSET relvarset = sylvan_set_fromarray(relvars, 12);
@@ -315,7 +318,8 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        trs_current->next_rel = trs;
                        trs = trs_current;
 
-                       //(0 1 1 0 1 1 1 0 0 1 1 1)
+            //Target Agent -> Targagent Free
+                       //(0 1 1 1 1 0 1 0 0 0 1 1)
                        relvars[0] = deltai*3;
                        relvars[1] = deltai*3+1;
                        relvars[2] = deltai*3+2;
@@ -332,13 +336,13 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        rel_enc[0] = 0;
                        rel_enc[1] = 1;
                        rel_enc[2] = 1;
-                       rel_enc[3] = 0;
+                       rel_enc[3] = 1;
                        rel_enc[4] = 1;
-                       rel_enc[5] = 1;
+                       rel_enc[5] = 0;
                        rel_enc[6] = 1;
                        rel_enc[7] = 0;
                        rel_enc[8] = 0;
-                       rel_enc[9] = 1;
+                       rel_enc[9] = 0;
                        rel_enc[10] = 1;
                        rel_enc[11] = 1;
                        trs_current = (trans_t *)malloc(sizeof(trans_t));
@@ -348,7 +352,8 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        trs_current->next_rel = trs;
                        trs = trs_current;
 
-                       //(0 1 0 1 1 0 1 0 1 0 0 1)
+            //REPAIR! Must be: Free Targagent -> Agent Target
+                       //(0 1 0 0 1 1 1 0 1 1 0 1)
                        relvars[0] = deltai*3;
                        relvars[1] = deltai*3+1;
                        relvars[2] = deltai*3+2;
@@ -365,13 +370,13 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        rel_enc[0] = 0;
                        rel_enc[1] = 1;
                        rel_enc[2] = 0;
-                       rel_enc[3] = 1;
+                       rel_enc[3] = 0;
                        rel_enc[4] = 1;
-                       rel_enc[5] = 0;
+                       rel_enc[5] = 1;
                        rel_enc[6] = 1;
                        rel_enc[7] = 0;
                        rel_enc[8] = 1;
-                       rel_enc[9] = 0;
+                       rel_enc[9] = 1;
                        rel_enc[10] = 0;
                        rel_enc[11] = 1;
                        trs_current = (trans_t *)malloc(sizeof(trans_t));
@@ -381,6 +386,7 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        trs_current->next_rel = trs;
                        trs = trs_current;
 
+            //Target Targagent -> Targagent Target
                        //(0 1 1 1 1 0 1 0 1 1 0 1)
                        relvars[0] = deltai*3;
                        relvars[1] = deltai*3+1;
@@ -414,6 +420,7 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        trs_current->next_rel = trs;
                        trs = trs_current;
 
+            //Box Agent -> Box Agent
                        //(0 0 1 1 0 0 1 1 0 0 1 1)
                        relvars[0] = deltai*3;
                        relvars[1] = deltai*3+1;
@@ -447,6 +454,7 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        trs_current->next_rel = trs;
                        trs = trs_current;
 
+            //Targbox Agent -> Targbox Agent
                        //(1 1 0 0 0 0 1 1 0 0 1 1)
                        relvars[0] = deltai*3;
                        relvars[1] = deltai*3+1;
@@ -480,6 +488,7 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        trs_current->next_rel = trs;
                        trs = trs_current;
 
+            //Box Targagent -> Box Targagent
                        //(0 0 1 1 0 0 1 1 1 1 0 0)
                        relvars[0] = deltai*3;
                        relvars[1] = deltai*3+1;
@@ -513,6 +522,7 @@ trans_t *create_single_rel(sokoban_screen *screen, direction dir)
                        trs_current->next_rel = trs;
                        trs = trs_current;
 
+            //Targbox Targagent -> Targbox Targagent
                        //(1 1 0 0 0 0 1 1 1 1 0 0)
                        relvars[0] = deltai*3;
                        relvars[1] = deltai*3+1;