glmcdona / LuxPythonEnvGym

Matching python environment code for Lux AI 2021 Kaggle competition, and a gym interface for RL models.
MIT License
73 stars 38 forks source link

Game failed due to error #62

Closed nosound2 closed 2 years ago

nosound2 commented 2 years ago

While training I am sporadically getting a "Game failed due to error" message. Does it mean that there is a bug that needs to be fixed, or can it happen naturally in game?

glmcdona commented 2 years ago

Yup, that means an unhandled exception occurred during the simulation of the game. This can be something like a bug in the game engine. View match_errors.txt in the working directory for the stack trace of the exception and please submit an issue with any you find. Make sure you are using the latest version of LuxPythonEnvGym too, since I've fixed a bunch of bugs too.

Training is designed to handle this gracefully and continue training OK. It finishes the game, and you can assign a negative reward for game failure to not encourage an agent to deliberately cause a failure if it's losing.