Presentation 20110918 after effect

170
-1

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
170
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Intro page
  • The need for better AI: FPS enemy AI fail, enemies may not always choose best possible choice, a lot of time they choose worst possible outcome.
  • The need for better AI: MMORPG AI fail, escort mission, people you are protecting runs straight toward danger.
  • Using problem statement instead of abstract to make things short and simple.
  • System overall functionalities, separated into three user layers: Player, developer, and Admin Player: Download and runs application using AI stubs Developer: Download and use game engine to develop AI stubs to be uploaded Admin: Oversee AI stub submission to ensure safety
  • Algorithm 1: Dynamic source file Pro: Efficiency, dynamic name change Con: Recompile time, user requires compiler Algorithm 2: Dynamic DLL inclusion Pro: Speed and efficiency Con: No dynamic naming
  • Algorithm 3: IPC Pro: Dedicated process, location freedom Con: Dump and reconstruct time Algorithm 4: Dynamic DLL Reference Pro: Dynamic inclusion, customizable Con: Efficiency and performance
  • .NET layer, data holder, stores game state data. Stores who is where and what the character is about.
  • Unity layer, uses the data layer to manipulate game objects and update game state. Could use physics based action or simple action.
  • Game is character driven. Character choose what to do and its action affects the game state.
  • AI prompt cycle. How character object interact with global game state and uses AI adaptor as well as the action manager. AI adaptor sends a copy of game state and caller character to AI stub is the key of this project. Note, each of the three layers can expand without effecting the other. Data layer initialize game state -> Graphical layer controls game engine -> AI stub decision -> Graphical layer performs action -> Update to global state
  • Character implementation by layers. First, an enumerator can be used to reference to a new character so that data layer and presentation layer can use the same flag. Then a generic singleton character fetching method can be created in game state to fetch a new instance of the character. The abstract singleton character factor look into character implementation to fetch necessary data to describe each character, where new characters can be added. Character reference can then be associated in graphical presentation layer by reference.
  • Usage of a stock character to dynamically effect how the character looks to reuse available resource. Then the character’s look can be dynamically altered by script to match the needed character’s specification.
  • Due to layered architecture dependencies, layers cannot be tested until they are all present. Thus scaffolding system testing is needed to test each component. Before the tests can be done, the depended layer has to be assumed to be correct.
  • Log-in by creating account using existing account or ECU intra account
  • Upload new stubs
  • Search/download existing stubs
  • Update project download packages
  • Select the characters for both sides. Some algorithm work best with a specific set of characters where as generic algorithm can work with random characters.
  • Select which AI stub to use from the “/AI Stubs” folder, where all the download needs to go.
  • Select how many rounds by click on the number bar then press [Up] or [Down] to go up or down, hold [Up] or [Down] to incrementally increase selection range. Same can be done by using mouse scroll. Or [Left] or [Right] key to skip by 10.
  • Battle until at least one side loses. Repeat if necessary.
  • Dynamic pie chart display.
  • The end, time for Q&A.
  • If necessary, here is a list of indexes to be used to answer things in Q&A section.
  • Three categories of users using two components, a simplified version of the Project Functionality diagram.
  • Test for expected output and expected failure.
  • Simplified class diagram from presentation layer point of view.
  • The more elaborated character class diagram from design point of view.
  • Simple example on how the action is carried out.
  • AnimationEngine flow diagram. How to fetch and get the animation by using an AnimationManager object associated with each character.
  • An example on how to use AnimationState flag that’s associated with ActionDriver to trigger which animation to play for the character when performing the said action.
  • Simplified character state diagram, much more simplified than before.
  • Design the interface in PhotoShop then place the GUI contents. Using guide lines to locate (x, y) location as well as (width, height) dimension of the GUI elements.
  • Aim the game camera constantly at where the target is.
  • Since the camera is looking at the target, then as long as the target moves or camera moves the view can be controlled easily.
  • Mouse control, using click and drag to move the target, scroll up and down to zoom in and out, and right click drag to move the camera up/down rotate left/right.
  • Audio manager that plays either background music or sound effect clip.
  • This is how the AI stub file is being recognized. By using this scheme I don’t need a secondary database to associate file with its content.
  • How to dynamically reference to a class, instantiate an object from the class, and how to reference to the class’ member.
  • The difference between Visual Studio .NET’s Reflection class library and MonoDevelop’s C# definition. While similar but syntax is different.
  • Since each component acts independently, there is no reason why a secondary form (manual control) can’t pretend to be an AI stub and inject action selection to an AI adaptor. Scaffolding testing.
  • Action driver testing, creating a fake game scene with dummy as targets. Display all available actions to visually test the effect of the action drivers before integrating them into the actual scene.
  • Built-in methods to help algorithm design.
  • Generic methods on how to design AI stubs using this framework.
  • Like character reference, there is an action enumerator. Each action has a cost and delay lookup. Action is separated into three types Attack, Projectile, and Defense. Which can be fetch via singleton action factory. Then action object can be associated with action drivers on graphical presentation side.
  • Presentation 20110918 after effect

    1. 1. 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
    2. 2. The Need for Better AI <ul><li>Source: Penny Arcade - One Plausible Scenario </li></ul>
    3. 3. The Need for Better AI
    4. 4. Problem Statement <ul><li>“ 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. </li></ul><ul><li>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.” </li></ul>
    5. 5. Project Functionalities
    6. 6. Dynamic AI Algorithm
    7. 7. Dynamic AI Algorithm
    8. 8. Data Layer – Class Diagram
    9. 9. Presentation Layer – Simplified Class Diagram (Semi-Manual Engine)
    10. 10. Presentation Layer – Character State
    11. 11. AI Layer – Action Engine
    12. 12. Data Link – Character Association
    13. 13. Graphical Layer - Stock Character
    14. 14. Scaffolding System Testing
    15. 15. Project Site – Log-In
    16. 16. Project Site – Stub Upload
    17. 17. Project Site – Stub Download
    18. 18. Project Site – Project Management
    19. 19. Character Selection
    20. 20. AI Stub Selection
    21. 21. Rounds Selection
    22. 22. Battle
    23. 23. Result Display
    24. 24. 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
    25. 25. Appendix Index <ul><li>Simplified User Project Interface </li></ul><ul><li>Test Plan </li></ul><ul><li>Simplified Class Diagram (Manual Engine) </li></ul><ul><li>Class Diagram – Elaborated </li></ul><ul><li>Action Diagram </li></ul><ul><li>Animation Engine </li></ul><ul><li>Animation Engine – Elaboration </li></ul><ul><li>Simplified Character State Diagram </li></ul><ul><li>Interface Design </li></ul><ul><li>Camera Control – Design </li></ul><ul><li>Camera Control – Camera Movement </li></ul><ul><li>Camera Control – User Interface </li></ul><ul><li>Audio Manager Implementation </li></ul><ul><li>AI Stub Verification </li></ul><ul><li>C# Reflection Invoke </li></ul><ul><li>C# Reflection Invoke Differences </li></ul><ul><li>AI Stub Injection </li></ul><ul><li>AI Stub Injection Interface </li></ul><ul><li>AI Algorithm Utility </li></ul><ul><li>AI Design Strategies </li></ul><ul><li>Data Link – Action Driver </li></ul><ul><li>AI Stub Implementation – Template </li></ul>
    26. 26. Simplified User Project Interface
    27. 27. Test Plan
    28. 28. Simplified Class Diagram (Manual Engine)
    29. 29. Class Diagram – Elaborated
    30. 30. Action Diagram
    31. 31. Animation Engine
    32. 32. Animation Engine – Elaboration
    33. 33. Simplified Character State Diagram
    34. 34. Interface Design
    35. 35. Camera Control – Design
    36. 36. Camera Control – Camera Movement
    37. 37. Camera Control – User Interface
    38. 38. Audio Manager Implementation
    39. 39. AI Stub Verification <ul><li>Name Verification: </li></ul><ul><ul><li>Existence and non-empty of input [full file name] </li></ul></ul><ul><ul><li>Whether the referenced file exist </li></ul></ul><ul><li>Name Validation: </li></ul><ul><ul><li>Whether the [full file name] fits the naming scheme: [[ NameSpace ]].[ ClassName ].[ Method ].DLL </li></ul></ul><ul><ul><ul><li>Breaking down the name by delimiter of “.” </li></ul></ul></ul><ul><ul><ul><li>Make sure there are at least four parts </li></ul></ul></ul><ul><ul><ul><li>Make sure that the last part is “DLL” </li></ul></ul></ul><ul><ul><li>No empty space exists in file name </li></ul></ul>
    40. 40. C# Reflection Invoke <ul><li>Class Reference: </li></ul><ul><ul><li>Type classType = assembly.GetType(dllObject.TitleClass); </li></ul></ul><ul><ul><li>MethodInfo method = classType.GetMethod(dllObject.MethodName); </li></ul></ul><ul><li>Instantiate an Object of the Referenced Type: </li></ul><ul><ul><li>object classInstant = classType.InvokeMember ( null , </li></ul></ul><ul><ul><li>BindingFlags .DeclaredOnly | </li></ul></ul><ul><ul><li>BindingFlags .Public | BindingFlags.NonPublic | </li></ul></ul><ul><ul><li>BindingFlags .Instance | BindingFlags.CreateInstance, </li></ul></ul><ul><ul><li>null , null , null ); </li></ul></ul><ul><li>Invoke Member in .NET: </li></ul><ul><ul><li>public object InvokeMember ( string memberName, BindingFlags invokeAttr, </li></ul></ul><ul><ul><li>Binder binder, object objectInstant, object [] arguements) </li></ul></ul>
    41. 41. C# Reflection Invoke Differences <ul><li>Dynamic Method Invoke in .NET: </li></ul><ul><ul><li>object returnedValue = method.Invoke(classInstant, </li></ul></ul><ul><ul><li>BindingFlags .DeclaredOnly | BindingFlags .Public | </li></ul></ul><ul><ul><li>BindingFlags .NonPublic | BindingFlags .Instance | </li></ul></ul><ul><ul><li>BindingFlags .InvokeMethod, </li></ul></ul><ul><ul><li>null , parameters, new CultureInfo (0x0009, false ) </li></ul></ul><ul><ul><li>); </li></ul></ul><ul><li>Invoke Member in Mono: </li></ul><ul><ul><li>public object MethodBase .Invoke ( object objectInstant, </li></ul></ul><ul><ul><ul><li>BindingFlags invokeAttr, Binder binder, object [] arguments, </li></ul></ul></ul><ul><ul><ul><li>CultureInfo languageEncode) </li></ul></ul></ul>
    42. 42. AI Stub Injection
    43. 43. AI Stub Injection Interface
    44. 44. AI Algorithm Utility <ul><li>Get All Characters </li></ul><ul><li>Get Allies </li></ul><ul><li>Get Enemies </li></ul><ul><li>Get Characters by Team </li></ul><ul><li>Get Character by ID </li></ul><ul><li>Get Character by Query </li></ul><ul><li>Total HP </li></ul><ul><li>Move To </li></ul><ul><li>Get Random Character </li></ul><ul><li>Line of Sight </li></ul>
    45. 45. AI Design Strategies <ul><li>State-Based Statistical Analysis </li></ul><ul><ul><li>Buffer copies of game state, run trend analysis to predict opponent action </li></ul></ul><ul><li>Table Query </li></ul><ul><ul><li>More familiar to programmers </li></ul></ul><ul><li>Team-Based Shared Memory </li></ul><ul><ul><li>Establish correlation to prevent redundant actions </li></ul></ul><ul><li>Nested AI Stub </li></ul><ul><ul><li>Re-use AI Adaptor to pass on request to child adaptors for specialized requests </li></ul></ul><ul><li>Target Buffer Strategy </li></ul><ul><ul><li>Use previously determined and buffered actions to cut down on CPU time </li></ul></ul><ul><li>Memory Based Analysis </li></ul><ul><ul><li>Dump accumulated data out to external file to be reused later. </li></ul></ul>
    46. 46. Data Link – Action Driver
    47. 47. AI Stub Implementation – Template
    48. 48. Dynamic State Based AI Decision Framework The End

    ×