Issue547

Title Move successor generator into the planner component
Priority feature Status resolved
Superseder Nosy List florian, gabi, jendrik, malte
Assigned To florian Keywords
Optional summary

Created on 2015-07-03.11:50:17 by florian, last changed by florian.

Messages
msg4379 (view) Author: florian Date: 2015-07-15.23:30:47
Done and merged as discussed offline. In issue556 we will investigate different
variable orders.
msg4367 (view) Author: malte Date: 2015-07-14.23:21:27
Actually, there are some factors of 1000+. :-)
(0.08 => 129.51 seconds, 0.20 => 232.78 seconds)
I think those results are OK, though.

I also looked at the code, and I see no reason not to merge there.

That still leaves the point about blind search -- I'd be happier to merge this
if we had a basic idea why we see such dramatic performance shifts in blind
search. I hope this should give us a clue of how to get closer to the best case
for blind search in general.
msg4365 (view) Author: florian Date: 2015-07-14.22:42:48
Results with LAMA's first configuration are also mixed but differences are not
quite as extreme (no factors of 1000 at least).

http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547-base-issue547-v2-lama-compare.html
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2-sat_lama-2011-first_memory.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2-sat_lama-2011-first_search_time.png

I would prefer to wait with the iPDB issue until we also fix the way state data
is accessed (issue348).
msg4353 (view) Author: malte Date: 2015-07-11.20:04:13
> (most tasks below 1 second, only huge tasks take
> longer than 10 seconds, worst case 13.33s for a satellite task)

I tested what the longest time for creating the successor generators with the
current preprocessor across the Satellite tasks is and got 10.26s (for #33, the
biggest one). But it's possible that this discrepancy is just because I was
testing while the grid wasn't used by any other task. Even if not, I guess we
could survive a 30% slowdown in a part that is generally not time-critical. From
my side, it looks like successor generation creation time is fine.

> Here are the results of the satisficing experiments

Wow, some *huge* differences there. These may mostly be due to different
tie-breaking between operators. Given that overall results are no worse than
before, I don't think it's necessary to look into these results much more deeply
unless someone wants to.

However, we should also test our "go-to" config: LAMA. (Alternatively, given
that I'm not sure the anytime configurations are supported very well by our
experiments: the initial config of LAMA.) This is what we recommend to everyone
as the default, so it should be part of the ones we always test. To make our
lives easier, maybe it's worth adding an alias for this to our downward script,
e.g. "lama-first" or "lama-initial"?

The results with randomized=true vary much less than the non-randomized ones,
and the overall trends look similar to blind search. I think in terms of average
overhead, things look quite fine.

Regarding LM-Cut and changed expansion counts, there are exactly six domains
where the number of reopened states has changed, and these are exactly the
domains where we see a change in the number of expansions until last jump.
That's good enough for me not to look into this further.

Depending on how thoroughly we want to go over these experiments, I see up to
three open points:

1. It would be good to have data for a LAMA-style configuration.

2. The iPDB performance issue is still not solved. It doesn't have to be solved
here, though, as there is a separate issue open for that already.

3. While we do a bit better overall with blind search, there are also some
domains where we become substantially slower (several hundred percent). I
checked three domains that stood out in the scatter plots: airport, mprime and
sokoban-opt11. In mprime, the difference may be due to the (in some cases,
substantially increased) number of evaluations. In the other two domains, the
number of evaluations doesn't change substantially, and I guess it's the
successor generators that are slower. This may be worth looking into. On the
positive side, the opposite also happens. One particularly nice domain is
tidybot, where apparently the successor generators are now much faster (e.g.
1134 seconds => 79 seconds in one task); the number of evaluations isn't changed
significantly here.

Of course, someone should also look over the code. I can try to do this, but I
have quite a pile-up of todos at the moment.
msg4352 (view) Author: florian Date: 2015-07-11.13:39:58
Here are the results of the satisficing experiments

http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547-base-issue547-v2-sat-compare.html

http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2-sat_astar_blind_memory.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2-sat_eager_greedy_ff_memory.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2-sat_lazy_greedy_cg_memory.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2-sat_lazy_greedy_cg_randomized_memory.png

http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2-sat_astar_blind_search_time.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2-sat_eager_greedy_ff_search_time.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2-sat_lazy_greedy_cg_search_time.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2-sat_lazy_greedy_cg_randomized_search_time.png
msg4348 (view) Author: florian Date: 2015-07-10.17:08:34
repeated experiments for iPDB now that the successor generator is actually used
for sampling.

ai.cs.unibas.ch/_tmp_files/pommeren/issue547-base-issue547-v2-compare.html

http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2_astar_ipdb_memory.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v2_astar_ipdb_search_time.png

The satisficing experiments are still running.
msg4346 (view) Author: florian Date: 2015-07-10.13:48:41
There is already an issue for getting rid of the preprocessor (issue26). This
issue is one step in this direction.
msg4342 (view) Author: florian Date: 2015-07-10.12:48:02
> Can we do search time scatter plots? 

http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_blind_search_time.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_ipdb_search_time.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_lmcut_search_time.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_pdb_search_time.png

> *Is* the successor generator prior to search, or is it created on demand
during the search?

It is created when reading in the task, so it should not count towards the
search time. The local generator for iPDB-sampling is now created during
heuristic construction (see below).

> Does the output include timing information for creating the successor generator?

It does. I added it to the report and created a cactus plot for it. Creating 
the generator seems fast enough (most tasks below 1 second, only huge tasks take
longer than 10 seconds, worst case 13.33s for a satellite task)
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_successor_generator_time_cactusplot.png

> Why do you say the numbers don't look that good? At first glance, I find them
mostly inconclusive. Is it because we don't regain the lost coverage in ipdb?

Yes, but I think I solved that mystery. In issue529 I added the successor
generator for the new task interface but somehow forgot to use it for iPDB. I'm
sorry, I know the plan was to include this in the issue so we don't have to
touch iPDB in this one and I thought I had done that already. Well, now iPDB
actually uses the successor generator and I'll repeat the experiment.

> Can you include data on the number of reopenings?

I added them to the report.
msg4340 (view) Author: malte Date: 2015-07-09.15:06:49
Some different points regarding the experiments; I haven't look at the code yet:

1) To measure the overhead (if any) compared to the previous implementation, I
don't think total time is very suitable: it includes the time for creating the
successor generator, which was previously hidden in the preprocessor. Can we do
search time scatter plots? *Is* the successor generator prior to search, or is
it created on demand during the search? Does the output include timing
information for creating the successor generator?

2) Why do you say the numbers don't look that good? At first glance, I find them
mostly inconclusive. Is it because we don't regain the lost coverage in ipdb?
That needs further investigation, but it may be unrelated to the successor
generator.

3) Changed behaviour of LM-Cut: even if the heuristic values are reproducible,
this can happen due to inconsistency of the heuristic. Can you include data on
the number of reopenings?

4) We will need separate experiments on the larger benchmark suite with fast
satisficing configs such as lama-like, lazy greedy with cg and pref. ops, eager
greedy with FF and pref. ops, plus blind as a baseline for pure overhead. The
successor generator is not all that important for optimal planning, where the
tasks we can solve can be small. It's much more important in the domains that we
can only really handle with satisficing planners where we can have tens or
hundreds of thousands of actions.

5) To get a clearer picture of overhead as opposed to tie-breaking issues, it
may be interesting to do a separate experiment with randomize_successors=true.
Unfortunately this is only available for lazy search, but if we try this out for
some strong lazy satisficing configs, it should hopefully give us a good picture
of the pure overhead.
msg4339 (view) Author: florian Date: 2015-07-09.09:22:18
I prepared a pull request and ran experiments for this.

https://bitbucket.org/flogo/downward-issues-issue547/pull-request/1/issue547/diff

http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547-base-issue547-v1-compare.html

http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_blind_memory.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_ipdb_memory.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_lmcut_memory.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_pdb_memory.png

http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_blind_total_time.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_ipdb_total_time.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_lmcut_total_time.png
http://ai.cs.unibas.ch/_tmp_files/pommeren/issue547_base_v1_astar_pdb_total_time.png

The numbers don't look that good and the expansions_until_last_jump changes for
LM-cut. Is this a bug or based on tie-breaking? The main difference to the
previous implementation is the variable order of the successor generator:
previously variables (pointers) were sorted by their address in the
preprocessor, now they are sorted by their id.
msg4316 (view) Author: florian Date: 2015-07-03.11:50:17
In issue529 we created a dummy implementation of a successor generator based on
the new task interface. This is not merged yet, but hopefully will be soon. This
implementation just loops through all operators and checks each one for
applicability. Here, we want to move the implementation from the preprocessor
into the planner component to replace the naive implementation. This should be
done in three steps:

1. Provide a decent implementation for the new SucessorGenerator.
2. Use the new SuccessorGenerator in the places where we currently use
GlobalSuccessorGenerator.
3. Get rid of GlobalSuccessorGenerator.
History
Date User Action Args
2015-07-15 23:30:47floriansetstatus: chatting -> resolved
messages: + msg4379
2015-07-14 23:21:27maltesetmessages: + msg4367
2015-07-14 22:42:48floriansetmessages: + msg4365
2015-07-11 20:04:13maltesetmessages: + msg4353
2015-07-11 13:39:58floriansetmessages: + msg4352
2015-07-10 17:08:34floriansetmessages: + msg4348
2015-07-10 13:48:41floriansetmessages: + msg4346
2015-07-10 12:48:02floriansetmessages: + msg4342
2015-07-09 15:06:49maltesetmessages: + msg4340
2015-07-09 09:22:18floriansetstatus: unread -> chatting
assignedto: florian
messages: + msg4339
2015-07-03 12:13:55jendriksetnosy: + jendrik
2015-07-03 11:51:07gabisetnosy: + gabi
2015-07-03 11:50:17floriancreate