davide97l / rl-policies-attacks-defenses

Adversarial attacks on Deep Reinforcement Learning (RL)
MIT License
76 stars 12 forks source link

a puzzle about the input of strategical timed attack #24

Closed GongYanfu closed 1 year ago

GongYanfu commented 1 year ago

Do you understand why the input of strategical timed attack is four images? what's the function of these four images?

GongYanfu commented 1 year ago

It seems that the shape of all observations got from env is 4x84x84. is it gray image, not rgb image?

davide97l commented 1 year ago

The reason is that for atari games usually an observation consists of 4 stacked frames so as to encode temporal information. That's not specific of strategical timed attack. All observations are also converted to gray image (84x84) and becomes 4x84x84 after frames stacking.

GongYanfu commented 1 year ago

yeah now I understand. but the input of my model is only one rgb image, I think fro the rgb input image I need do some modify on your code.

davide97l commented 1 year ago

Yes in this case you need to modify the code, but usually is more efficient to train on grayscale images, as an experiment you could try both ways.

GongYanfu commented 1 year ago

ok, thanks for your suggestion. I'll try