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

How to fast restart game in multiplayer mode #342

Closed
dooliu opened this issue Oct 6, 2022 · 0 comments
Closed

How to fast restart game in multiplayer mode #342

dooliu opened this issue Oct 6, 2022 · 0 comments

Comments

@dooliu
Copy link

dooliu commented Oct 6, 2022

Multiple players means multiple processes, so the only way i know is leave game and re-join the game is through controllers, but it will costs 3-4 seconds, which is too slow for reinforcement learning training.
The reset function code are as follows:

def _restart(self): if (len(self._players) == 1 and len(self._players[0].race) == 1 and len(self._maps) == 1): # Need to support restart for fast-restart of mini-games. self._controllers[0].restart() else: if len(self._controllers) > 1: self._parallel.run(c.leave for c in self._controllers) self._create_join()

How to quickly restart? Anybody knows?

@dooliu dooliu closed this as completed Oct 13, 2022
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

1 participant