Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does some properties (like the temperature of an obj) will be changed if the seed is fixed? #51

Open
leoozy opened this issue Sep 17, 2023 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@leoozy
Copy link

leoozy commented Sep 17, 2023

Hello, thank you very much for your work. I have a question. If for a specific task, I set the random number at the beginning of the environment initialization using random.seed(0), will the attributes of objects in the environment change, such as the temperature of an object? Thank you very much.

@MarcCote MarcCote added the question Further information is requested label Sep 18, 2023
@PeterAJansen
Copy link
Collaborator

Hi @leoozy , apologies to take a few days to get back to you.

ScienceWorld is written in Scala and essentially runs completely independently of Python (with only a socket bridge using py4j), so any changes to random number generators on Python shouldn't have any effect on a given ScienceWorld environment.

A given ScienceWorld task + variation index should be deterministic, such that if you initialize the environment with a given taskIdx and varitionIdx, and run the exact same series of actions in that environment, exactly the same things should happen, and they should produce the same output.

For example, for this code block, the environment should be identical every time you load it:

taskIdx = 1
varIdx = 1
taskName = taskNames[taskIdx]
env.load(taskName, varIdx, simplificationStr, generateGoldPath=True)

Similarly, if you changed the variation index:

taskIdx = 1
varIdx = 2
taskName = taskNames[taskIdx]
env.load(taskName, varIdx, simplificationStr, generateGoldPath=True)

this would load an environment that requests the same overall task be performed, but would have variations in the task-critical objects (e.g. for a freezing task, maybe you have to freeze orange juice instead of water), and also the objects that populate the environment (e.g. variation 1 might have a couch and a bookshelf in the living room, where it variation 2 might have a chair and a desk, etc.).

Are you seeing a behavior that appears non-deterministic? ScienceWorld originally had some non-deterministic behavior, but I think we've removed at least 99.9%+ of cases that we know about.

@MarcCote
Copy link
Collaborator

Isn't this related to #33?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants