Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Quality of Life improvements for World action and vocabulary space (#…
Browse files Browse the repository at this point in the history
…330)

* Adding World.get_vocab()

* Adding TellEvent to get_possible_actions

* first pass at get_action_space implementation

* Now tested
  • Loading branch information
JackUrb authored Dec 9, 2022
1 parent 6defef6 commit c2e5205
Show file tree
Hide file tree
Showing 8 changed files with 697 additions and 103 deletions.
24 changes: 6 additions & 18 deletions deploy/web/builderapp/src/Copy/DummyData.js
Original file line number Diff line number Diff line change
Expand Up @@ -1171,9 +1171,7 @@ const ComplexWorld1 = {
},
db_id: null,
desc: "There's a bit of dust.",
extra_desc: [
"Sometimes things are just what they seem. There's nothing interesting here."
],
extra_desc: "Sometimes things are just what they seem. There's nothing interesting here.",
grid_location: [
2,
1,
Expand Down Expand Up @@ -2408,9 +2406,7 @@ const ComplexWorld1 = {
},
db_id: null,
desc: "There's a bit of dirt.",
extra_desc: [
"Sometimes things are just what they seem. There's nothing interesting here."
],
extra_desc: "Sometimes things are just what they seem. There's nothing interesting here.",
grid_location: [
4,
4,
Expand Down Expand Up @@ -3276,9 +3272,7 @@ const ComplexWorld1 = {
},
db_id: null,
desc: "There's a bit of water.",
extra_desc: [
"Sometimes things are just what they seem. There's nothing interesting here."
],
extra_desc: "Sometimes things are just what they seem. There's nothing interesting here.",
grid_location: [
4,
0,
Expand Down Expand Up @@ -8920,9 +8914,7 @@ const ComplexWorld1 = {
},
db_id: null,
desc: "There's a bit of water.",
extra_desc: [
"Sometimes things are just what they seem. There's nothing interesting here."
],
extra_desc: "Sometimes things are just what they seem. There's nothing interesting here.",
grid_location: [
2,
4,
Expand Down Expand Up @@ -9530,9 +9522,7 @@ const ComplexWorld1 = {
},
db_id: null,
desc: "There's a bit of dust.",
extra_desc: [
"Sometimes things are just what they seem. There's nothing interesting here."
],
extra_desc: "Sometimes things are just what they seem. There's nothing interesting here.",
grid_location: [
6,
2,
Expand Down Expand Up @@ -9750,9 +9740,7 @@ const ComplexWorld1 = {
},
db_id: null,
desc: "There's a bit of dirt.",
extra_desc: [
"Sometimes things are just what they seem. There's nothing interesting here."
],
extra_desc: "Sometimes things are just what they seem. There's nothing interesting here.",
grid_location: [
6,
5,
Expand Down
6 changes: 4 additions & 2 deletions light/data_model/filler_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def build_filler_rooms_from_categories(category_set):
"This is a run down [FILL], it looks [OBSTACLE].",
"There's a bit of [CHARACTERISTIC].",
]
background = [
backgrounds = [
"Sometimes things are just what they seem. There's nothing interesting here."
]

Expand All @@ -160,6 +160,8 @@ def build_filler_rooms_from_categories(category_set):
description = description.replace(
"[CHARACTERISTIC]", random.choice(characteristics)
)
build_room = FillerRoom(category, name, description, background)
build_room = FillerRoom(
category, name, description, random.choice(backgrounds)
)
filler_rooms[category].append(build_room)
return filler_rooms, set(filler_room_names)
9 changes: 9 additions & 0 deletions light/graph/events/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class GraphEvent(object):
# then many possible synonyms as possible.
# Events that can only be triggered do not have to set anything.
NAMES: List[str] = []
# All invokable events should define at least one template
TEMPLATES: List[str] = []

def __init__(
self,
Expand Down Expand Up @@ -265,6 +267,13 @@ def to_frontend_form(self, viewer: "GraphAgent") -> Dict[str, Any]:
"objects": present_objects_dict,
}

@classmethod
def get_vocab(cls) -> List[str]:
"""
Return the vocabulary this event uses
"""
return []


class ErrorEvent(GraphEvent):
"""
Expand Down
Loading

0 comments on commit c2e5205

Please sign in to comment.