▸case-01 In C++, implement a health utility evaluator for an NPC combat bot. The raw health input ranges from 0 to 200 HP, but the downstream action selector expects standardized inputs. You might be tempted to pass raw HP directly into the decision engine. Write the function that converts raw HP into a standard evaluation metric. | pass→pass | 19,118 | 31,187 | +63% | 1 | 1 | 0% | 3,000 | 2,782 | -7% | 0 | 0 | — |
▸case-02 Write a Python evaluation function for an NPC decision system that measures danger based on distance to an enemy (0 to 50 meters). Standard linear scaling makes the NPC react linearly across all distances, but tactical threat increases sharply when approaching close range. Provide the mathematical function or code to transform distance into an urgency score. | pass→fail | 14,570 | 13,251 | -9% | 1 | 1 | 0% | 2,706 | 2,505 | -7% | 0 | 0 | — |
▸case-03 In C#, build an action selection system for an autonomous agent that evaluates three candidate actions (Eat, Sleep, Defend) each returning a calculated score between 0.0 and 1.0. Rather than using an if-else chain that always checks Defend first regardless of values, how should the final action be chosen from the evaluated candidates? | pass→pass | 16,389 | 22,164 | +35% | 1 | 1 | 0% | 2,699 | 3,532 | +31% | 0 | 0 | — |
▸case-04 An AI bot constantly switches between 'Patrol' and 'Investigate' every tick because their calculated scores fluctuate between 0.70 and 0.71. Implement a mechanism in C# for score evaluation that prevents rapid, jittery action switching without changing the underlying environment signals. | pass→pass | 17,016 | 16,370 | -4% | 1 | 1 | 0% | 3,087 | 3,226 | +5% | 0 | 0 | — |
▸case-05 An NPC is evaluating the action 'Attack Enemy'. The action depends on two factors: target line-of-sight (0 or 1) and weapon ammo score (0.0 to 1.0). If you simply sum these scores, an NPC with 0 ammo might still attempt to attack if line-of-sight is 1. How should these two factor scores be combined? | pass→pass | 11,661 | 7,929 | -32% | 1 | 1 | 0% | 1,925 | 1,421 | -26% | 0 | 0 | — |
▸case-06 In a game AI decision engine, an agent evaluates 'Self Preservation' and 'Loot Collection'. Both produce normalized 0.0-1.0 scores, but survival should inherently matter more than collecting coins under equal conditions. Implement a combination method that reflects this structural priority difference. | fail→fail | 22,541 | 22,168 | -2% | 1 | 1 | 0% | 3,721 | 3,850 | +3% | 0 | 0 | — |
▸case-07 For a grid-based tactical game AI, write a spatial consideration function in Python that evaluates distance score between the agent and a target tile where diagonal movement costs the same as cardinal movement (8-way movement). Linear Euclidean distance calculation is often the default choice, but does not fit grid movement. | pass→pass | 19,965 | 14,523 | -27% | 1 | 1 | 0% | 3,085 | 2,892 | -6% | 0 | 0 | — |
▸case-08 An agent evaluates several low-priority idle actions, all returning values between 0.01 and 0.05. A base model might execute whichever is 0.05 even if it represents near-zero real utility. How should the action selector filter actions before executing the highest candidate? | pass→pass | 16,167 | 11,999 | -26% | 1 | 1 | 0% | 2,562 | 1,848 | -28% | 0 | 0 | — |
▸case-09 Write a TypeScript function that evaluates cover spot desirability based on distance from the NPC. Instead of using a simple linear decrease where utility drops uniformly per meter, model rapid loss of desirability as distance grows past immediate reach. | fail→pass | 17,601 | 15,662 | -11% | 1 | 1 | 0% | 3,209 | 2,952 | -8% | 0 | 0 | — |
▸case-10 An NPC spellcaster scores the 'Fireball' spell at 0.95 utility based on enemy density. However, Fireball is currently on a 10-second cooldown. Instead of removing Fireball from the action list or throwing an exception, how should the scoring function handle action availability? | pass→pass | 16,155 | 12,995 | -20% | 1 | 1 | 0% | 2,431 | 2,056 | -15% | 0 | 0 | — |
▸case-11 A game developer wants NPC decision making to feel less deterministic while still favoring high-scoring actions over low-scoring ones. Simple argmax selection is too predictable, while pure uniform random selection ignores scores. Write a Python function for selecting an action given a list of action-score pairs. | fail→pass | 13,073 | 14,859 | +14% | 1 | 1 | 0% | 2,584 | 2,208 | -15% | 0 | 0 | — |
▸case-12 Implement an action evaluator for 'Sprint to Cover' in C#. The evaluator considers distance to cover (closer is better) and current stamina reserves (higher is better). How should benefit and resource cost factors be integrated into a unified action score? | pass→pass | 18,366 | 19,122 | +4% | 1 | 1 | 0% | 3,408 | 3,208 | -6% | 0 | 0 | — |
▸case-13 Write a threat evaluator for a stealth game AI in Python. When multiple guards are near the player, taking a simple count of guards leads to linear scaling regardless of proximity. Write a scoring function where nearby guards contribute significantly more to the total threat value than far away guards. | pass→pass | 23,731 | 23,258 | -2% | 1 | 1 | 0% | 3,666 | 3,719 | +1% | 0 | 0 | — |
▸case-14 An AI squad member needs to pick a target enemy from a list of 5 candidates. Naive target selection simply picks the closest enemy. Implement a scoring algorithm in C# that balances enemy distance, remaining enemy HP, and whether the enemy is targeting a squad mate. | pass→pass | 17,977 | 23,491 | +31% | 1 | 1 | 0% | 3,601 | 3,472 | -4% | 0 | 0 | — |
▸case-15 In a combat simulation, an NPC flips back and forth between 'Flee' and 'Attack' every frame because health fluctuates right around 30%. Implement a state stickiness mechanism in Python without converting the system into a rigid Finite State Machine. | pass→pass | 15,333 | 23,158 | +51% | 1 | 1 | 0% | 2,798 | 4,628 | +65% | 0 | 0 | — |
▸case-16 Design a data structure and evaluation log in C++ for debugging complex AI decision choices. Developers need to inspect why an agent chose 'Reload' over 'Shoot'. What details must the evaluation result include beyond the final selected action name? | pass→pass | 21,053 | 15,989 | -24% | 1 | 1 | 0% | 3,962 | 3,067 | -23% | 0 | 0 | — |
▸case-17 In a game AI decision engine using multiplicative scoring, if one consideration drops to 0.1, the overall score drops dramatically even if five other considerations are 1.0. How can a developer adjust considerations so essential factors strictly zero out scores while non-essential factors moderately modify the score? | pass→pass | 20,513 | 19,361 | -6% | 1 | 1 | 0% | 2,952 | 2,836 | -4% | 0 | 0 | — |
▸case-18 Write a Python function for an idle worker NPC evaluating the 'Rest' action. The worker's tiredness metric stays low for a long time, but as time since last rest increases, urgency to rest should grow non-linearly. Implement the score calculation. | fail→fail | 15,761 | 11,778 | -25% | 1 | 1 | 0% | 2,477 | 2,284 | -8% | 0 | 0 | — |
▸case-19 Design a Classic Finite State Machine (FSM) in C# for a simple guard NPC with states Guard, Chase, and Attack. Define the state transition table and explicit event handlers like OnEnemySpotted and OnTargetLost. | pass→pass | 15,531 | 22,311 | +44% | 1 | 1 | 0% | 3,108 | 3,732 | +20% | 0 | 0 | — |
▸case-20 Implement a standard Behavior Tree Selector node in C++ that manages child nodes (Sequence, Leaf). Describe how tick() traverses children and returns SUCCESS, FAILURE, or RUNNING. | pass→pass | 18,052 | 23,013 | +27% | 1 | 1 | 0% | 3,515 | 3,583 | +2% | 0 | 0 | — |
▸case-21 Write a Goal-Oriented Action Planner (GOAP) step solver in Python that uses A* search over state vectors to find a sequence of actions satisfying a goal state like 'enemy_is_dead = True'. | pass→pass | 26,194 | 14,394 | -45% | 1 | 1 | 0% | 4,298 | 3,144 | -27% | 0 | 0 | — |
▸case-22 In a C# evaluation routine, after multiplying base utility by situational bonus multipliers, the resulting score value reaches 1.45. Write the final normalization step to guarantee the score remains within valid decision bounds. | fail→pass | 17,883 | 11,775 | -34% | 1 | 1 | 0% | 981 | 1,701 | +73% | 0 | 0 | — |