The Secrets of Skeleton and Shark AI in Sea of Thieves | AI and Games #41

AI and Games · Intermediate ·📄 Research Papers Explained ·7y ago

Key Takeaways

The video explores the AI mechanisms behind non-player characters in Sea of Thieves, including skeletons and sharks, using behavior trees, server-side AI management, and custom navigation systems, with tools such as Unreal Engine 4, Blueprint, and C++

Full Transcript

hi I'm Tommy Thompson and welcome to part two of the AI of sea of thieves here on AI in games impart one I explored rear swashbuckling what old of pirate adventures the range of AI systems at play our missions are generated four players each of the trading companies and how all of this has subsequently managed its server level to suit having been invited to rears offices there was so much to talk about and in this second video we're going to hear first-hand from the developers themselves about the AI in the game at launch first we'll explore the pigs snakes and skeletons roaming the treasure Laden Islands how they work and the surprising secret that powers the skeleton AI behavior plus we dig deep into the completely distinct navigation system built into Unreal Engine 4 by rare that allows for navigation in open waters and just how difficult it is to stop AI sharks from swimming onto land [Music] so let's begin by examining the land-based creatures as explained in part 1 one of the main mission types and sea of thieves is the order of souls where you must visit one or more specific islands in the world to kill high-ranking skeletons and sell their skulls for treasure this requires skeletons to spawn in the world when necessary but they can also just appear throw your time on a given island if you're in the middle of retrieving items for the gold hoarders are much an alliance quest so how do they work well they're reliant on a commonly used AI paradigm called behavior trees which is the default AI tool built into Unreal Engine 4 as explained in my recent AI 101 episode on the topic behavior trees allow for branching of logic so in certain situations the a I will make one or more decisions that reflect the scenario plus they can react to changes in the world quickly and update their chosen behavior to suit now as mentioned in part 1 all of the line based AI characters such as the skeletons and the animals and Islands which I'll come to in a minute are all using the original bill and AI to chain but there's something special going on in the skeletons that I wanted to talk about something unique that during my time working on AI in games I've simply never came across before you see when you're building an EAJA kite on a game while you might want to ensure they're using some of the same mechanics and features as human players especially if they're humanoid when building the AI you're thinking about the behavior you want the character to execute often in a completely distinct way from how you would handle it as a player you'll have the logic that dictates when a certain action or behavior is going to be executed and in unreal you'll write specific tasks in the behavior trees typically in blueprint that handled the execution on a minut level often calling existing C++ functions in the code that players may also call to do a similar thing say for example and see if thieves you want to heal yourself after being injured then you would open the inventory grab a banana and then hit the right trigger or left mouse button to eat it which triggers the heal function in the code base for human players typically if you weren't in the AI car such a skeleton to do the same thing the logic would be to simply run either the same heel function or a very similar one for that non-player character had ensured the appropriate banana chomping animation is used to enable players to understand what's happening ultimately it looks like it's doing the same thing but under the hood they're completely distinct so imagine my surprise when having sat down with developers Rob Marcella and Sarah Noonan that I discovered the skeletons are actually mimicking player input the skeletons in particular they share a lot of code and the animations set with the players so often we can almost treat them like they've got a virtual pad or something where you know they do a lot of things that the players do and we activate them in the same way that we do on the players so that was really useful as well again just reusing code branches like that in short skeletons are effectively interfacing with the same control systems that humans would except through their AI code the skeletons use the same base controller or in ue4 terms the same actor as a human player meaning they not only share some of the players animations but also the Emporer interface so returning to the banana example for a skeleton to heal itself it's actually pressing virtual buttons that enable it to grab a banana from its inventory and subsequently eat it yeah that's the really interesting things like when you look at our behavior trees or say the skeletons controlling the cannons it's not like use cannon its press the interact button you know press the aiming yeah buttons and press the fire button you know it's not like I'm going to control this cannon as an AI it's just using the same inputs and the same code paths that the player would use so you don't have to be testing like two different code paths and stuff though it's worth mentioning the movement on the ground isn't using any virtual representation of the sticks they're just using the navigation meshes baked into the iowans to walk around but what's amazing about all this is that by doing the extra legwork two pars are given interaction or behavior for the AI into the appropriate player MPUs ensures that skeletons can only execute actions if a player can do it as well which actually kind of makes sense given their well undead humans but more importantly a help streamline testing of the skeleton AI since if you can see them doing something a player cannot then you know something's gone wrong but also in theory it means that if new gameplay mechanics are added for the player then once a bit of extra coding has been completed the skeletons will be able to do it as well given this can take a bit of getting used to and the best of all explained to me that the gameplay team had a little assignment that they would give to new developers to help them to get to grips with the tool chain and so for a while we had this onboarding exercise so if someone came onto their AI team in order for them to get to know it we would get them to create a skeleton mariachi band so we would we would basically get them to code a behavior tree such that it could bring all of the skeletons together in one place and then they would pull out an instrument and start playing it and and so this is always the fun little project we'd get and so we have some internal footage of them this literally just playing the hurdy-gurdy and the concertina together now all of the AI behaviors are managed server-side much like what we saw in my case study on Tom Clancy's the division given insurace players on each device have the same experience as they interact with them but there's still the issue of balance which as I mentioned in part one is addressed by having systems in place that makes your skeleton scale and difficulty in accordance with the experience not only can the behaviors and based gameplay parameters such as hit points and available weapons change but the types of skeletons are fairly broad with over growing shadow and gold skeletons forcing players to mix up their play styles to defeat them on starting playing for the first time skeletons are quite slow not particularly aggressive and can only use claws to attack or maybe a sword as players increase their ranking in the order of souls skeletons are given access to abilities they didn't have before they can stray faster hunt you more efficiently back off if under attack heal themselves with bananas and even start to use the pistol and blunderbuss to shoot you this is all achieved through use of data assets that can be plugged into the character AI at runtime that defines how the specific skeleton will operate with over 50 unique parameters that help diversify their attributes and behavior so while the game needs to provide threats to players on any given island there's also all the ambient wildlife the pigs chickens and snakes they can either prove a pain in the ass while you're avoiding a horde of skeletons be a resource you need to gather from merchants Alliance quests or just add a bit of life to the surrounding environment in any case be to use behavior trees and well their architecture is largely similar to the skeletons it's much more reduced in scale with snakes attacking the player F in proximity and pigs and chickens just running away from you the architecture is consistent across each type but the data assets that are provided helping to dictate how that specific animal will operate with the behavior tree as mentioned in part 1 these are treated in much the same way as skeletons for load management and can be disabled or despawned when necessary if they're consuming resource on the server that could be put to better use elsewhere [Music] now having explored all the AI characters on land what about at sea so let's check out the first real threat players are faced with in the murky dance sharks lots and lots of sharks from a design perspective the Sharks are intended to add a new layer challenge for players by ensuring you don't just sit idle in the water they only operate within a short range and spawn and when necessary meaning you won't just stumble into a shark swimming the seas in the overworld instead you will effectively cause a shark to teleport into the game near your position then stalk you if the game feels like you're sitting in the water for too long so while the shark behavior trees are relatively straightforward the only really circle their prey or attack it there are two distinct problems that need to be addressed the first big problem is navigation how do you ensure an AI shark knows how to move through a volume of water we typically use a navigation mesh to support movement on a static surface this works okay on land for characters such as the skeletons given the navmesh is a two-dimensional surface that models movement on a three-dimensional space however this doesn't scale to surfaces that are constantly changing shape or four volumes of space such as air and water meaning you need to create a custom solution to resolve it this isn't a unique problem for Co thieves as we saw in my recent case study on horizon zero dawn where guerrilla games had to build but a navigation system for the flying enemy characters rear challenged the problem head-on by building a navigation system that would integrate into the existing navigation framework on Unreal Engine but catered specifically for underwater movement but before they could do that there was a second design problem that needed to be addressed a shark can't stop moving whilst it varies between species the majority of real-life sharks need to maintain movement in order to breathe so the AI equivalent needs to replicate this behavior making lots of small corrective changes in direction at varying speeds so the movement systems needed to ensure not only could they I navigate through water like a shark I had to actually move like a shark would as well so first things first unless the Sharks are instructed to attack a player they typically swim in arcs this is achieved by effectively calculating the arc of a circle of a given diameter this impacts the turning rate of the shark as it's moving and the designers can tweak the speed with which it moves along it with that speed value also being sent to the movement components such that the animation reflects the current movement speed the navigation systems give the Sharks location in either 2d or 3d space to move towards then create a natural arc that will fit that location a lot of effort is put into the turning rate of the Sharks the turn rates are constrained in such a way that it prevents sharks from turning too sharply at high speed if a shark needs to make a tight creative turn given us about to attack the player it'll slow down but never to the point it stops of course and ensures it's lined up with a player before speeding up again but also there's a small window of acceptable error for shark movement they can sometimes overshoot a target their arc in towards but provided they're not going to collide with any obstacles which I'll come back to in a second and that's Fame given it makes the shark move more naturally this is all largely assuming movement in 2d space meaning that the player and the shark are at the same depth and the water in the event they don't line up the shark will plot the same paths as usual but also generate a simple Bezier curve to allow it to swim up or down to the same depth now this is pretty cool a still one big problem left to do with and that's collisions sharks need to avoid both ships and islands and are relying on the environmental query systems and unreal to spa obstacle in proximity but they also have short-range whisker like sensors just in case they're going to swim face-first into our boat this is pretty important given there's still a small chance as it swims an arc that it runs risk of beaching onto an island to keep the codebase maintained the source code for shark navigation as an extension of existing navigation movement and AI controller code built into unreal as such it made life easier for the developers given it was designed to behave in much the same way as land-based navigation when called to execute and streamlined it for testing purposes which is something that you can expect to hear more about later in the series as we've seen in this video even the simplest of AI characters needed for triple-a titles can prove to be a challenge and even more so once they deviate from the expected formats and games even just having any eye contour that can swim can prove to be a problem and it was exciting to see how these water-based plays were put together but our journey through the sea of thieves and AI in games is far from over there are still some monstrous AI enemies that threaten to drag is down to Davy Jones locker and in part three of the AI f sea of thieves we're gonna tackle them face on the Kraken the matey Bista is haunted player since launch the matey Megalodon released during the hunger in deep expansion and the skeleton ships foreseen thrashing the waves in the curse it sails that no more aggressively seek players to plunder thanks for watching part 2 I'm off for a tankard of grog and to put my peg leg up I'll see you soon for part 3 you

Original Description

In part two of my series looking at the AI of online pirate adventure game 'Sea of Thieves', I explore the mechanisms behind the basic non-player characters in the game. First I look at the skeletons, followed by the ambient pigs, snakes and chickens and close up the episode by exploring the AI behind the sharks. All with a little help from the gameplay programmers at Rare who worked on these systems. Check out the rest of the AI of Sea of Thieves episodes: Part 1 (Mission and World Design): https://youtu.be/SCe0_ymiiSo Part 2 (Skeletons and Sharks): https://youtu.be/V3inbQfFQb8 Part 3 (Megaladons, Krakens and Skeleton Ships): https://youtu.be/mZOZyCenz1E Part 4 (Testing and QA): https://youtu.be/Bu4YV4be6IE -- This video is brought to you in conjunction with the UKIE's '30 Years of Play': celebrating the past, present and future of the UK interactive entertainment industry. Visit their website for links to interviews, videos, podcasts and events. https://30yearsofplay.uk/ -- You can read the article based on this video on the AI and Games website: http://aiandgames.com/seaofthieves2 -- AI and Games is series on research and applications of Artifical Intelligence in video games. It's is supported through and wouldn't be possible wthout the wonderful people who support it on Patreon. http://www.patreon.com/ai_and_games http://www.paypal.me/AIandGames http://www.ko-fi.com/AIandGames -- Get yourself an AI and Games t-shirt over on Teespring! https://teespring.com/stores/aiandgames You can follow AI and Games (and me) on Facebook, Twitter and Instagram: http://www.facebook.com/AIandGames http://www.twitter.com/AIandGames http://www.instagram.com/aiandgames/ http://www.twitter.com/GET_TUDA_CHOPPA -- #SeaOfThieves #30YearsOfPlay
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from AI and Games · AI and Games · 38 of 60

1 Evolving Particle Weapons in Galactic Arms Race | AI and Games #04
Evolving Particle Weapons in Galactic Arms Race | AI and Games #04
AI and Games
2 Pac-Man AI Research and Competitions | AI and Games #06
Pac-Man AI Research and Competitions | AI and Games #06
AI and Games
3 The Behaviour Tree AI of Halo 2 | AI and Games #09
The Behaviour Tree AI of Halo 2 | AI and Games #09
AI and Games
4 Researching Super Mario Bros. Level Design | AI and Games #10
Researching Super Mario Bros. Level Design | AI and Games #10
AI and Games
5 Teaching Robots to Play | AI and Games #12
Teaching Robots to Play | AI and Games #12
AI and Games
6 The Quest for AI Game Designers | AI and Games #13
The Quest for AI Game Designers | AI and Games #13
AI and Games
7 HTN Planning in Transformers: Fall of Cybertron | AI and Games #14
HTN Planning in Transformers: Fall of Cybertron | AI and Games #14
AI and Games
8 The AI of Alien: Isolation | AI and Games #15
The AI of Alien: Isolation | AI and Games #15
AI and Games
9 Status Performance Analysis in Team Fortress 2 | AI and Games #17
Status Performance Analysis in Team Fortress 2 | AI and Games #17
AI and Games
10 Training the Shadow AI of Killer Instinct (2013) | AI and Games #18
Training the Shadow AI of Killer Instinct (2013) | AI and Games #18
AI and Games
11 Resurrection & Reverence: The Return of DOOM | Design Dive
Resurrection & Reverence: The Return of DOOM | Design Dive
AI and Games
12 Left Behind on LV-426 - The Design of Aliens: Colonial Marines | Design Dive
Left Behind on LV-426 - The Design of Aliens: Colonial Marines | Design Dive
AI and Games
13 Games By ANGELINA, the AI Game Designer | AI and Games #20
Games By ANGELINA, the AI Game Designer | AI and Games #20
AI and Games
14 Prepare to Die by Simple AI - Dark Souls and Difficulty | Design Dive
Prepare to Die by Simple AI - Dark Souls and Difficulty | Design Dive
AI and Games
15 Looking for Love on Pandora: PCG and Borderlands 2 | Design Dive
Looking for Love on Pandora: PCG and Borderlands 2 | Design Dive
AI and Games
16 The AI of Shogun: Total War | AI and Games #21
The AI of Shogun: Total War | AI and Games #21
AI and Games
17 The Campaign AI of Total War: Rome II | AI and Games #23
The Campaign AI of Total War: Rome II | AI and Games #23
AI and Games
18 AI 101: Monte Carlo Tree Search
AI 101: Monte Carlo Tree Search
AI and Games
19 The Diplomacy AI in Total War: Attila | AI and Games #24
The Diplomacy AI in Total War: Attila | AI and Games #24
AI and Games
20 A History of AI Research in StarCraft | AI and Games #26
A History of AI Research in StarCraft | AI and Games #26
AI and Games
21 Dota 2, MOBA's and the Future of AI Research | AI and Games #27
Dota 2, MOBA's and the Future of AI Research | AI and Games #27
AI and Games
22 Procedural Level Generation in Sure Footing | AI and Games #28
Procedural Level Generation in Sure Footing | AI and Games #28
AI and Games
23 Behind the AI and Storytelling of Spec Ops: The Line | AI and Games #29
Behind the AI and Storytelling of Spec Ops: The Line | AI and Games #29
AI and Games
24 The AI of DOOM (2016) | AI and Games #30
The AI of DOOM (2016) | AI and Games #30
AI and Games
25 Machine Learning Analysis of Player Behaviour in Tomb Raider: Underworld | AI and Games #31
Machine Learning Analysis of Player Behaviour in Tomb Raider: Underworld | AI and Games #31
AI and Games
26 How A Navigation Mesh Works in 3D Games | AI 101
How A Navigation Mesh Works in 3D Games | AI 101
AI and Games
27 How Halo 3 Builds Large-Scale AI Battles | AI and Games #33
How Halo 3 Builds Large-Scale AI Battles | AI and Games #33
AI and Games
28 Enemy AI Design in Tom Clancy's The Division (Part 1 of 2) | AI and Games #34
Enemy AI Design in Tom Clancy's The Division (Part 1 of 2) | AI and Games #34
AI and Games
29 Building the Online World of Tom Clancy's The Division (Part 2 of 2) | AI and Games #35
Building the Online World of Tom Clancy's The Division (Part 2 of 2) | AI and Games #35
AI and Games
30 Behaviour Trees: The Cornerstone of Modern Game AI | AI 101
Behaviour Trees: The Cornerstone of Modern Game AI | AI 101
AI and Games
31 Why Friendly AI Cheat in Ghost Recon Wildlands | AI and Games #36
Why Friendly AI Cheat in Ghost Recon Wildlands | AI and Games #36
AI and Games
32 The AI of Horizon Zero Dawn | Part 1: Rise of the Machines | AI and Games #37
The AI of Horizon Zero Dawn | Part 1: Rise of the Machines | AI and Games #37
AI and Games
33 The AI of Horizon Zero Dawn | Part 2: Metal Militia | AI and Games #38
The AI of Horizon Zero Dawn | Part 2: Metal Militia | AI and Games #38
AI and Games
34 Augmented Reaction: Vanquish - 9 Years Later | Design Dive
Augmented Reaction: Vanquish - 9 Years Later | Design Dive
AI and Games
35 Building Mario Levels with Machine Learning | AI and Games #39
Building Mario Levels with Machine Learning | AI and Games #39
AI and Games
36 The AI of Half-Life: Finite State Machines | AI 101
The AI of Half-Life: Finite State Machines | AI 101
AI and Games
37 Building a Pirate's Paradise in Sea of Thieves | AI and Games #40
Building a Pirate's Paradise in Sea of Thieves | AI and Games #40
AI and Games
The Secrets of Skeleton and Shark AI in Sea of Thieves | AI and Games #41
The Secrets of Skeleton and Shark AI in Sea of Thieves | AI and Games #41
AI and Games
39 How Megalodon, Kraken and Skeleton Ships Haunt the Sea of Thieves | AI and Games #42
How Megalodon, Kraken and Skeleton Ships Haunt the Sea of Thieves | AI and Games #42
AI and Games
40 How Rare Tests Sea of Thieves to Stop Bugs Reaching Players | AI and Games #43
How Rare Tests Sea of Thieves to Stop Bugs Reaching Players | AI and Games #43
AI and Games
41 The Legacy of GoldenEye 007 | Design Dive
The Legacy of GoldenEye 007 | Design Dive
AI and Games
42 The Secrets of GoldenEye's AI Revealed | AI and Games #44
The Secrets of GoldenEye's AI Revealed | AI and Games #44
AI and Games
43 Sandbox Assassin: The AI of Hitman (2016) | AI and Games #45
Sandbox Assassin: The AI of Hitman (2016) | AI and Games #45
AI and Games
44 The Dangers of AI, Microtransactions & Lootboxes | Design Dive
The Dangers of AI, Microtransactions & Lootboxes | Design Dive
AI and Games
45 Minecraft Villages Built by AI - The Generative Design in Minecraft Competition | AI and Games #46
Minecraft Villages Built by AI - The Generative Design in Minecraft Competition | AI and Games #46
AI and Games
46 The Secret Reward Systems of Dark Souls II | Design Dive
The Secret Reward Systems of Dark Souls II | Design Dive
AI and Games
47 Why Adding Bots to Fortnite Was a Great Idea | Design Dive
Why Adding Bots to Fortnite Was a Great Idea | Design Dive
AI and Games
48 The Best Games Engines for AI (2019) | AI 101
The Best Games Engines for AI (2019) | AI 101
AI and Games
49 How Atriox Can Beat You in Halo Wars 2 Without Cheating | AI and Games #47
How Atriox Can Beat You in Halo Wars 2 Without Cheating | AI and Games #47
AI and Games
50 How AlphaStar Became a StarCraft Grandmaster | AI and Games #48
How AlphaStar Became a StarCraft Grandmaster | AI and Games #48
AI and Games
51 Why AlphaStar Does Not Solve Gaming's AI Problems | Design Dive
Why AlphaStar Does Not Solve Gaming's AI Problems | Design Dive
AI and Games
52 Designing the Enemy AI of Tom Clancy's The Division 2 | AI and Games
Designing the Enemy AI of Tom Clancy's The Division 2 | AI and Games
AI and Games
53 Bringing Washington D.C. to Life: The AI of Tom Clancy's The Division 2 | AI and Games
Bringing Washington D.C. to Life: The AI of Tom Clancy's The Division 2 | AI and Games
AI and Games
54 The Secret AI Testers Inside Tom Clancy's The Division 2 | AI and Games
The Secret AI Testers Inside Tom Clancy's The Division 2 | AI and Games
AI and Games
55 DOOM 64 Revisited | Design Dive
DOOM 64 Revisited | Design Dive
AI and Games
56 The Story of Facade: The AI-Powered Interactive Drama | AI and Games #49
The Story of Facade: The AI-Powered Interactive Drama | AI and Games #49
AI and Games
57 Building the AI of F.E.A.R. with Goal Oriented Action Planning | AI 101
Building the AI of F.E.A.R. with Goal Oriented Action Planning | AI 101
AI and Games
58 Revisiting the AI of Alien: Isolation | AI and Games #50
Revisiting the AI of Alien: Isolation | AI and Games #50
AI and Games
59 How Splinter Cell: Blacklist Builds Balance for Stealth | AI and Games #51
How Splinter Cell: Blacklist Builds Balance for Stealth | AI and Games #51
AI and Games
60 Endure and Survive: the AI of The Last of Us | AI and Games #52
Endure and Survive: the AI of The Last of Us | AI and Games #52
AI and Games

This video explores the AI mechanisms behind non-player characters in Sea of Thieves, including skeletons and sharks, and how they use behavior trees, server-side AI management, and custom navigation systems to create a realistic game world. By understanding these concepts, developers can create more realistic and engaging game AI. The video provides a detailed analysis of the game's AI systems and how they are implemented using tools such as Unreal Engine 4 and C++.

Key Takeaways
  1. Understand behavior trees and their application in game AI
  2. Implement server-side AI management systems
  3. Create custom navigation systems for game AI
  4. Design AI characters with behavior trees
  5. Apply research methods to game development
💡 The use of behavior trees, server-side AI management, and custom navigation systems allows for the creation of realistic and engaging game AI, and can be applied to various game development projects

Related AI Lessons

I Spent Weeks Looking for a Research Gap Before I Realized I Was Searching the Wrong Way
Learn how to effectively find research gaps by changing your approach, a crucial skill for AI researchers and academics
Medium · AI
ICMI 2026 Reviews [D]
Learn how to interpret ICMI 2026 reviews and improve your paper's acceptance chances
Reddit r/MachineLearning
Workshop submission for main conference paper under review [D]
Learn how to navigate submitting a paper to a non-archival workshop before the final decision of a main conference like ECCV
Reddit r/MachineLearning
Kept context-switching between arxiv, OpenReview, GitHub, and HuggingFace for every paper, so I built this. Chrome extension + website with everything inline, plus citation graph + SPECTER2 neighbors. 3M papers, free, feedback welcome [P]
Streamline your research with a new Chrome extension and website that integrates 3M papers from arxiv, OpenReview, GitHub, and HuggingFace, including citation graphs and SPECTER2 neighbors, and provide feedback to improve it
Reddit r/MachineLearning
Up next
Beyond Big Vendors: ERP Systems Explained #shorts
Digital Transformation with Eric Kimberling
Watch →