facebookresearch/minihack

[BUG] Broken monster generation from des file

Closed this issue ยท 2 comments

๐Ÿ› Bug

I'm trying to generate different levels using des files. It works fine when I'm using just map. But MONSTER brakes env: instead of my map it returns some different random levels

To Reproduce

Steps to reproduce the behavior:

  1. Generate env with MONSTER
  2. Try to render it with get_des_file_rendering

this generates random levels:

from minihack.tiles.rendering import get_des_file_rendering
import IPython.display
def render_des_file(des_file, **kwargs):
    image = get_des_file_rendering(des_file, **kwargs)
    IPython.display.display(image)

des = """
MAZE: "mylevel", ' '
FLAGS:premapped
GEOMETRY:center,center

MAP
.....
.....
L....
..L..
|....
ENDMAP

STAIR:(4, 4),down
BRANCH: (0,0,0,0),(1,1,1,1)
MONSTER:'v',"dust vortex",(0,4)
"""
render_des_file(des, n_images=2, full_screen=False)

this works ok:

des = """
MAZE: "mylevel", ' '
FLAGS:premapped
GEOMETRY:center,center

MAP
.....
.....
L....
..L..
|....
ENDMAP

STAIR:(4, 4),down
BRANCH: (0,0,0,0),(1,1,1,1)
"""
render_des_file(des, n_images=2, full_screen=False)

Expected behavior

Env consists of map described is des file

Environment

Collecting environment information...
MiniHack version: 0.1.3
NLE version: 0.8.1
Gym version: 0.21.0
PyTorch version: 1.12.0+cu113
Is debug build: No
CUDA used to build PyTorch: 11.3

OS: Ubuntu 18.04.5 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.22.5

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: Tesla T4
Nvidia driver version: 460.32.03
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.0.5

Versions of relevant libraries:
[pip3] numpy==1.21.6
[pip3] torch==1.12.0+cu113
[pip3] torchaudio==0.12.0+cu113
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.13.0
[pip3] torchvision==0.13.0+cu113
[conda] Could not collect

This might be from the wrong syntax of your monster line. Could you try MONSTER: ('v',"dust vortex"), (1,1)?

@salamantos I've just tried the suggestion above and it worked. Feel free to reopen if there are further questions.