Spaces:
Runtime error
Runtime error
Commit
·
5a8160a
1
Parent(s):
29acba1
Run black formatter
Browse files- app.py +0 -1
- decider_utils.py +1 -1
- run_unit_tests.py +2 -3
app.py
CHANGED
@@ -167,7 +167,6 @@ with demo:
|
|
167 |
space_filler_3 = gr.Markdown(value="")
|
168 |
space_filler_4 = gr.Markdown(value="")
|
169 |
|
170 |
-
|
171 |
gr_n_turns_elapsed = gr.Textbox(label="N Turns Elapsed", value="0", interactive=False, visible=False)
|
172 |
gr_pls_be_patient = gr.HTML(PLEASE_BE_PATIENT_DIV)
|
173 |
gr_music_player = gr.HTML(MUSIC_PLAYER)
|
|
|
167 |
space_filler_3 = gr.Markdown(value="")
|
168 |
space_filler_4 = gr.Markdown(value="")
|
169 |
|
|
|
170 |
gr_n_turns_elapsed = gr.Textbox(label="N Turns Elapsed", value="0", interactive=False, visible=False)
|
171 |
gr_pls_be_patient = gr.HTML(PLEASE_BE_PATIENT_DIV)
|
172 |
gr_music_player = gr.HTML(MUSIC_PLAYER)
|
decider_utils.py
CHANGED
@@ -140,7 +140,7 @@ def special_case_is_action_lethal(text):
|
|
140 |
if keyword in text_l:
|
141 |
is_negotiation = True
|
142 |
break
|
143 |
-
|
144 |
if is_negotiation:
|
145 |
return NO
|
146 |
|
|
|
140 |
if keyword in text_l:
|
141 |
is_negotiation = True
|
142 |
break
|
143 |
+
|
144 |
if is_negotiation:
|
145 |
return NO
|
146 |
|
run_unit_tests.py
CHANGED
@@ -37,7 +37,7 @@ assert YES == decider_utils.special_case_is_action_lethal("I shoot him in the ch
|
|
37 |
assert YES == decider_utils.special_case_is_action_lethal("I shoot him right in the heart")
|
38 |
|
39 |
assert NO == decider_utils.special_case_is_action_lethal("say wait! I'm sure we can negotiate a fair price for your protection")
|
40 |
-
assert NO == decider_utils.special_case_is_action_lethal("say wait! I'm sure we can negotiate a fair price for your protection")
|
41 |
assert NO == decider_utils.special_case_is_action_lethal("I fire a shot into the air!")
|
42 |
assert NO == decider_utils.special_case_is_action_lethal("challenge him to a duel")
|
43 |
assert NO == decider_utils.special_case_is_action_lethal("I challenge him to a duel.")
|
@@ -61,7 +61,7 @@ assert NO == decider_utils.special_case_is_action_lethal("aim at the bandits")
|
|
61 |
# In this game we will have killing animals be allowed, even though I personally am a big propent of animal sentience.
|
62 |
assert NO == decider_utils.special_case_is_action_lethal("fire at the bear")
|
63 |
assert NO == decider_utils.special_case_is_action_lethal("shoot the bear")
|
64 |
-
# assert NO == decider_utils.special_case_is_action_lethal("shoot it")
|
65 |
assert NO == decider_utils.special_case_is_action_lethal("shoot the wolf")
|
66 |
assert NO == decider_utils.special_case_is_action_lethal("fire at the wolf")
|
67 |
assert NO == decider_utils.special_case_is_action_lethal("fire at the wolves")
|
@@ -72,7 +72,6 @@ assert NO == decider_utils.special_case_is_action_lethal("shoot the wolves")
|
|
72 |
# assert YES == decider_utils.special_case_is_action_lethal("I fire a shot over his head")
|
73 |
|
74 |
|
75 |
-
|
76 |
assert YES == decider_utils.special_case_is_magic("I fly straight up")
|
77 |
assert YES == decider_utils.special_case_is_magic("fly up")
|
78 |
assert YES == decider_utils.special_case_is_magic("turn invisible")
|
|
|
37 |
assert YES == decider_utils.special_case_is_action_lethal("I shoot him right in the heart")
|
38 |
|
39 |
assert NO == decider_utils.special_case_is_action_lethal("say wait! I'm sure we can negotiate a fair price for your protection")
|
40 |
+
assert NO == decider_utils.special_case_is_action_lethal("say wait! I'm sure we can negotiate a fair price for your protection") # This version with only 1 space is frequently a false positive.
|
41 |
assert NO == decider_utils.special_case_is_action_lethal("I fire a shot into the air!")
|
42 |
assert NO == decider_utils.special_case_is_action_lethal("challenge him to a duel")
|
43 |
assert NO == decider_utils.special_case_is_action_lethal("I challenge him to a duel.")
|
|
|
61 |
# In this game we will have killing animals be allowed, even though I personally am a big propent of animal sentience.
|
62 |
assert NO == decider_utils.special_case_is_action_lethal("fire at the bear")
|
63 |
assert NO == decider_utils.special_case_is_action_lethal("shoot the bear")
|
64 |
+
# assert NO == decider_utils.special_case_is_action_lethal("shoot it") # This test is failing
|
65 |
assert NO == decider_utils.special_case_is_action_lethal("shoot the wolf")
|
66 |
assert NO == decider_utils.special_case_is_action_lethal("fire at the wolf")
|
67 |
assert NO == decider_utils.special_case_is_action_lethal("fire at the wolves")
|
|
|
72 |
# assert YES == decider_utils.special_case_is_action_lethal("I fire a shot over his head")
|
73 |
|
74 |
|
|
|
75 |
assert YES == decider_utils.special_case_is_magic("I fly straight up")
|
76 |
assert YES == decider_utils.special_case_is_magic("fly up")
|
77 |
assert YES == decider_utils.special_case_is_magic("turn invisible")
|