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

Is the package suitable to do simulations "as fast as possible"? #69

Open
stakaz opened this issue Sep 11, 2024 · 2 comments
Open

Is the package suitable to do simulations "as fast as possible"? #69

stakaz opened this issue Sep 11, 2024 · 2 comments

Comments

@stakaz
Copy link

stakaz commented Sep 11, 2024

Hello, I wounder if this is the use case for this package: modelling diseases and vaccination processes with localization and various different sub-environment, e.g. farms, vaccination teams, wind and whether and so on.

The question is, if I would like to simulate one run of the corresponding "world" as fast as possible, e.g. for training the agents with RL and so on, how would I proceed? Like, how to make everything fast but still use the advantage of the communication protocol and other cool features of this package?

Or is this use case not suited for the use of this package?

Maybe a simple example of the real RL code around e.g. the 2D grid example (like, how to start and stop the environment at each iteration to perform the learning cycles, how to record the results and so on) would be great?

And thanks for fixing the "real_time_factor" so quickly ;)

@wouterwln
Copy link
Member

Hey, thanks for trying out RxEnvironments! I think what you want is possible, and is what I call a "discrete time environment", a small section in the documentation can be found here. What this essentially does is that we, instead of using the machine clock to determine time, we fire the update! function whenever your agent emits an action. This is indeed a bit like the Windy Gridworld example as well, only that setup does not have a clock (see the note on that documentation page).

So you could use this package to create a composite environment for RL as well, I think the package is suitable for that. As for the example with an actual learning cycle, this will become available at some point, but I do not have a specific timeframe in mind.

@stakaz
Copy link
Author

stakaz commented Sep 11, 2024

Thanks for the answer. I will take a look to it at a later point in time. However, possible this is not exactly not what I would need, since I want to have e.g. diseases to come at different (and random) time steps, which would not be possible without an internal clock.

So, basically what I think of is probably a discrete time but with notion of time difference and not just single steps :)

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

No branches or pull requests

2 participants