Issue253

Title merge-and-shrink heuristic: wrong distances in non-unit-cost problems
Priority bug Status resolved
Superseder Nosy List malte, moritz, raznis
Assigned To malte Keywords
Optional summary

Created on 2011-08-05.11:03:37 by malte, last changed by malte.

Messages
msg1690 (view) Author: malte Date: 2011-08-26.14:39:11
Tested and merged. Seems to work well and from what I can see we don't lose
coverage compared to the pre-IPC version. (No test on the IPC 2011 benchmarks
done so far, though.)
msg1679 (view) Author: malte Date: 2011-08-19.14:26:46
For reference: a good revision to test this, which should behave otherwise
identically to the IPC version (well, hopefully!) is 84153b1a11bd. After that
we'll make some algorithmic changes.
msg1678 (view) Author: malte Date: 2011-08-19.14:09:42
I fixed this within the issue211 branch, in revision 5db7c78a6fbe. That branch
is not yet merged into default, but I think it will be soon.

This is not throughly tested yet.
msg1677 (view) Author: raznis Date: 2011-08-19.12:50:50
Hey Malte, sure fine by me.
msg1676 (view) Author: malte Date: 2011-08-19.12:07:09
Hi Raz, can I take this over? I'd like to run experiments over the weekend, but
for that it'd be good to have this fixed first so that I can also compare on the
IPC 2008 domains.
msg1464 (view) Author: malte Date: 2011-08-05.11:03:37
The following function in the M&S code is wrong:

static void breadth_first_search(const vector<vector<int> > &graph,
                                 const vector<vector<int> > &cost_graph,
deque<int> &queue,
                                 vector<int> &distances) {
    while (!queue.empty()) {
        int state = queue.front();
        queue.pop_front();
        for (int i = 0; i < graph[state].size(); i++) {
            int successor = graph[state][i];
            int cost = cost_graph[state][i];
            if (distances[successor] > distances[state] + cost) {
                distances[successor] = distances[state] + cost;
                queue.push_back(successor);
            }
        }
    }
}

To support general costs, this should not be a breadth-first search
(using a deque as a queue) but a uniform cost search (using e.g. an
AdaptiveQueue, ideally one that is owned by the M&S heuristic instance
so that it is not reinitialized all the time -- cf. what other
heuristics do there).

The problem with the current code is that it can result in costs that
are too large, and hence in inadmissible heuristics.

Once this is fixed, we should do a before/after comparison on the IPC 2011
benchmarks and inform the organizers if any of our plans found there are not
actually optimal.
History
Date User Action Args
2011-08-26 14:39:11maltesetstatus: testing -> resolved
messages: + msg1690
2011-08-19 14:26:46maltesetmessages: + msg1679
2011-08-19 14:09:43maltesetstatus: chatting -> testing
messages: + msg1678
2011-08-19 12:54:15maltesetassignedto: raznis -> malte
2011-08-19 12:50:50raznissetmessages: + msg1677
2011-08-19 12:07:10maltesetmessages: + msg1676
2011-08-05 11:03:37maltecreate