new test cases

worked on all walkers
new helper methods
new distributions
some bugfixes
This commit is contained in:
2016-02-02 21:43:15 +01:00
parent ec86b07c43
commit 2e2c1a3004
18 changed files with 363 additions and 41 deletions

View File

@@ -198,7 +198,8 @@ public:
/** build a stair (z-transition) from n1 to n2 */
void buildStairLine(T& _n1, T& _n2) {
const int gridSize_cm = grid.getGridSize_cm();
// half the grid size = small steps
const int gridSize_cm = grid.getGridSize_cm() / 2;
// local copies, needed for std::swap to work
T n1 = _n1; T n2 = _n2;

View File

@@ -197,7 +197,7 @@ public:
static Distribution::Normal<float> avoidWalls(0.0, 0.4);
// favour walking near walls (likely)
static Distribution::Normal<float> sticToWalls(0.9, 0.5);
static Distribution::Normal<float> stickToWalls(0.9, 0.5);
// favour walking far away (likely)
static Distribution::Normal<float> farAway(2.2, 0.5);
@@ -205,7 +205,7 @@ public:
// overall importance
return - avoidWalls.getProbability(dist_m) * 0.30 // avoid walls
+ sticToWalls.getProbability(dist_m) * 0.15 // walk near walls
+ stickToWalls.getProbability(dist_m) * 0.15 // walk near walls
+ farAway.getProbability(dist_m) * 0.15 // walk in the middle
;