simoninithomas/Deep_reinforcement_learning_Course

Default doom config doesn't set screen_buffer to greyscale anymore

PhillipMerritt opened this issue · 1 comments

I was having issues with the image transform function throwing an error due to what looked like receiving an empty image.

Traceback (most recent call last):
File "main.py", line 324, in
state, stacked_frames = stack_frames(stacked_frames, state, True)
File "main.py", line 128, in stack_frames
frame = preprocess_frame(state)
File "main.py", line 114, in preprocess_frame
preprocessed_frame = transform.resize(normalized_frame, [84, 84])
File "/home/phill/.local/lib/python3.6/site-packages/skimage/transform/_warps.py", line 169, in resize
preserve_range=preserve_range)
File "/home/phill/.local/lib/python3.6/site-packages/skimage/transform/_warps.py", line 896, in warp
_clip_warp_output(image, warped, order, mode, cval, clip)
File "/home/phill/.local/lib/python3.6/site-packages/skimage/transform/_warps.py", line 648, in _clip_warp_output
min_val = input_image.min()
File "/home/phill/.local/lib/python3.6/site-packages/numpy/core/_methods.py", line 32, in _amin
return umr_minimum(a, axis, None, out, keepdims, initial)
ValueError: zero-size array to reduction operation minimum which has no identity

After fiddling with everything I took a look at the default config file and noticed that it had the screen colors set to something besides greyscale so I updated it to:

screen_format = GRAY8

That seems to have fixed the issue. I'm not sure why, but you might want to add that to the instructions.

Hi,
Thanks for the info.
I'm currently updating all the implementations after a little break in the project stay tuned.