Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions balrog/environments/babaisai/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def get_ruleset(self):
for rule in self.env.grid._ruleset["_rule_"]:
# all objects start with f, eg `fwall`, `fkey`...
# are objects that can be manipulated, `wall` is used to indicate end of map
if "object" not in rule: # BabaIsAI bug fix
continue
name = rule["object"].removeprefix("f")
named_property = name_mapping[rule["property"]]
rules.append(f"{name} is {named_property}")
Expand Down Expand Up @@ -115,6 +117,8 @@ def steps(v):

you = None
for rule in self.env.grid._ruleset["_rule_"]:
if "property" not in rule: # BabaIsAI bug fix
continue
named_property = name_mapping[rule["property"]]
if named_property == "you":
you = rule["object"]
Expand Down
Loading