Top Banner
Chapter 10 AI Techniques in dif ferent game genres (SLG / Action / Fighting)
22

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

Mar 26, 2015

Download

Documents

Luis Purcell
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

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

Page 2: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

The general Game AI concept

AI Turn, Call AI to Think

AI Action

Player Turrn, Waiting Input

AI

Get RelateGame Data

Player

Player Action

Make Decision

Input Command

Look and Listen

Analysis

Make Decision

Return Action

Data Analysis

GameApplication

Device

Input / output

Page 3: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

AI for Fighting

Object1 Input / Output deviceGame

Game Status

Update Read / Listen

Input Command

Action

Action

Page 4: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

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

Page 5: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

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 DamageLong Idle

High DamageLong Idle

NIL Mid – Range 1. Dash front2. Attack in short distance

2 Low / Stand Low DamageVery Short Idle

Medium DamageLong Idle

Medium DamageLong Idle

Far 1. Stay2. Attack in long distance

3 Medium / Stand High DamageShort Idle

Low DamageShort Idle

Medium DamageVery Long Idle

Near 1. Dash Back2. Attack in mid distance

4 Medium / Be Attack

High DamageShort Idle

Low DamageShort Idle

Medium DamageVery Long Idle

Near 1. Blocking2. Combo Attack

Page 6: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

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 Smart walk, run, dash attack, normal attack, combo attack

No

Normal Soldier Normal walk, normal attack, combo attack

No

Page 7: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

Pathfinding

Page 8: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

Dijkstra's Algorithm

Page 9: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

Dijkstra's Algorithm

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

A* (A Star) Algorithm

Heuristic Estimation Weight of path Cost Comparing

Page 11: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

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.

Page 12: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

A* (A Star) Algorithm

Page 13: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

A* (A Star) Algorithm

Page 14: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

SLG Analysis Component Goals Resource

Soldiers Workers Building

Current Team Format Map / Global Status Time Prediction

Page 15: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

Making Decision

Movement Attack Healing

Page 16: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

Fuzzy Logic

Degrees of value 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 shoul

d apply fuzzy values for state controlling and state presentation

Page 17: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

Traditional fuzzy state machineNumber of Variable Number of value exist

in each variableTotal rules generation

2 5 52 = 25

3 5 53 = 125

4 5 54 = 625

5 5 55 = 3125

6 5 56 = 15625

Page 18: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

Traditional fuzzy state machine (Example)My Team Scale Enemy Team Scale My Team Attacking Status

Strong Strong Attack Carefully

Strong Average Attack

Strong Weak Full Attack

Average Strong Runaway

Average Average Attack Carefully

Average Weak Attack

Weak Strong Runaway

Weak Average Runaway

Weak Weak Attack Carefully

Page 19: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

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.

Page 20: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

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 Attack Carefully (30%)

Enemy Team Scale : Average Attack (60%)

Enemy Team Scale : Weak Full Attack (90%)

Page 21: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

Combs method (Example)My Team Scale Enemy Team Scale My Team Attacking Status

Strong (90%) Strong (30%) Attack Carefully (27%)

Strong (90%) Average (60%) Attack (54%)

Strong (90%) Weak (90%) Full Attack (81%)

Average (60%) Strong (30%) Runaway (18%)

Average (60%) Average (60%) Attack Carefully (36%)

Average (60%) Weak (90%) Attack (54%)

Weak (30%) Strong (30%) Runaway (9%)

Weak (30%) Average (60%) Runaway (18%)

Weak (30%) Weak (90%) Attack Carefully (27%)

Page 22: Chapter 10 AI Techniques in different game genres (SLG / Action / Fighting)

Thank You