JEV ゲーム AI: NPC のリアルタイムの戦術的決定

JEV がどのようにゲーム ループに適合し、NPC が攻撃、撤退、回復、探索のいずれかを選択するのに役立ち、ビヘイビアー ツリーやゲーム コードと連携して動作する様子をご覧ください。

Seele Editorial TeamUpdated 2026年9月20日
Game NPCs coordinating attack, cover, healing, and retreat in a tactical arena.

JEV ゲーム AI は、NPC 意思決定のための戦術レイヤーとして最もよく理解されています。 NPC の動作をフレームごとに駆動しようとするわけではありません。代わりに、ゲームの意味のあるスナップショットを調べ、正当なインテントを選択し、エンジンがナビゲーション、アニメーション、能力、ルールを通じてそのインテントを実行できるようにします。ゲーム ループにはさまざまな種類の作業が含まれるため、この区別は重要です。レンダリングと物理演算はフレームごとに実行される場合があります。ナビゲーションとアニメーションは継続的に更新される場合があります。戦術的な決定は、多くの場合、イベント、タイマー、または状態の意味のある変化を待つことがあります。 JEV は、ループの低速で値の高い部分に属します。ゲーム ループ内のJEVはどこに該当します分隊ベースの遭遇を想像してみてください。 NPC の 1 人は体力が低下しており、敵が視界に入ってきており、近くの壁が遮蔽物を提供しており、分隊のヒーラーには使用可能な能力があります。ゲームは、これらのファクトをコンパクトな状態にシリアル化し、Legal Actions を公開し、JEV に次のインテントを選択するように要求できます。

カバーをして回復を要求などの応答は、通常のゲーム システムによって検証され、実行されます。観察:_ 権威ある世界から関連事実を収集するstate.

_フィルター:

前提条件が次のアクションを削除しますfalse。決定:_ 残りのアクションを目標、リスク、およびリソース。実行:_ 選択したインテントを移動、能力、アニメーションに送信しますシステム。再評価:_ アクションが完了したとき、無効になったとき、または状況に応じて再度呼び出します。変更_NPC はどの状態を公開する必要がありますか?良好な状態とは、網羅的なものではなく、意思決定に関連したものです。これには、健康とスタミナ、既知の敵、視線、援護候補、味方のニーズ、現在の目標、目標までの距離、クールダウン、弾薬、在庫、およびアクティブなアクションのステータスが含まれます。また、最後に観測された脅威や味方が最後に目撃された場所など、少量のメモリが含まれる場合もあります。世界中のすべてのオブジェクトを送信すると、決定の解釈が難しくなり、コストと遅延が増加します。コンパクトな状態コントラクトによりテストも改善されます。プロンプト、ポリシー、またはゲームバランスの変更後に、同じスナップショットを再生して Choice を比較できます。Legal Actions が重要な理由JEV は、ゲームがすでに承認したアクションから選択する必要があります。アクションには、名前、パラメータ、前提条件、予想される期間、コストを含めることができます。例には、_攻撃(ターゲットId)_、_moveTo(locationId)_、 _heal(targetId)_、_retreat(routeId)_、およびobserve(areaId)_.法的措置リストは、安全境界線であると同時に設計ツールでもあります。これにより、負傷した NPC が利用できない能力を選択することがなくなり、キャラクターができることをデザイナーが制御できるようになり、出力の検証が容易になります。アクションがリストにない場合、それはオプションではありません。JEV が攻撃、撤退、回復、探索を選択する方法JEV の決定は、アクションが実際のトレードオフを表す場合に役立ちます。攻撃すると脅威はすぐに除去される可能性がありますが、NPC が公開されます。退却すれば分隊は温存されるかもしれないが、目標は放棄される。治癒により生存率が向上する可能性がありますが、クールダウンが消費されます。探索すると、ルートやリソースが明らかになり、露出が増える可能性があります。モデルは、これらのトレードオフを意味のあるものにする目標と制約を受け取る必要があります。ゲームでは、範囲、所有権、クールダウン、衝突などの厳密なルールを定義する必要があります。設計者は、優先順位とリスク バジェットを使用して動作を形成することもできます。ボスとの遭遇はプレッシャーを好むかもしれませんが、コンパニオン NPC は生存と援助を好むかもしれません。これらの設定は、任意の散文の中に隠されるのではなく、州または政策契約の中で表示されるべきです。JEV がすべてのフレームを制御すべきではない理由フレームごとの制御により、不必要な遅延、コスト、ジッターが発生します。また、戦術的な意図と低レベルのステアリングを組み合わせますが、通常は決定論的なシステムの方が優れています。より安定したパターンは、目標が変更されたとき、アクションが終了したとき、脅威が出現したとき、目標を失ったとき、または決定タイマーが期限切れになったときに決定を求めることです。正確なリズムはゲームによって異なります。ターン制ゲームでは、ターンごとに 1 回決定することができます。リアルタイム戦術ゲームでは、アクティブな戦闘中に数百ミリ秒ごとに決定が行われ、イベントによって緊急の変更が要求されることがあります。探索ゲームの仲間が決断を下す頻度は低くなるかもしれません。適切な頻度とは、NPC の動作の応答性を維持しながら、動作する時間を与える周波数です。JEV および従来の NPC AIプロダクション NPC では、複数のシステムを組み合わせることができます。認識は事実を収集します。 JEV はインテントを選択します。ビヘイビア ツリーまたはステート マシンがインテントを実行します。ナビゲーションはルートを見つけます。アニメーションとアビリティは、プレゼンテーションとエフェクトを処理します。ゲームサーバーは権限を検証します。この分離により、各システムのプロファイリングと交換が容易になります。JEV が使用できない場合、または無効な Choice が返された場合、NPC は作成されたポリシーにフォールバックできます。たとえば、警備員は最も近い安全なポイントに後退したり、仲間が物陰に隠れたりすることができます。 フォールバック はシステムに障害が発生したことを示すものではありません。これは堅牢なゲーム設計の一部です。実際の導入チェックリスト_1 つの NPC ロールと 3 ~ 6 つの意味のあるアクションから始めます。状態スキーマを十分に小さくしてください。ログで検査します。現在の権限のある状態に対してすべての応答を検証します。意思決定バジェットとクリアを使用します。タイムアウト。リプレイ テストの状態、Legal Actions、応答、および結果を記録します。戦術的な品質を個別に測定します。レイテンシとインフラストラクチャのコスト一般的な定義と比較については、JEV とは何ですか? を参照してください。完全な実装パスについては、JEV チュートリアル_. に進んでください。

  1. Observe: collect relevant facts from the authoritative world state.
  2. Filter: remove actions whose preconditions are false.
  3. Decide: compare the remaining actions against goals, risk, and resources.
  4. Execute: send the selected intent to movement, ability, and animation systems.
  5. Re-evaluate: call again when the action completes, becomes invalid, or the situation changes.

What state should an NPC expose?

Good state is decision-relevant rather than exhaustive. It can include health and stamina, known enemies, line of sight, cover candidates, ally needs, current objective, distance to targets, cooldowns, ammunition, inventory, and the status of an active action. It can also include a small amount of memory, such as the last observed threat or the last location where an ally was seen.

Sending every object in the world makes a decision harder to interpret and increases cost and latency. A compact state contract also improves testing: the same snapshot can be replayed to compare choices after a prompt, policy, or game-balance change.

JEV should choose from actions the game has already approved. An action can include a name, parameters, preconditions, expected duration, and a cost. Examples include attack(targetId), moveTo(locationId), heal(targetId), retreat(routeId), and observe(areaId).

The legal-action list is both a safety boundary and a design tool. It prevents a wounded NPC from selecting an unavailable ability, gives designers control over what a character can do, and makes the output easy to validate. If an action is not in the list, it is not an option.

How JEV chooses attack, retreat, heal, or explore

JEV decisions become useful when actions represent real trade-offs. Attacking may remove a threat quickly but expose the NPC. Retreating may preserve the squad but abandon an objective. Healing may improve survival but consume a cooldown. Exploring may reveal a route or resource while increasing exposure. The model should receive the goal and constraints that make these trade-offs meaningful; the game should still define hard rules such as range, ownership, cooldown, and collision.

Designers can also shape behavior with priorities and risk budgets. A boss encounter may favor pressure, while a companion NPC may favor survival and assistance. Those preferences should be visible in the state or policy contract rather than hidden in arbitrary prose.

Why JEV should not control every frame

Frame-by-frame control creates unnecessary latency, cost, and jitter. It also mixes tactical intent with low-level steering, where deterministic systems are usually better. A more stable pattern is to ask for a decision when a goal changes, an action finishes, a threat appears, a target is lost, or a decision timer expires.

The exact cadence depends on the game. A turn-based game may decide once per turn. A real-time tactics game may decide every few hundred milliseconds during active combat, with event-triggered calls for urgent changes. A companion in an exploration game may decide less often. The right frequency is the one that gives the NPC time to act while keeping its behavior responsive.

JEV and traditional NPC AI

A production NPC can combine several systems. Perception gathers facts. JEV selects an intent. A behavior tree or state machine executes the intent. Navigation finds a route. Animation and abilities handle presentation and effects. The game server validates authority. This separation makes each system easier to profile and replace.

When JEV is unavailable or returns an invalid choice, the NPC can fall back to an authored policy. For example, a guard can retreat to the nearest safe point, or a companion can stay behind cover. A フォールバック is not a sign that the system failed; it is part of a robust game design.

A practical adoption checklist

  • Start with one NPC role and three to six meaningful actions.
  • Keep the state schema small enough to inspect in a log.
  • Validate every response against the current authoritative state.
  • Use a decision budget and a clear timeout.
  • Record state, legal actions, response, and outcome for replay testing.
  • Measure tactical quality separately from latency and infrastructure cost.

For the general definition and comparisons, read What Is JEV?. For a complete implementation path, continue to the JEV tutorial.