File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
balrog/environments/babaisai Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ def get_ruleset(self):
3636 for rule in self .env .grid ._ruleset ["_rule_" ]:
3737 # all objects start with f, eg `fwall`, `fkey`...
3838 # are objects that can be manipulated, `wall` is used to indicate end of map
39+ if "object" not in rule : # BabaIsAI bug fix
40+ continue
3941 name = rule ["object" ].removeprefix ("f" )
4042 named_property = name_mapping [rule ["property" ]]
4143 rules .append (f"{ name } is { named_property } " )
@@ -115,6 +117,8 @@ def steps(v):
115117
116118 you = None
117119 for rule in self .env .grid ._ruleset ["_rule_" ]:
120+ if "property" not in rule : # BabaIsAI bug fix
121+ continue
118122 named_property = name_mapping [rule ["property" ]]
119123 if named_property == "you" :
120124 you = rule ["object" ]
You can’t perform that action at this time.
0 commit comments