Out of Sight, Out of Mind: Improving Visualization of AI Info

18
Out of Sight, Out of Mind: Improving Visualization of AI Info Mika Vehkala Principal Game Tech Programmer @ Guerrilla Games

Transcript of Out of Sight, Out of Mind: Improving Visualization of AI Info

Page 1: Out of Sight, Out of Mind: Improving Visualization of AI Info

Out of Sight, Out of Mind: Improving Visualization of AI InfoMika VehkalaPrincipal Game Tech Programmer @ Guerrilla Games

Page 2: Out of Sight, Out of Mind: Improving Visualization of AI Info

Contents●Introduction●Part I - Visualizing Runtime Flow●Part II - Recording and Playback of Data●Part III - Visualizing Algorithms●Behind the scenes

Page 3: Out of Sight, Out of Mind: Improving Visualization of AI Info

Introduction●Visualization is not trivial

● Iterate until perfect● However, keep it simple!

●Flow of time● Collapse into single image● Interactive manipulation of

time frame● Timeline

Delaunay algorithm visualization

Page 4: Out of Sight, Out of Mind: Improving Visualization of AI Info

Principles●Minimize impact on client

● Low memory requirement● Low cpu requirement● Lean API for minimal debug code

●Clutter-free UI● Shouldn’t need user’s manual for the tool● Helps to keep visualization simple as well

Page 5: Out of Sight, Out of Mind: Improving Visualization of AI Info

Part I – Visualizing Runtime Flow●What are the main components●Lifetime of the components

● Who manages● What is the lifetime

●Dependencies between components

Page 6: Out of Sight, Out of Mind: Improving Visualization of AI Info

Timeline●Hierarchy to show structure●Timeline and tracks to show history

Page 7: Out of Sight, Out of Mind: Improving Visualization of AI Info
Page 8: Out of Sight, Out of Mind: Improving Visualization of AI Info

Hierarchical Timeline View

Tracks Items

Log entries

Page 9: Out of Sight, Out of Mind: Improving Visualization of AI Info

Part II - Recording Data●Simple and data agnostic●Register binary feed and callback●Add arbitrary data { ID | Time | Byte[*] }●Scrub timeline to send back to feed

Page 10: Out of Sight, Out of Mind: Improving Visualization of AI Info
Page 11: Out of Sight, Out of Mind: Improving Visualization of AI Info

Use in Killzone Shadowfall●MP Bot AI debugging and validation●Animation output debugging

● Player● NPCs

●Took ~1 week to integrate and hook-up debug calls

Page 12: Out of Sight, Out of Mind: Improving Visualization of AI Info

Part III - Visualizing Algorithms●How to visualize algorithms

● Not just the end result but step-by-step●No access to renderer

● Long turn-around time to use in-game rendering

●Also, alternative viewport

Page 13: Out of Sight, Out of Mind: Improving Visualization of AI Info
Page 14: Out of Sight, Out of Mind: Improving Visualization of AI Info
Page 15: Out of Sight, Out of Mind: Improving Visualization of AI Info

Part IV - Behind the scenes●Quick look at client-side codeConnect("localhost", 5000);

AddLine(time, duration, pointA, pointB, Color32.Black);box_id = AddBox(time, Inf, Matrix.Identity, center, size, Color32.Green);

RemovePrimitive(box_id, later_time);

id = AddMesh(time, Inf, Matrix.Identity, center, flatShaded : true);AddTriangle(id, time, pointA, pointB, pointC, Color32.GreenAlpha);

Page 16: Out of Sight, Out of Mind: Improving Visualization of AI Info

Implementation Details●Communicates using RPC over TCP/IP

● Major contributor to extensibility!●C# with WinForms

Page 17: Out of Sight, Out of Mind: Improving Visualization of AI Info

ConclusionDon’t guess what happened... ...know what happened!

Page 18: Out of Sight, Out of Mind: Improving Visualization of AI Info

That’s All!

Follow @MikaVehkala

ReView can be found at www.reviewtool.net

Special thanks to Maurizio De Pascale

Suggested reading; Edward Tufte, The Visual Display of Quantitative Information