Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Repeatable experiments #83

Closed
steenax86 opened this issue Oct 2, 2017 · 5 comments
Closed

Repeatable experiments #83

steenax86 opened this issue Oct 2, 2017 · 5 comments

Comments

@steenax86
Copy link

Is there a way to set a seed in the code such that the number of steps (or trees) stay the same for a fixed obstacle setup?

Thanks,
Steena

@jgkamat
Copy link
Contributor

jgkamat commented Oct 2, 2017

Hi @steenax86!

I don't think that there is a way to do this currently, but I think that this is a very useful feature to have!

Right now, I think the best way to solve this would be #25, after which we could add a random seed parameter to the RRT gui, and have reproducable RRT runs that way (by supplying a seed).

@joshhting, do you have enough free time to take a look at #25 (or find someone to delegate it to)? It's had a lot of back/forth for a while with no progress, so it would be nice to have someone step up :). Unfortunately I have way too much to do to try and take a look at this.

I think that this could be a bit of work, I heard from Jeremy that the random libraries we use are a little bit weird, so that might need to be changed too.

@steenax86
Copy link
Author

Hi @jgkamat
Thank you very much! This will be very useful to have. I tried using srand(1) to no effect. I suspect the fix will need a deeper investigation. I look forward to the official fix!

@JNeiger
Copy link

JNeiger commented Oct 2, 2017

If you are cool with a quick and dirty fix, add the lines

unsigned short seed[3] = {0, 0, 0};
seed48(seed);

into the reset function of the Tree class in the file Tree.hpp. This assumes the initial seed is 0 also.

Here's a gist of my current file.

@steenax86
Copy link
Author

@JNeiger Excellent! Thank you very much! This fix works for me!

@jgkamat
Copy link
Contributor

jgkamat commented Oct 2, 2017

It's still a good idea to implement this properly, but the above snippet should help with the implementation (if we decide to keep the same random number generation method we do right now).

Glad it worked for you though! 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants