Lilli98 commited on
Commit
de81e80
·
verified ·
1 Parent(s): cc1bad6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -8
app.py CHANGED
@@ -253,10 +253,15 @@ def get_llm_prompt(echelon_state_decision_point: dict, week: int, llm_personalit
253
  """
254
 
255
  elif info_sharing == 'full':
256
- # 1. HUMAN-LIKE / FULL (FIX v5): Anchors on *local* incoming order, despite seeing global info
257
- anchor_demand = e_state['incoming_order'] # <--- THIS IS THE FIX
 
 
 
 
 
258
  panicky_order = max(0, int(anchor_demand + stock_correction))
259
- panicky_order_calc = f"{anchor_demand} (Your Incoming Order) + {stock_correction} (Your Stock Correction)"
260
 
261
  # Build the "Full Info" string just for context
262
  full_info_str = f"\n**Full Supply Chain Information (State Before Shipping):**\n- End-Customer Demand this week: {current_stable_demand} units.\n"
@@ -269,15 +274,17 @@ def get_llm_prompt(echelon_state_decision_point: dict, week: int, llm_personalit
269
  {full_info_str}
270
 
271
  **A "Human-like" Flawed Decision:**
272
- Even though you have full information, you are judged by *your own* performance (your inventory, your backlog).
273
- You tend to **ignore the stable end-customer demand ({current_stable_demand})** and instead react to your *local* situation (like the classic Sterman 1989 model).
 
274
 
275
- **Your 'Panic' Calculation (Ignoring Full Info and Your Supply Line):**
276
- 1. **Anchor on *Your* Demand:** You just got an order for **{anchor_demand}** units. You panic and react to *this* number, not the stable end-customer demand.
 
277
  2. **Correct for *Your* Stock:** Your desired 'safe' inventory is {DESIRED_INVENTORY}. Your current net inventory is {net_inventory}. You need to order **{stock_correction}** more units.
278
  3. **Ignore *Your* Supply Line:** You'll ignore the **{supply_line} units** in your own pipeline ({supply_line_desc}).
279
 
280
- **Final Panic Order:** (Your Incoming Order) + (Your Stock Correction)
281
  * Order = {panicky_order_calc} = **{panicky_order} units**.
282
 
283
  **Your Task:** Confirm this 'gut-instinct', locally-focused {task_word}. Respond with a single integer.
 
253
  """
254
 
255
  elif info_sharing == 'full':
256
+ # 1. HUMAN-LIKE / FULL (FIX v6): Anchors on an *average* of local panic and global reality
257
+ local_anchor = e_state['incoming_order']
258
+ global_anchor = current_stable_demand
259
+
260
+ # The "conflicted" human anchor
261
+ anchor_demand = int((local_anchor + global_anchor) / 2)
262
+
263
  panicky_order = max(0, int(anchor_demand + stock_correction))
264
+ panicky_order_calc = f"{anchor_demand} (Conflicted Anchor) + {stock_correction} (Your Stock Correction)"
265
 
266
  # Build the "Full Info" string just for context
267
  full_info_str = f"\n**Full Supply Chain Information (State Before Shipping):**\n- End-Customer Demand this week: {current_stable_demand} units.\n"
 
274
  {full_info_str}
275
 
276
  **A "Human-like" Flawed Decision:**
277
+ You are judged by *your own* performance. You can see the stable End-Customer Demand is **{global_anchor}**, but you just received a panicky order for **{local_anchor}**.
278
+ Your "gut-instinct" is to split the difference, anchoring on an average of the two.
279
+ You still ignore your supply line, focusing only on your local stock.
280
 
281
+ **Your 'Panic' Calculation (Ignoring Supply Line, Averaging Anchors):**
282
+ 1. **Anchor on Conflict:** (Your Incoming Order + End-Customer Demand) / 2
283
+ * Anchor = ({local_anchor} + {global_anchor}) / 2 = **{anchor_demand}** units.
284
  2. **Correct for *Your* Stock:** Your desired 'safe' inventory is {DESIRED_INVENTORY}. Your current net inventory is {net_inventory}. You need to order **{stock_correction}** more units.
285
  3. **Ignore *Your* Supply Line:** You'll ignore the **{supply_line} units** in your own pipeline ({supply_line_desc}).
286
 
287
+ **Final Panic Order:** (Conflicted Anchor) + (Your Stock Correction)
288
  * Order = {panicky_order_calc} = **{panicky_order} units**.
289
 
290
  **Your Task:** Confirm this 'gut-instinct', locally-focused {task_word}. Respond with a single integer.