facebookresearch / nle

The NetHack Learning Environment
Other
940 stars 114 forks source link

Play visualization #317

Closed kimbring2 closed 2 years ago

kimbring2 commented 2 years ago

Hello,

I was inspired by the one of the NetHack projects of NeurIPS 2021.

They implemented the GUI to show the game state. I think it is helpful to play games as a human player.

I could add a code from that project to the NLE of this repo like the below image.

nle_visualization_v1 4

I will add more functions soon.

Thank you

heiner commented 2 years ago

Hey!

It might make sense to not include the glyph2tile array as data but use this instead: https://github.com/facebookresearch/nle/pull/288 (example usage).

I'll leave this to @condnsdmatters though.

kimbring2 commented 2 years ago

@heiner Thank you for your checking. I did not know the NLE already has the glyph2tile array. I will modify the code.

And I appreciate you forwarding my work to your colleague :100:

cdmatters commented 2 years ago

Hi @kimbring2, thanks for your PR! Sorry, I've been out on leave the past week but I'm back today and will check this out in more detail this week. Thanks @heiner for flagging. :)

cdmatters commented 2 years ago

Hey @kimbring2.

Thanks once again for your interest in NLE, and for this vizualiser that you've put together.

Looking at the PR, it seems to me that the main contribution of this PR is a modified play.py script, that effectively plays the game through your windowed display, with none of the code requiring any modification to the NLE environment, or the NetHack game.

While such a tool would undoubtedly be useful to some of the NLE community, I suggest it be open-sourced separately, perhaps hosted on your own GitHub account? We would be more than happy to point to such a tool on the NLE README.md (subject to us testing it first!), and that would also boost the discovery of the repo.

I think this is probably the best way for us to move forward, as it reduces code bloat for core NLE while also allowing you the flexibility to extend and expand the vizualiser as you see fit. It would also allow people with an interest in NLE to find your play script through this repo easily.

What do you think?

kimbring2 commented 2 years ago

@condnsdmatters Hello, Condnsdmatters. Thank you for your review.

It looks better idea to create a separate repository and refer to the README instead of adding it to the original NLE code directly like your opinion.

I host my GUI code to my repo. Please understand that the repo name is MMORPG because I am planning to extend the RL algorithm of NetHack to the more complex RPG game.

I think the NetHack is the best start environment for the MMORPG domain.

Thank you for making the awesome project.

Thank you again for your opinion :100: