RGB values from Flash games


#1

Hi,

I’m new to this, but I’m trying to write my own AI bot to play some of the flash games (DuskDriver, et al), but I can’t seem to figure out how to get the pixels from the game. When I print the observation_n from the DuskDriver example code after the env.step() all I get are a 1x3x3 array with 0s in it. I was expecting to see a 3x768x1024 sized array. I have the example code running and the only change I have made is to print the observation_n after the step function.

What am I missing? I’ve googled around and can’t find any example code that plays any of the flash driving games so I’m not sure what to do.

Any help would be greatly appreciated!


#2

To add to this: here is what I see when I print out an observation:

{‘text’: [], ‘vision’: array([[[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
…,
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    ...,
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    ...,
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   ...,

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    ...,
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    ...,
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    ...,
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]]], dtype=uint8)}

I’m expecting the values to be non-zero here, but clearly they are zero.

Anyone able to help? Am I missing something simple?