-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c33bd05
commit 05479a7
Showing
9 changed files
with
87 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
def get_minigrid_words(): | ||
colors = ["red", "green", "blue", "yellow", "purple", "grey"] | ||
objects = [ | ||
"unseen", | ||
"empty", | ||
"wall", | ||
"floor", | ||
"box", | ||
"key", | ||
"ball", | ||
"door", | ||
"goal", | ||
"agent", | ||
"lava", | ||
] | ||
|
||
verbs = [ | ||
"pick", | ||
"avoid", | ||
"get", | ||
"find", | ||
"put", | ||
"use", | ||
"open", | ||
"go", | ||
"fetch", | ||
"reach", | ||
"unlock", | ||
"traverse", | ||
] | ||
|
||
extra_words = [ | ||
"up", | ||
"the", | ||
"a", | ||
"at", | ||
",", | ||
"square", | ||
"and", | ||
"then", | ||
"to", | ||
"of", | ||
"rooms", | ||
"near", | ||
"opening", | ||
"must", | ||
"you", | ||
"matching", | ||
"end", | ||
"hallway", | ||
"object", | ||
"from", | ||
"room", | ||
"maze", | ||
] | ||
|
||
all_words = colors + objects + verbs + extra_words | ||
assert len(all_words) == len(set(all_words)) | ||
return {word: i for i, word in enumerate(all_words)} | ||
|
||
if __name__ == "__main__": | ||
# Test the minigrid words | ||
print(get_minigrid_words()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,3 @@ def interact_with_gpt(prompt): | |
request_timeout=10 | ||
) | ||
return output.choices[0].message['content'] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters