
Figure 1
NLE Language Wrapper Block Diagram.

Figure 2
These figures show the computation flow for converting glyphs to the language observation. Figure 2a shows how for each glyph we compute the distance, direction and entity strings to produce a triple. Figure 2b shows the mapping for the collection of triples to the language observation, with example data on the right-hand side.

Figure 3
In this figure, the player is represented by the @ symbol in the center. The color bands around the player represent distances, that are defined in the legend on the right. Glyphs that lie on cardinal or inter-cardinal directions (e.g. north, northeast, east) are defined as being in the direction they lie on. Glyphs that are located between the cardinal and inter-cardinal directions are assigned the direction of the direction band they fall within (e.g. northnortheast), regardless of their exact position within the band. Using this chart we can see how for any glyph position, the distances and directions can be quantized to text relative to the player.

Figure 4
The screen in Figure 4a shows the glyphs included in the language observation listed in Figure 4b. The elements and rays from the Visual View are indicated with red, and the elements from the Fullscreen View are indicated with blue.
Table 2
Average reward Mean (Standard Deviation) of 3 runs for 1B steps.
| EXPERIMENT | AVG REWARD |
|---|---|
| sample factory baseline | 566 (16) |
| language wrapper | 695 (22) |
Table 3
NLE Language Wrapper integration tests.
| TEST NAME | RESULT |
|---|---|
| test_message_spell_menu | PASSED |
| test_message_more_end | PASSED |
| test_message_full_stop_end | PASSED |
| test_message_bracket_end | PASSED |
| test_message_parenthesis_end | PASSED |
| test_message_multipage | PASSED |
| test_message_takeoffall | PASSED |
| test_filter_map_from_conduct | PASSED |
| test_empty_tty_chars_returns_empty_message | PASSED |
| test_filter_map_from_name | PASSED |
| test_filter_map_travel | PASSED |
| test_create_env_real | PASSED |
| test_env_language_action_space | PASSED |
| test_env_discrete_action_space | PASSED |
| test_env_obsv_space | PASSED |
| test_step_real | PASSED |
| test_step_invalid_action | PASSED |
| test_action_actions_maps_reflect_valid_actions | PASSED |
| test_step_valid_action_not_supported | PASSED |
| test_obsv_fake | PASSED |
| test_blstats_condition_none | PASSED |
| test_blstats_condition_flying | PASSED |
| test_multiple_obsv_fake | PASSED |
| test_step_fake | PASSED |
| test_statue | PASSED |
| test_warning | PASSED |
| test_swallow | PASSED |
| test_zap_beam | PASSED |
| test_explosion | PASSED |
| test_illegal_object | PASSED |
| test_weapon | PASSED |
| test_armour | PASSED |
| test_ring | PASSED |
| test_amulet | PASSED |
| test_tool | PASSED |
| test_food | PASSED |
| test_potion | PASSED |
| test_scroll | PASSED |
| test_spellbook | PASSED |
| test_wand | PASSED |
| test_coin | PASSED |
| test_gem | PASSED |
| test_rock | PASSED |
| test_ball | PASSED |
| test_chain | PASSED |
| test_venom | PASSED |
| test_ridden | PASSED |
| test_corpse | PASSED |
| test_invisible | PASSED |
| test_detected | PASSED |
| test_tame | PASSED |
| test_monster | PASSED |
| test_plural_end_ey | PASSED |
| test_plural_end_y | PASSED |
| test_plural_default | PASSED |
| test_plural_end_s | PASSED |
| test_plural_end_f | PASSED |
| test_plural_end_ff | PASSED |
| test_plural_lava | PASSED |
| test_wrapper_only_works_with_nle_envs | PASSED |
| test_wrapper_requires_all_keys | PASSED |
| test_play | PASSED |
| test_time_reset | PASSED |
| test_time_step | PASSED |
Table 4
List of core dependencies for the wrapper. The Component column identifies what the dependency is required for, where those marked base are required to use the wrapper, dev are required for development, and agent are required to train or run the included sample factory agent. The Dependency column specifies the library name and the version. Finally, the Function column specifies the role of the library in the project.
| COMPONENT | DEPENDENCY | FUNCTION |
|---|---|---|
| base | gym>=0.15, gym<=0.23 | Wrapper base class |
| base | minihack>=0.1.3 | Enable wrapper for MiniHack |
| base | nle==0.8.1 | Base environment |
| base | pybind11>=2.9 | Implement high performance functions |
| dev | black>=22.6.0 | Formatting Python |
| dev | flake8>=4.0.1 | Linting Python |
| dev | pytest>=7.1.2 | Test framework |
| dev | pytest-cov>=3.0.0 | Test coverage |
| dev | pytest-mock>=3.7.0 | Test mocks |
| dev | pygame>=2.1.2 | Used for specific test |
| dev | isort>=5.10.1 | Sort dependencies |
| dev | numpy>=1.21.0 | Used for test framework |
| agent | sample_factory>=1.121.4 | RL framework |
| agent | transformers>=4.17.0 | Language model for agent |
