48
Dynamic State Based AI Decision Framework Presenter: Kuanhung Chen, MS in Software Engineering Committee Members: Dr. Junhua Ding, Dr. Masao Kishore, Dr. Ronnie Smith East Carolina University Fall 2011 Master’s Presentation

Presentation 20110918 after effect

Embed Size (px)

DESCRIPTION

First release of the master defense presentation file, this edition is designed to be play off PowerPoint or dumped HTML with transitional effects.

Citation preview

Page 1: Presentation 20110918   after effect

Dynamic State Based AI Decision Framework

Presenter:Kuanhung Chen, MS in Software Engineering

Committee Members:Dr. Junhua Ding, Dr. Masao Kishore, Dr. Ronnie Smith

East Carolina University Fall 2011 Master’s Presentation

Page 2: Presentation 20110918   after effect

The Need for Better AI

Source: Penny Arcade - One Plausible Scenario

Page 3: Presentation 20110918   after effect

The Need for Better AI

Page 4: Presentation 20110918   after effect

Problem Statement

“In the field of video gaming, graphics is approaching visually apex. A few more pixels and polygons no longer provide any meaningful substance to improve the quality of gaming, however the AI of the games we play is no better than those we have played a decade ago.

I would like to propose a dynamic AI framework that allows end-users to experience the same game in potentially endlessly different ways by simply downloading user-generated AI plug-ins. This way, users can finally program/modify their own characters' AI algorithms and make games more difficult without games cheat.”

Page 5: Presentation 20110918   after effect

Project Functionalities

Page 6: Presentation 20110918   after effect

Dynamic AI Algorithm

Page 7: Presentation 20110918   after effect

Dynamic AI Algorithm

Page 8: Presentation 20110918   after effect

Data Layer – Class Diagram

Page 9: Presentation 20110918   after effect

Presentation Layer – Simplified Class Diagram (Semi-Manual Engine)

Page 10: Presentation 20110918   after effect

Presentation Layer – Character State

Page 11: Presentation 20110918   after effect

AI Layer – Action Engine

Page 12: Presentation 20110918   after effect

Data Link – Character Association

Page 13: Presentation 20110918   after effect

Graphical Layer - Stock Character

Page 14: Presentation 20110918   after effect

Scaffolding System Testing

Page 15: Presentation 20110918   after effect

Project Site – Log-In

Page 16: Presentation 20110918   after effect

Project Site – Stub Upload

Page 17: Presentation 20110918   after effect

Project Site – Stub Download

Page 18: Presentation 20110918   after effect

Project Site – Project Management

Page 19: Presentation 20110918   after effect

Character Selection

Page 20: Presentation 20110918   after effect

AI Stub Selection

Page 21: Presentation 20110918   after effect

Rounds Selection

Page 22: Presentation 20110918   after effect

Battle

Page 23: Presentation 20110918   after effect

Result Display

Page 24: Presentation 20110918   after effect

Question and Answer

Presenter:Kuanhung Chen, MS in Software Engineering

Committee Members:Dr. Junhua Ding, Dr. Masao Kishore, Dr. Ronnie Smith

East Carolina University Fall 2011 Master’s Presentation

Page 25: Presentation 20110918   after effect

Appendix Index Simplified User Project Interface Test Plan Simplified Class Diagram (Manual Engine) Class Diagram – Elaborated Action Diagram Animation Engine Animation Engine – Elaboration Simplified Character State Diagram Interface Design Camera Control – Design Camera Control – Camera Movement Camera Control – User Interface Audio Manager Implementation AI Stub Verification C# Reflection Invoke C# Reflection Invoke Differences AI Stub Injection AI Stub Injection Interface AI Algorithm Utility AI Design Strategies Data Link – Action Driver AI Stub Implementation – Template

Page 26: Presentation 20110918   after effect

Simplified User Project Interface

Page 27: Presentation 20110918   after effect

Test Plan

Page 28: Presentation 20110918   after effect

Simplified Class Diagram (Manual Engine)

Page 29: Presentation 20110918   after effect

Class D

iagram –

Elaborated

Page 30: Presentation 20110918   after effect

Action Diagram

Page 31: Presentation 20110918   after effect

Animation Engine

Page 32: Presentation 20110918   after effect

Animation Engine – Elaboration

Page 33: Presentation 20110918   after effect

Simplified Character State Diagram

Page 34: Presentation 20110918   after effect

Interface Design

Page 35: Presentation 20110918   after effect

Camera Control – Design

Page 36: Presentation 20110918   after effect

Camera Control – Camera Movement

Page 37: Presentation 20110918   after effect

Camera Control – User Interface

Page 38: Presentation 20110918   after effect

Audio Manager Implementation

Page 39: Presentation 20110918   after effect

AI Stub Verification

Name Verification: Existence and non-empty of input [full file name] Whether the referenced file exist

Name Validation: Whether the [full file name] fits the naming scheme:

[[NameSpace]].[ClassName].[Method].DLL Breaking down the name by delimiter of “.” Make sure there are at least four parts Make sure that the last part is “DLL”

No empty space exists in file name

Page 40: Presentation 20110918   after effect

C# Reflection Invoke

Class Reference:

Type classType = assembly.GetType(dllObject.TitleClass);MethodInfo method = classType.GetMethod(dllObject.MethodName);

Instantiate an Object of the Referenced Type:

object classInstant = classType.InvokeMember (null,BindingFlags.DeclaredOnly |BindingFlags.Public | BindingFlags.NonPublic |BindingFlags.Instance | BindingFlags.CreateInstance, null, null, null);

Invoke Member in .NET:

public object InvokeMember (string memberName, BindingFlags invokeAttr,

Binder binder, object objectInstant, object[] arguements)

Page 41: Presentation 20110918   after effect

C# Reflection Invoke Differences

Dynamic Method Invoke in .NET:

object returnedValue = method.Invoke(classInstant, BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance |BindingFlags.InvokeMethod, null, parameters, new CultureInfo(0x0009, false));

Invoke Member in Mono:

public object MethodBase.Invoke (object objectInstant,

BindingFlags invokeAttr, Binder binder, object[] arguments,

CultureInfo languageEncode)

Page 42: Presentation 20110918   after effect

AI Stub Injection

Page 43: Presentation 20110918   after effect

AI Stub Injection Interface

Page 44: Presentation 20110918   after effect

AI Algorithm Utility

Get All Characters Get Allies Get Enemies Get Characters by Team Get Character by ID Get Character by Query Total HP Move To Get Random Character Line of Sight

Page 45: Presentation 20110918   after effect

AI Design Strategies State-Based Statistical Analysis

Buffer copies of game state, run trend analysis to predict opponent action

Table Query More familiar to programmers

Team-Based Shared Memory Establish correlation to prevent redundant actions

Nested AI Stub Re-use AI Adaptor to pass on request to child adaptors for

specialized requests Target Buffer Strategy

Use previously determined and buffered actions to cut down on CPU time

Memory Based Analysis Dump accumulated data out to external file to be reused

later.

Page 46: Presentation 20110918   after effect

Data Link – Action Driver

Page 47: Presentation 20110918   after effect

AI Stub Implementation – Template

Page 48: Presentation 20110918   after effect

Dynamic State Based AI Decision Framework

The End