Presentation is loading. Please wait.

Presentation is loading. Please wait.

The general Game AI concept

Similar presentations

Presentation on theme: "The general Game AI concept"— Presentation transcript:

1 Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

2 The general Game AI concept

3 AI for Fighting

4 AI for Fighting - Analysis
Attack Point – High, Medium, Low Defense Point – High, Medium, Low Professional Attack Distance – Long, Middle, Short Movement ability – Dash, Run, Walk, Jump

5 AI for Fighting – Attack / Defense
Case HP / Status Attack Type Range: Short Attack Type Range: Mid Attack Type Range: Long Rival Distance Output Action 1 High / Stand High Damage Long Idle NIL Mid – Range 1. Dash front 2. Attack in short distance 2 Low / Stand Low Damage Very Short Idle Medium Damage Long Idle Far 1. Stay 2. Attack in long distance 3 Medium / Stand High Damage Short Idle Low Damage Short Idle Medium Damage Very Long Idle Near 1. Dash Back 2. Attack in mid distance 4 Medium / Be Attack 1. Blocking 2. Combo Attack

6 AI for Action Game Move Closer To Player Dash Attack Combo Attack
Tactic Rank AI Skill Tactic Big Boss Smart walk, run, dash attack, normal attack, combo attack, special attack For example, move to player backward when player is fighting with others. Small Boss walk, run, dash attack, normal attack, combo attack No Normal Soldier Normal walk, normal attack, combo attack

7 Pathfinding

8 Dijkstra's Algorithm

9 Dijkstra's Algorithm

10 A* (A Star) Algorithm Heuristic Estimation Weight of path
Cost Comparing

11 Concept of A* (A Star) Add the starting node (tile) to the open list.
Look for the lowest F cost node on the open list. We refer this as the current node. The node move from open list to close list. For each of the 4 nodes, top, right, down and left adjacent to this current node. If nodes note closed or not reachable then skip them. If the node is in the open list already, check the G cost. Select the linked note of lowest G with cost 1. If the node is not in the open list, then add to open list. Repeat step 2 to step 4 until found the target node (tile) and return the path. But if the open list is empty and not reaching the target tile yet that means you can't reach the target node and return false.

12 A* (A Star) Algorithm

13 A* (A Star) Algorithm

14 SLG Analysis Component
Goals Resource Soldiers Workers Building Current Team Format Map / Global Status Time Prediction

15 Making Decision Movement Attack Healing

16 Fuzzy Logic Degrees of value Fuzzy State Machine
If True is 1, False is 0. We should have 0.1 fuzzy values, which near false but not absolutely false. Fuzzy State Machine When design AI State machine, we should apply fuzzy values for state controlling and state presentation

17 Traditional fuzzy state machine
Number of Variable Number of value exist in each variable Total rules generation 2 5 52 = 25 3 53 = 125 4 54 = 625 55 = 3125 6 56 = 15625

18 Traditional fuzzy state machine (Example)
My Team Scale Enemy Team Scale My Team Attacking Status Strong Attack Carefully Average Attack Weak Full Attack Runaway

19 Combs method William E. Combs designed a method to prevent combinatorial explosion in fuzzy logic rules. The method describes the direct relationship between every variable and the fuzzy value of state. AI system then combines all results to generate the final result.

20 Combs method (Example)
Variable : Value Attacking Status My Team Scale: Strong Full Attack (90%) My Team Scale: Average Attack (60%) My Team Scale: Weak Attack Carefully (30%) Enemy Team Scale : Strong Enemy Team Scale : Average Enemy Team Scale : Weak

21 Combs method (Example)
My Team Scale Enemy Team Scale My Team Attacking Status Strong (90%) Strong (30%) Attack Carefully (27%) Average (60%) Attack (54%) Weak (90%) Full Attack (81%) Runaway (18%) Attack Carefully (36%) Weak (30%) Runaway (9%)

22 Thank You

Download ppt "The general Game AI concept"

Similar presentations

Ads by Google