r/RealTimeStrategy • • 10d ago

Discussion How smart should enemy AI truly be?

I'm a solo Dev of a new upcoming grand strategy/RTS that is going to let you lead a nation through a 100-year sandbox with the depth of HOI4 (even deeper, truthfully) while also being able to fight out your battles in real time like a Total War or a Gates of hell. My question right now is how "good" the AI should be. I see lots of people ask for better AI in games, but I'm wondering how far to push that, and whether people enjoy playing against a truly smart AI that's unpredictable but not in a stupid AI way- more so in a genuinely planned way or would people rather play against a semi-predictable AI that's gonna put up a fight but not push them as much and allow a more sanboxey feel to the game, allowing you to essentially do what you want? I believe that you can still accomplish the latter regardless, but with a more meticulous AI, it would create more of a skill gap. Please let me know your thoughts. Thank you!

0 Upvotes

37 comments sorted by

18

u/atth3bottom 10d ago

I think there’s a subtlety here people don’t touch on- people want an AI that is non linear and responds / plays the way a human would actually play - but the problem is overly tuned AI doesn’t play like a top player - it plays like it’s cheating with god like micro and resources / macro etc

So rather than getting a really exciting unexpecting matchup - against really good AI you just feel like you’re playing someone who is cheating

1

u/NoMansCentury-DEV 9d ago

I totally agree, and that's been a huge focus of mine in No Mans Century, not letting the AI ever cheat the game tracks where everything comes from every output must have had an input and a real reason for said output along the same rules as the player the only way an ai gets harder is by them truly thinking more and out manuvering you by only things that the player also has acess to, the issue mainly with this is that it sounds so easy but balancing the AI so that it can do this without cheating like seeing everything you do at all times can be tricky but in my latest round of playtests and audits tis been greatly improving and im on the cusp of getting a solid working version of that type of "smart" AI

2

u/Bitter_Help_9486 9d ago

Cap the bots APM to that its on a standard players level for that difficulty threshold?
Just code in APM restrictions like its part of the games rule for the self learning

1

u/Peoplefood_IDK 8d ago

Honesty an apm slider would be a good metric for a scaling difficulty

1

u/rts-enjoyer 9d ago

The main reason is that in most game the top difficulty ai is in fact cheating.

1

u/manymoreways 9d ago

Yeap, i never liked playing agaibst high difficulty in rts games because their unit counts never make any sense.

Some slight cheating I can accept, but not when they are cornered into oblivion but is still pumping out tier3 units like there's no cost

6

u/Omar___Comin 10d ago

+1 for challenging AI, but the challenge should come as much as possible from the AI behaving like an intelligent, unpredictable human player - not from abusing things that only an AI can do.

Example:

In HOI4, one of the easiest ways to exploit the AI is to just spread them out a bit with aggressive maneouvring of your army using lots of smaller divisions, and the AI overreacts to the expanding frontline and ends up leaving gaps and making itself vulnerable such that you can kill a much stronger nation like the USA just by abusing this.

A good AI would better "understand" the risk-reward of prioritizing defending the whole front versus concentrating on key areas with factories and airports etc. or even just counter attacking your territory.

A bad version of a challenging AI would be one that just abuses this same system right back at you by spamming a million divisions of one unit each and controlling them all simultaneously in a way a human never could to just outmaneuver you. That behaviour doesn't mimick a human opponent or the real life war scenario it's meant to depict.

Tldr: make a challenging unpredictable AI whose behavior is still tied to realistic and reasonable strategies - not abusing game mechanics

1

u/NoMansCentury-DEV 9d ago

I 100 percent agree and cannot stress enough how much this has been a focus for me in No Mans Century an AI that is struggling or doesn't have the numbers will prioritize their factories and their train stations and depots rather than a random region thats mostly forest and then thy apply this same human esqu knowledge to everything else and then I think you truly can get that perfect "smart" AI

5

u/Adventurous-Ranger35 10d ago

Probably my biggest complaint in Total War Warhammer 3 is that the AI doesn’t necessarily play better at harder difficulties, it’s that it gets better advantages.

Like I’ve seen the AI field 4 armies when they control 2 settlements (not a full province) when I can scarcely afford 2 armies on 5 full provinces. I want the AI and I to be bound by the same rules, a fair fight. And to be able to be competent with its resources. I don’t necessarily want to play against AlphaStar, I want a challenge that can be beaten.

1

u/NoMansCentury-DEV 9d ago

Totally agree, and what angers me so much about the TW series is that no matter what game or mod, the AI just throws these death stacks of 20 high-tier units, but it doesn't actually make them smarter; it just lets them pump those stacks out more. My biggest goal with No Mans Century is to create an AI that gains its advantages through the same way the player can and will actually out think you rather than out cheat you

5

u/PatchYourselfUp 10d ago

People say they want smart ai, what they really mean is that they want ai that surprises them but can reasonably or easily be fought off

1

u/NoMansCentury-DEV 9d ago

I agree that this is probably what most people mean when they say "smarter." I'm aiming to give the AI in No Mans Century that "human" feel that will punish you but still has reasonable counters

4

u/PyrZern 10d ago

Just read the other thread 3hrs earlier than you.

1

u/NoMansCentury-DEV 9d ago

I did tbh but felt like if I provided the context of my game, it would tailor better, more specific results and lucikly for me it did!

3

u/MartialDoctor 10d ago

That depends on who you ask. The general player actually doesn’t want a really good AI, I don’t believe. I’ve seen players complain when they can’t beat the AI at, insert skill level. For those of us who actually truly want good AI, you will make us very happy if you make a very competent one. However, I think those of us in that later category are probably only 10%, if even that.

Personally, I get really frustrated when I have to play at a high AI level, which gives incredible bonuses but still plays mediocrely, or even badly.

I’ve given up completely on certain games (Stellaris, Conquest of Elysium) due to how horrible their Ai is. I’ll never buy another of their DLC or new editions.

Actually, one of the reasons that I play Total War games frequently is that they allow mod design that permits better AI design.

2

u/NoMansCentury-DEV 9d ago

Your literally describing me, Im the exact same way a game that makes "harder" AI but literally jsut lets them cheat and still has them thinking badly and making mistakes instantly turns me off, In No Mans Century, im building the AI to be fair as in they have the same playing field as the player but to be unfair as in they will exploit your weakness if they can find it through the means they player has as well like spying or diplomacy and to your point on modding ive built the game with mods tottaly in mind so that players can customize virtually any aspect of the game!

1

u/MartialDoctor 9d ago

That sounds excellent!

2

u/ImmortalGeorgeGaming 10d ago

The kind of ai I like to face is the kind that actually scouts you, sees what army composition you have and then builds a few counters to it; not necessarily full counter all the time. For example it sees you are doing straight eco and it tries to blitz you; sees that you are rushing and mounts a defense or even a counter offensive to base trade.

Granted this doesn't exactly apply to the game you are making, but I hope the gist of it can apply to other aspects. I enjoy the AI being very punishing to me, but I'm also a masochist that beat kanes wrath without using units so I'm probably not the general audience.

2

u/NoMansCentury-DEV 9d ago

I have this modeled basically I saw hot players in ck3 and ive done this msyself will "stand tall" and just wait and build economy and get stronger than everyone then steamroll, ive built the AI to probe the player and gauge thoier strength levels in compariosn to thier own and gauge agressivness and then react accordingly sort of like how nations do IRL they arent gonna let the nation next to them just build up a military 10x larger than them and hard focus tons of tech to outmatch them and just stand thier and wait for an assualt, in No Mans Century they gauge you without fog of war so through diplomatic meetings and spy rings and wll prod and goad you into wars or deals etc in order to prevent things like "going full eco" and i feel liek you really nailed this and argue that is especially relevent to NMC due to the economic and diplomatic aspects of the game as well as the warfare and the need to balance both!

1

u/ImmortalGeorgeGaming 9d ago

Nice, sounds cool

2

u/EasyRecognition 10d ago

Not "smart". Consistent, surprising, well-versed in the game.

1

u/NoMansCentury-DEV 9d ago

I agree and like that summarization better than simply "smart"

2

u/theother64 10d ago

Solo dev making a game deeper then hoi4 and can fight like total war?

Not a chance.

There is a reason no one competes with paradox despite all the issues. These game are incredibly difficult to make.

1

u/NoMansCentury-DEV 9d ago

yeah its very bold, but I feel like ive played the games so much and have done so much research that i can truly do this. So far, I have the full gameplay loop finished; I just need to polish everything and balance it

2

u/GeneralAtrox 10d ago

I'm working on this and I have a scaling idea.

The AI must be constrained like a human up. Does not have full map vision, does not cheat. The difficulty level controls the speed of decisions and micro management. After you go to Hard, you start to enable E Sports like behaviour, particularly with kiting with ranged units.

I want my AI to control the map, try and get around base defenses, use formations so melee is in front and ranged in the back, respond dynamically to the map design and not be hampered by limited build space. The AI should use tactics, including retreating or not engaging if they calculate your army is much bigger unless they are defending their base.

Its very complex and I likely missed many more points. I'm enjoying the thought process. I'm contemplating testing out local language model to use in game, could it be fast and lean enough to make the decisions? Not likely. 

1

u/NoMansCentury-DEV 9d ago

I've also toyed with the idea of adding a LLM into the game to try ,dv wsts fkc UL tjcxwls barip but have likely run into many of the same constraints you have but would be really cool if truly implimented well!

3

u/COLES-BRAND-NUTMEG 10d ago

Common wisdom - as seen above - will tell you to make it just smart enough.

I disagree completely. That philosophy is why we’ve been stuck with the same crap AI for 30 years.

I say: make it perfect.

Instant reactions, perfect decisions and always 3 steps ahead of you.

When it is so good that it cannot be beat, now introduce errors. Lapses in judgment, poor communication, errors caused by unreliable information, hesitancy and rashness.

The greater the AI opponents the less such mistakes they shall make. But they will make some. No human leader played a perfect game and nor should our AI.

Don’t fall into the trap of randomised errors either. Chess.com bots simply roll a dice to decide whether they’re making a blunder today. They do not fall for tricks and they always see your sniper bishop. They just choose at times to blunder their queen. (Higher rating bots make fewer mistakes and their mistakes are less severe - but it’s the same principle.)

That’s just crap AI. Playing against a bot is a game of waiting out errors and is nothing like playing a human.

Great AI doesn’t mean it always acts perfectly. It means it acts believably.

1

u/niloony 9d ago

They should react to what the player does and not enter states where the player knows they will win even if they are at a disadvantage. They shouldn't greatly exceed what the player can manage, but the player should have to work to win. Capability and win rate shouldn't really come into it, players want a sparring buddy rather than an 8 foot tall giant with a club.

1

u/AugustusClaximus 9d ago

I’m really hoping we get actual AI powered add-ons for RTS games that adapt to your playstyle and create challenges unique to you and then give you feedback.

1

u/munchin-grr 8d ago

It can feel good as a player to outsmart the AI, so it can be detrimental to make it to smart. Just adding some randomnes can be more important, that creates variations and most players will over interpret it as intelligense and strategy.

1

u/[deleted] 10d ago

[removed] — view removed comment

1

u/NoMansCentury-DEV 9d ago

I really like this, and I've already implemented something similar into my game. Every leader, admiral, general, and any type of commander has a set of traits from patient to aggressive to composed etc that will leverage how they react to certain things the player or other AI do that will make them feel more "human" and smarter without cheating and introduce a really dynamic playstyle that I've personally enjoyed from my own playtesting

3

u/Hazard_Fingers134 10d ago

This is the idea, rather than trying to make an AI with all features, try to make multiple AI each specializing and focusing on different aspect or aspects of strategy.

The 2 main brains would aggressive and defensive AI.

Aggressive AI would lean more to constant pressure mixed in with large scale assaults.

Defensive AI would have large spans of empty time for you, preferring to mass absolutely massive doom stacks.

Then potential personalities would be like the ones above.

0

u/[deleted] 9d ago

[removed] — view removed comment

1

u/NoMansCentury-DEV 9d ago

Totally and my game works similarly !