Kautenja / gym-super-mario-bros

An OpenAI Gym interface to Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The NES
Other
678 stars 133 forks source link

exception: access violation reading 0x000000000003C208 #107

Closed Powercube7 closed 2 years ago

Powercube7 commented 2 years ago

When running the following script for the AI to predict an action, the error specified happens. This is my code:

episodes = 5 for episode in range (1, episodes + 1): state = env.reset() done = False score = 0 while not done: env.render() action = model.predict(state) state, reward, done, info = env.step(action) score += reward print('Episode: {}, Score: {}'.format(episode, score)) env.close()

Powercube7 commented 2 years ago

I use stable baselines 3 to train and evaluate the AI

Kautenja commented 2 years ago

Without more information I cannot debug this issue. I would imagine that it is due to the model and not the gym-super-mario-bros framework.

Powercube7 commented 2 years ago

@Kautenja I think I have one more detail, but that's all I know. This occured when I force stop anything related to the library (model evaluation, prediction, etc.)