Real Napoleon: I will send forth a portion of my army to draw them off the heights. They will fall back to the main force which will hold the enemy in place while my cavalry destroys their camp. Upon seeing this the enemy’s infantry will waver and the break at the sight of my flanking force. Total War Napoleon: I will charge my cavalry in one at a time and watch them get shot to pieces running up and down the enemy line, without making contact or doing any real damage. After they die I will advance my infantry in a blobby, awkward line put at an angle so that only a portion of my infantry can actually fire on the enemy, but not before taking several minutes to pointlessly shuffle about while under artillery fire. I will advance without any kind of screening on my flanks to ensure we get butt fucked by the enemy’s cavalry. After the entire army is destroyed I will return in a couple turns with another full stack because I have AI cheats, fuck you.
Awww I hoped you taked about Rome I, My favourite Total War. Excellent video mate, I hope you keep at it. One piece of advice is that you could spend less time explaining how the games work, since I know we are all a bunch of strategy nerds anyway . This could free time in the script to get more technical into the AI. Cheers
to be fair, I don't know shite about Total War, and only came here from his more recent video that mentioned this one - and thanks to his light explaining I have some context. Just a different perspective!
It is amazing how you can start with so much potential and end up with what Total War is currently offering. And I have to admit Medieval was great for its time, Rome 1 and Medieval 2 were very enjoyable and a milestone by comparison to any other game, but it feels like CA went downhill rather than improving afterwards (don't get me wrong, the games are still enjoyable, but you'd expect the revolution to continue). The AI, at least, is not that much better today than it was back then in terms of how it actually plays against a human opponent, the end-user's experience. They're trying all these algorithms, but they don't make sure that the AI is playing in a believable way.
Thanks for commenting! The video wasn't supposed to go public for another couple of hours, but Gamasutra approved the blog post much faster than anticipated. 😂
This is fascinating, I love your content! I'm curious though, how do you exactly how the system works? Did you contact people that worked on the game? Or do you have a way to look under the hood as the game runs? Cheers!
It's a mixture of things. If I can find the SDK, then I will go and take a look at that if I can. I avoid reverse engineering code, given - as a developer myself - it can be easy to misinterpret the *intent* of the AI system when just reading the code. I like to look at it more from a design perspective and then how that was solved. Most of my research is based on interviews, developer talks, conference seminars, published papers/blogs/vlogs etc. In some very rare cases I am able to chat with developers close to the project. It fluctuates quite drastically from project to project.
Do you think it would be possible, or feasible, to implement the systems used in RTS games into large scale first person shooters, like Arma? Arma has may communities where large groups of players (30-80) face off against large forces of Ai (100+), and I was wondering if it would be more efficient for the ai to use an RTS type system to direct the ai instead of the ungodly mass of FSMs thats directing each Ai individually. Currently, this leads to significant framerate issues and when on a server it leads to the AI become more and more stupid the more of them there are. Would this be a possible route to a fix?
Yes I would say it is feasible, though it certainly would not be easy and probably not get the response you wanted? It's often just very difficult to manage and scale that level of complexity. RTS games seldom have to worry about low level AI behaviour being as flexible and as responsive as a FPS. A lot of FPS games already use a variety of management systems to look after and control large groups of enemies to make them appear more tactical (Horizon: Zero Dawn, F.E.A.R., Halo just off the top of my head). The problem is all the additional resources needed to manage the second-to-second gameplay (navigation, targeting, reacting to player movements) on top of all that. A good example of this is Tom Clancy's The Division. In that game the missions and open world maintain limits on the number of NPCs that can be in-scene and attacking the player, given the clients (not the servers) actually cause a performance bottleneck. The servers could easily have more NPCs but the consoles can't deal with it. Meanwhile I've been fortunate to chat with people close to the game Rust detailing difficulties in managing navigation calculations and performance for characters that can wander the wastlelands. That's just for one character as well. For something like Arma would be to timeslice the AI behaviour updates across frames to allow for more effective performance. Though I suspect the bigger the number of NPCs becomes, the more difficult it is have them update fast and often enough to not look stupid or sluggish in their responses.
Client framerate issues aside, which is really futile to try to judge without throwing the client into the profiler, your statement that the AI on the server gets progressively more stupid is an indication that it's already timesliced. I'm not the one to speak on how to make an AI behave, but i can say something on performance. I don't think there's a way around an FSM per actor, and each actor will also do raycasts, which should be the slow part rather than FSM itself. For this circumstance, unless there's something that can obviously be optimised about the FSM and raycast implementations per se, such as batching, clustering or world representation, one just needs to bite the bullet and expand server resources. Perhaps the server software could be reworked to utilise all the processor cores, which it possibly does not currently do. If that doesn't suffice, it comes down to spreading the load across several server machines. A thing to look at, in my experience, communication and message creation and parsing is what sometimes bogs large simulations with numerous participants down much more than AI and simulation does, so it may be worthwhile to have one server perform just the AI, communicating via multicast with handful of trusted servers, and the servers would just collect and simulate the inputs of the players, send collated player status updates to the AI server and each other, again with multicast being an option, and then send player and AI agent updates to the players, with each server handling maybe 20 players max. You've got of course clustering and hand-off issues to take care of. It's not an easy or cheap undertaking.
9:07 where on *earth* are you getting your information from? I'm (recently) ex total war staff, we've *never* used neural networks for anything. I'm not sure you could even find a machine capable of running a sufficiently large neural network back when Shogun came out. To my knowledge, absolutely no game to ever leave the doors of Creative Assembly has ever used the techniques you're describing. Even the xenomorph AI in Alien: Isolation is just a very carefully implemented behaviour tree.
Do you recommend any good texts or research on how exactly the neural networks were used? How did they train them? What kind of data did they use? I'd love to know more if possible. Thanks!
About 14 minutes explaining what RTSs and the Total War series are and about 1 minute about the A.I in Shogun Total War. Summary: the unit A.I uses Neural Networks, the combat map A.I.apparantly uses some kind of rule -based reasoning system and the strategic map AI uses a combination of FSMs and Genetic Algorithms.
And both the neural nets and genetic algorithms were predefined and thus don't learn or evolve - so essentially the AI is the same as if it's just basic FSMs and conditional blocks. Just ones where they just let randomness eventually produce reasonable weightings.
Once again, this suffers from a lack of details. The layman gains nothing except a superficial albeit maybe entertaining view. The student is left gaining nothing more than he already knew. So, neural networks are used to govern unit behaviour. How do you definite the input/output? What considerations are there in designing the neural network? How do you design training instances and define success and failure? Rule based system is used for combat. How is this set of rules determined? Is there a systematic process incrementally build up this set of rules? Genetic algorithms are used for campaign AI. What does the genetic algorithm encode? A function that maps state of the known world to the actions taken that turn? Or just some parameters in that function? How is the evolution process simulated? What is the fitness function?
The idea is good, but the background music is way too loud. It's distracting. Fast drum sounds or high pitch flutes don't help when discussing serious AI/game concepts. For a video about AI, it has too much "history of total war series" in it.
I haven't watched the video tot he end. But if the author's conclusion about TW AI will be positive I'll flip my sh*t. Total War's AI is terrible anyone who played campaigns over multiple games knows that the game cheats and acts stupidly. And it never changed since the first game.
I know its hard to see if you're just looking at the surface of it but it takes a lot more effort to make an AI seem as if its acting as a human player would in a RTS battle as complicated as the Total War series. Its an easy task making AI human like in say, an FPS game. But when it comes to an RTS its a whole other story. So basically in comparison to other RTS games, Total War AI is top tier.
I've seen players criticize even the most impressive game AI I've ever seen as "stupid" -- for an immersed and/or irrationally impatient player, even just the tiniest of bugs can cause this impression, and cause them to ignore all the other incredibly impressive things an AI can do (often because they simply don't understand how complex it is)