Issue142

Title PDB State Space Sample does not sample as expected
Priority feature Status resolved
Superseder Nosy List erez, malte
Assigned To erez Keywords
Optional summary

Created on 2010-11-03.10:58:06 by erez, last changed by malte.

Messages
msg688 (view) Author: malte Date: 2010-11-03.16:12:24
Resolved.
msg687 (view) Author: erez Date: 2010-11-03.15:59:21
I deleted the commented out lines (they were printed before every random walk, 
which is annoying), and fixed indentation.
msg686 (view) Author: malte Date: 2010-11-03.15:44:39
One question and one problem.

Question:
===========================================================================
--- a/src/search/landmarks/landmark_status_manager.cc	Wed Nov 03 11:59:31 2010 +0200
+++ b/src/search/landmarks/landmark_status_manager.cc	Wed Nov 03 13:04:16 2010 +0200
@@ -54,8 +54,8 @@
             }
         }
     }
-    cout << inserted << " initial landmarks, "
-         << g_goal.size() << " goal landmarks" << endl;
+    //cout << inserted << " initial landmarks, "
+    //     << g_goal.size() << " goal landmarks" << endl;
 
     unused_alm.insert(
         lm_graph.get_action_landmarks().begin(),
===========================================================================

Why is that commented out? Should it go away? Then it should be deleted, not
commented out.

Problem: indentation is messed up. Please fix. Examples:

===========================================================================
--- a/src/search/learning/PDB_state_space_sample.cc	Wed Nov 03 11:59:31 2010 +0200
+++ b/src/search/learning/PDB_state_space_sample.cc	Wed Nov 03 13:04:16 2010 +0200
@@ -15,7 +15,7 @@
 PDBStateSpaceSample::PDBStateSpaceSample(int goal_depth, int probes = 10, int
size = 100)
     : ProbeStateSpaceSample(goal_depth, probes, size) {
     int table_size = (2 * goal_depth) + 1;
-    double p = 0.2;
+	double p = 0.5;
 
     prob_table = new double[table_size];
 
@@ -26,6 +26,7 @@
     prob_table[table_size - 1] = 1.0;
 
     uniform_sampling = true;
+	add_every_state = false;
 }
 
 PDBStateSpaceSample::~PDBStateSpaceSample() {
@@ -45,10 +46,17 @@
     cout << "PDB-style state space sample" << endl;
     int num_probes = 0;
     while ((samp.size() < min_training_set_size) && (num_probes <
max_num_probes)) {
+	    sample_t temp_sample;
+        temporary_samp = &temp_sample;
+
         num_probes++;
-        //cout << "Probe: " << num_probes << " - " << sample.size() << endl;
+
         int depth = get_random_depth();
+		for (int j = 0; j < heuristics.size(); j++) {
+		    heuristics[j]->reset();
+		}
         send_probe(depth);
+        //cout << "Probe: " << num_probes << " - " << samp.size() << endl;
     }
 
     branching_factor = (double)generated / (double)expanded;
===========================================================================
msg684 (view) Author: erez Date: 2010-11-03.10:58:06
It adds entire random walks to the sample, instead of just the end state of each 
random walk.
History
Date User Action Args
2010-11-03 16:12:24maltesetstatus: reviewing -> resolved
messages: + msg688
2010-11-03 15:59:21erezsetmessages: + msg687
2010-11-03 15:44:39maltesetmessages: + msg686
2010-11-03 12:04:43erezsetstatus: in-progress -> reviewing
2010-11-03 10:58:06erezcreate