samrat-rm commited on
Commit
d29cfdb
·
1 Parent(s): 88c0fc2

feat: upgrading the inspect feedback function

Browse files
Files changed (1) hide show
  1. server/WhyDidItFail_environment.py +4 -3
server/WhyDidItFail_environment.py CHANGED
@@ -177,10 +177,11 @@ class WhyDidItFailEnvironment(Environment):
177
  if source in self.inspection_order:
178
  return f"You already examined the {label}. No new information gained."
179
  if source in required:
180
- remaining = len(set(required) - set(self.inspection_order) - {source})
181
  msg = f"You examined the {label}. Relevant clue found (+{reward:.2f})."
182
- if remaining > 0:
183
- msg += f" {remaining} required source(s) still unexamined."
 
184
  return msg
185
  return f"You examined the {label}. This source is not required for this failure mode."
186
 
 
177
  if source in self.inspection_order:
178
  return f"You already examined the {label}. No new information gained."
179
  if source in required:
180
+ remaining_sources = [s for s in required if s not in self.inspection_order and s != source]
181
  msg = f"You examined the {label}. Relevant clue found (+{reward:.2f})."
182
+ if remaining_sources:
183
+ next_source = f"inspect_{remaining_sources[0]}"
184
+ msg += f" {len(remaining_sources)} required source(s) still unexamined. Next required action: {next_source}."
185
  return msg
186
  return f"You examined the {label}. This source is not required for this failure mode."
187