skulls of the shogun ai post-mortem borut pfeifer developer: haunted temple studios publisher:...
TRANSCRIPT
![Page 1: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/1.jpg)
SKULLS OF THE SHOGUnAI POST-MORTEM
Borut Pfeifer
![Page 3: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/3.jpg)
SKULLS OF THE SHOGUN
![Page 4: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/4.jpg)
CONSTRAINTS– Combination of RTS & TBS elements
– Turn based/board gamey
– No grid/analog world
– An action is a resource (5 orders per turn)
– Arcade-strategy: fast, no “waiting for AI”
![Page 5: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/5.jpg)
GAME MECHANICS - Units
![Page 6: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/6.jpg)
GAME MECHANICS - Resources
![Page 7: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/7.jpg)
GAME MECHANICS - TERRAIN
![Page 8: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/8.jpg)
GAME MECHANICS - Advanced ABILITIES
![Page 9: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/9.jpg)
1st sKULL
![Page 10: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/10.jpg)
NxM problem:–All units vs. all targets–Infeasible, but ideal, right?–Eval big list of unit-target pairs–Utility theory based approach
Issues:–Hard to compare strategic differences with so many pairs.–Huge diff in utility between available/unavailable objectives.–Deciding to defend required a lot more context
(want to avoid duplicating this logic in each low level objective).
Objective Evaluation
![Page 11: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/11.jpg)
Pathfinding in analog space–Use grid even though inexact.
–Needs dynamic obstacle avoidance.
–Can’t avoid inaccuracies.
Pathfinding
![Page 12: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/12.jpg)
– Must organize objective comparisons.
– Architecture must be very fault-tolerant.
– Target distance key in comparing objectives.
– Must know all pair distances, fast, at turn start - can’t avoid NxM problem here.
1st PASS Lessons
![Page 13: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/13.jpg)
2nd
sKULL
![Page 14: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/14.jpg)
Est. distances for strategic decisions:
–Use quad tree w/fewer nodes
–More inaccurate
–Use estimates when assigning objectives
–Still need full path when starting action
EstimatING Strategic Distances
![Page 15: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/15.jpg)
– Single list of objectives/targets– Split by type:
– Resources– Attack– Defense
– High level strategy modes:– Build up resources– Attack– Last ditch (losing badly)
Decision Making
![Page 16: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/16.jpg)
• Run pathfinding on quad tree for all pairs• Rank objectives in each category
– ex: prioritize enemies on periphery as easier to kill
• Find available units for every objective – in range this turn
• Run high level strategy check– Easy to manage, 1-2 pages of if statements
• Assign 5 orders to top objectives by strategy– resources strategy = 3 resource objectives, 2 attack, 1 defense– Fallback to other available objectives, then unavailable.
Decision Making Algorithm
![Page 17: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/17.jpg)
• Comparing objectives more manageable.– Lost some unimportant comparisons.– (When Unit X is better than Y for 2 objectives, but is way
better fit for lower priority objective.)
• Quad tree introduces error:– Before objective starts, look for real path (dynamic
obstacles can still cause failure)– Re-eval objectives on failure: looks “human”, because it
tries one thing, finds it can’t succeed, tries another.
2nd Pass Lessons
![Page 18: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/18.jpg)
3rd sKULL
![Page 19: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/19.jpg)
• Need to prioritize unavailable objectives sometimes: Reinforcements!– Simple set of tests in high level strategy analysis– < 3-4 avail objectives for > 2 turns, if extra units
• Need more tactical info for objectives comparisons: Influence maps!– Besides avoiding counterattacks or prioritizing available
targets, why is one target better than another?
• Difficulty modes, advanced spell use
STILL Missing Elements
![Page 20: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/20.jpg)
Influence map – Red Army
![Page 21: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/21.jpg)
Influence map – Blue Army
![Page 22: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/22.jpg)
Influence map – Blue Army Resource appeal
Resource strength – enemy influence (normalized)
![Page 23: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/23.jpg)
Influence map – Blue Army Threat Level
Threat = Red team – Blue team influenceActivity = Red team + Blue team influenceVulnerability = Threat - activity
Threat to Blue = Red team – Blue team influence
![Page 24: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/24.jpg)
– Easily plugged in to objective eval.
– Influence used for base objective score.
– Each objective multiplies that score.
– Maybe 3-7 cases per objective to modify score (easy to manage).
Influence Map usage
![Page 25: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/25.jpg)
Advanced AI:–Ledges: Positioning to knock off, avoiding, forming walls–Advanced spells: Simple, conservative scoring (costs rice).–Difficulty: Categorize behaviors for novice vs. expert.
Things the AI still doesn’t do:–Use Spawn Oni spell (barbarian unit – too chaotic!)–Not very zen like (doesn’t follow master level strategies).
Oh Yeah…
![Page 26: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/26.jpg)
Learning is fun!• Always Be Architecting
– Never spend too much time up front - you’ll be wrong.– Apply prototyping methodology - throw stuff out.– Leave spaces - code w/flexibility in mind, so you won’t have to.
• Apples to Apples– Split up decision making to compare similar utilities.– Push common analysis (e.g. defense) to higher level to take
advantage of broader strategies.
• Fault Tolerance at every level– Shit happens, your game model will never be accurate enough.– Always try to deal w/error 1 level above, possibly pass it higher
up.
![Page 27: SKULLS OF THE SHOGUn AI POST-MORTEM Borut Pfeifer Developer: Haunted Temple Studios Publisher: Microsoft Platforms: XBLA, Windows Phone, Windows 8 Release](https://reader035.vdocuments.us/reader035/viewer/2022062309/56649eef5503460f94bff144/html5/thumbnails/27.jpg)
More InfoSkulls of the Shogun - Fall 2012XBLA, Windows Phone, Windows [email protected]