瀏覽代碼

README update - added tile encoding description (#106)

* README update - added tile encoding description 

 found it hard to understand how the tiles were being encoded - adding it to README will help future users.

* Update README.md

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
Jakub Kmec 4 年之前
父節點
當前提交
6e22a44dc6
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      README.md

+ 6 - 1
README.md

@@ -148,11 +148,16 @@ Actions in the basic environment:
 - Toggle (open doors, interact with objects)
 - Done (task completed, optional)
 
+Default tile/observation encoding:
+- Each tile is encoded as a 3 dimensional tuple: (OBJECT_IDX, COLOR_IDX, STATE) 
+- OBJECT_TO_IDX and COLOR_TO_IDX mapping can be found in [gym_minigrid/minigrid.py](gym_minigrid/minigrid.py)
+- e.g. door STATE -> 0: open, 1: closed, 2: locked
+
 By default, sparse rewards are given for reaching a green goal tile. A
 reward of 1 is given for success, and zero for failure. There is also an
 environment-specific time step limit for completing the task.
 You can define your own reward function by creating a class derived
-from `MiniGridEnv`. Extending the environment with new object types or action
+from `MiniGridEnv`. Extending the environment with new object types or new actions
 should be very easy. If you wish to do this, you should take a look at the
 [gym_minigrid/minigrid.py](gym_minigrid/minigrid.py) source file.