cair / deep-rts

A Real-Time-Strategy game for Deep Learning research
MIT License
202 stars 34 forks source link

Example Not working! #17

Open osoblanco opened 4 years ago

osoblanco commented 4 years ago

After installing DeepRts I cannot run the code as it is either missing dependencies or smth. like that.

AttributeError: 'DeepRTS.Engine.Config' object has no attribute 'set_start_wood'
perara commented 4 years ago

I assume you ran the code in the README.md. This is probably outdated, how much, I don't know. See the examples in the coding directory :)

osoblanco commented 4 years ago

Oh ok. Also After starting the rendering should the window turn grey after a while ? Screenshot from 2020-06-25 14-13-14

perara commented 4 years ago

Does it render stuff at all, or just the first picture? If it doesn't render at all it means that you have to explicitly call the render function to draw the pixel buffer onto your screen :)

If I've deactivated that by default it is because it boosts the speed significantly

osoblanco commented 4 years ago

AAA ok. It does render everything for several seconds and then suddenly goes grayscale while still rendering all the actions. How exactly can I do rendering completely?

carlosgmartin commented 4 years ago

Can the top-level README example be updated (or perhaps moved entirely to the coding directory, with a link to the file), since the main.py example in the coding directory lacks illustration of certain features like rendering and configuration? I fixed two errors so far, changing set_start_wood to set_start_lumber and GoldThousand to GoldCollectOnePlayerFifteen. However, I still get

Traceback (most recent call last):
  File "example.py", line 42, in <module>
    env = scenario.GoldCollectOnePlayerFifteen(game)
  File "/usr/local/lib/python3.8/site-packages/DeepRTS/python/scenario/envs.py", line 10, in __init__
    engconf = config["engine"] if "engine" in config else {}
TypeError: argument of type 'Game' is not iterable

(relevant code here) as well as TypeError: step() got an unexpected keyword argument 'render' (relevant code here).

This game environment looks very promising, so a fully working example would be very helpful for new users.

Side question: Are there plans to add fog-of-war soon, as mentioned in the paper?