PDA

View Full Version : Creative Assembly Development of AI in battle



ELITEofGAZOZ
01-18-2002, 05:44
My experience about the Totalwar AI is, that it is an good opponent if you are facing it on a flat terrain. However, the most battles are decided only by the question who is fighting downhill and who uphill. In the most battles, especially when the AI attacks, I had the impression the AI is simply ignoring that. Is it possible to develope the AI mainly at this point? Otherwise it will be to easy to beat computer leaded armies.

Sjakihata
01-18-2002, 06:51
No matter what they'll do it will be too easy http://www.totalwar.org/ubb/smile.gif

One thing they could do though, is improving its strategical knowledge. Such as moving more armies to one battle like 2v2 1v2 2v1 etc. And make them try to hold importent provinces!

------------------
"-Know your self, know your enemy and your victory will be painless.
-Know the weather, know the terrain and your victory will be complete."
-Sun Tzu(Wu), The Art of War.

theforce
01-18-2002, 18:59
Hmmm they could improve the AI, but l do not care that much since multi is my think. Anyway in this game they just line up and attack you! Also l would like them to sit on a high hill when defending!!!
If they attack you is toooo easy.

------------------
Don't use only honour, use theforce, too.
http://lod.nipogames.com/default.html

Nelson
01-18-2002, 20:16
I think we would all like to see the AI become more challenging. People who come to the dojo play the game a lot and master it. For many buyers who play the game occasionally rather than constantly (at least for a time), I bet the AI can seem pretty tough. In any event the AI could be awesome if gobs of time and money were spent on it. If machines can beat masters at chess you have to believe they could defend a hill better in Shogun.

Kraellin
01-18-2002, 23:33
it's always fun to speculate on what's possible or not and what we'd like to see or not. we're very good at this. and it would be possible to make a 'grand masters shogun'. very possible. all you need to do is gather about 10 folks, all who are willing to send me $100,000 each. give me 3 to 5 years and i'll have your program for you. ;)

ok, so i'm being a bit facetious here. the point is, is that it's not a matter of having the capability to do this; it's more a matter of having the resources and interest to do this. developing a very strong AI for a particular game would take considerable resources. someone quoted the AI chess games as an example. those chess games have been literally in continuous development for over 15 years. and the number of man-hours spent on doing so stacks up to thousands and thousands of hours. and if i had even one percent of the costs of all that in my pocket i'd retire and start my own game company.

the fact of the matter is that you're very smart. compared to this rock we call a PC you're a bloody genius several times over. to turn this rock into a genius takes a bit of doing. this is why dev guys tend to let the computer games 'cheat'. programming a strong AI that can handle all the variables of a given situation is a tough trick.

the real solution, to me, is multiplayer. now, that guy you're facing is a real intelligence. he may be a bit of a rock, but you dont have to program him to get a good game. well, mostly so, anyways ;) the GEnie network used to advertise something like, 'Find a friend...and kill him'. that was their advertising slogan for their network. i always liked that one ;) they were the ones that first sponsored 'Air Warrior', which was a tactical, wwii, real time, aerial combat, game online. it was a great game and the first of it's kind online.

so, to me, if the idea of a program is to have a good game, then multiplayer is the way to go and single player is more about being a demo for multiplayer, or a trainer. so again, to me, the emphasis i want in a game isnt in a strong AI; it's in having a strong overall connectivity and level playing field. i want the servers to work. i want the internet to work well. i want sychronizations to be fair, so that the guy with that 28.8k modem can play on a level playing field with the guy that has a T1. i dont care nearly as much about 'immersion' and 'eye candy' and 'glitz' and hi res. those are simply substitutes, in a lot of cases, for my own imagination or the lack of good game mechanics. give me a level playing field, real players, good connectivity, excellent syncs, great game mechanics and turn me loose and i'll continue to buy. safety and functionality always take precendence over aesthetics. ALWAYS! if you can also make it aesthetic, fine and well, but give me the other two first. and if you can also throw in a strong single player AI, well, great!

K.


------------------
The only absolute is that there are no absolutes.

Red Peasant
01-18-2002, 23:44
The Creative Assembly will be absolute all-time geniuses of they can develop a 30 quid software AI to beat humans! The 'Deep Blue' machine that beat Kasparov weighed 1.4 tons and could calculate 200 million moves per second....and it's old technology now!!!

------------------
"Gutta cavat lapidem non vi sed saepe cadendo"
--Ovid
(The drop hollows the stone not by force but by dripping often)

ELITEofGAZOZ
02-05-2002, 18:53
Well Kraelin,

your arguments have a weak point:

As long as there is no online campaign you cannot refer players to the multiplayer games only.

I want to have fun in a campaign and they have only the single players campaign, under these circumstances a better AI is a must. The stronger the AI is in battle the longer you will play single player campaigns and the more fun you will have.

In Shogun it is too easy to win the campaign because of the devastating battle results for the AI with a killing ratio of 10:1 in big battles.

Tac
02-12-2002, 01:08
I'll differ to the AI in STW.

First of all , it has CONCESSIONS that royally screw up the game.

Example: AI troops dont suffer from fatigue and their morale is twice of the human player's (their honor 0 ashigaru fight for 2 whole minutes when surrounded by monks and no-dachis, but your honor 0 ashigarus RUN when the monks charge them. go figure)and they can RALLY their routed troops in 1/3rd of the time the human player can (rout troops, they run for about 5 to 8 seconds, they rally. Your troops: rout, the rally option doesnt come up for 10 to 12 seconds. Fun eh?)

Try facing a unit of AI archers vs a unit of human controlled monks. Their archers will run...and run...and run.. and run... and run.. and never get exhausted. While your monks get so tired they cant climb a hill, the AI archers are getting to high ground at TOP speed.

Better yet, try a unit of human controlled yari cav. vs AI yari sams. Approach, have the yari sams charge... and tell your cavalry to run to the farthest end of the map. The yari sams will chase them the WHOLE way at charge speed (slowing down to march when climbing hills) and never tire. The cavalry oth, will get to a point where they virtually STOP and get murdered. Last time I checked a horse outran and had more stamina than a human with armour and a long spear. But this game BULLSHITS reality with those concessions.

The AI seems stupid to you because you have a better POV than the AI. Your "camera" view can let you see things almost twice the distance the AI can. Plus you got radar. The AI has a very limited field of view. You ever wonder why its SO damn hard to flank a human player in multi? Their camera view will spot your troops. Now, if the human "camera" was limited to being RIGHT on top of the Taisho, things would be very different.

longjohn2
02-12-2002, 04:08
Hi Tac.

I'm afraid that I have to defend the a.i.

Firstly it uses EXACTLY the same morale fatigue and ammo rules as the human player.
On hard and expert levels it's given a combat advantage, and it appears a shooting advantage was added in MI too. There are no other cheats that affect the outcome of combat.

The cases you quote are interesting, but mostly illustrate some flaws in the game, not a.i. cheats. To take them case by case

Firstly any surrounded unit that fights for two minutes is clearly winning the combat, otherwise it would be wiped out long before then. There was also a large morale bonus added in MI for troops in a province that they have no retreat from. This applies equally to the human player, but obviously the a.i. is more likely to get into situations where it takes effect.

The a.i. doesn't have any special advantages rallying its troops, other than being better able to keep an eye on the rally flag in the heat of battle.

All units can rout and skirmish at full speed regardless of exhaustion. You might call this a bug, you might argue that the need to save your skin helps you find hidden reserves.

It's also the case that all units that get within charge range can charge at full speed regardless of fatigue. This I concede is a bug. However, it applies to both you and a.i. The yari samurai in your example get tired, very tired, but so long as they stay within charge reach they get to march very quickly.
I'm not sure what your on about with the cavalry stopping. Units never have to stop because of fatigue, they just can't run.

As for viewpoint, having radar doesn't per se help the human player, as the a.i. too has the spatial information on where units are. ( The 20 billion odd neurons that you have for spatial processing do give you a bit of an edge though :-) ). The roving camera does give the player an advantage though, as the a.i. can only see what its units see.

Anyway, feel free to criticise the intelligence of the a.i. , but as far as cheating goes, the battle a.i. is pretty honest.
(I'll say nothing about the stratmap a.i. :-))

LordTed
02-12-2002, 04:08
Forget ai what you need is full campaign capacity on line then u meat true oppenents as you cant beat the real thing. But you have to ask the great question is an online multiplayer campaign feasable?

Sir Kuma of The Org
02-12-2002, 06:46
Please Tac if you want to discuss STW or it's battle engine. Please do it in the correct forum (this is the baseless speculation forum , exclusively for Medieval Total war). Thank You.

------------------
Yes the camel sprites do look good, hope they sound good also...

Tac
02-12-2002, 06:50
longjhon, the AI does not suffer from fatigue. Period.

When I mean that human controlled units "stop" when they are totally exhausted means that they begin to march, very slowly.. almost walking. Sort of like the speed of when they march up a steep hill. And the whole time, the yari sams that have been running at them from the other side of the map still charge up hill waaay fast.

Enemy units routing faster than others? I can take that itd be as if they had dropped their gear and ran. They're not a threat any more (most of the time). Ive timed the time it takes for an AI to RALLY troops of honor 0, no improvements vs human controlled honor 0 no improvements. the AI rallies much faster.

On the ashigaru morale: I seriously doubt a single yari ash. unit being mobbed by 3 monk units will "win". AI morale remains without routing more than the human player's units. OTH, the AI has instant knowledge of the commands YOU give. Select all your 16 man army and have them charge a single enemy unit closest to you. That AI unit will stop and turn retreat (not rout) almost instantly. If the unit is low honour it will rout (but it will barely run for 3 secs b4 its rallied back in!).

"It's also the case that all units that get within charge range can charge at full speed regardless of fatigue. This I concede is a bug. However, it applies to both you and a.i"

No. If your units are "exhausted" and you tell them to charge, they will "charge" for half a second then slow down to a march again. the AI oth, can charge the whole way across the map and not get that effect. They catch up with yari cavalry for fek's sake. After the cavalry tires out so much it can only march!

evilc
02-12-2002, 21:03
erm, i think longjohn knows what he's talking about.

Nelson
02-12-2002, 23:05
Forget ai, LordTed! Forget that which makes the game possible for the overwhelming majority of buyers!

This is exactly the kind of multiplayer myopia that makes no sense at all. Let's have CA make Medieval:Total War online only, what say you? And sell about 10,000 copies.

THERE IS NO MULTIPLAYER CAMPAIGN!!!

Give it up already. Better AI would benefit almost everyone.

Cheetah
02-13-2002, 00:52
I don't mind if the AI gets some cheats, it is still too weak. I would be more happy, of course, if it would stick to some basic principles like: "stick to high ground", "keep your army together".

BTW, longjohn2, I am gald you are here. Is it difficult to program such basic principles?

LordTed
02-13-2002, 00:59
When i say forget it i mean it not litterally, but the challenges lies with playing real people. All games need an AI but just how well developed can one become?

Nelson
02-13-2002, 01:47
Another person is required to challenge us in the dojo who play a lot, yes. For those of us who have mastered the system, yes. For those of us who game the game to the Nth degree, yes. I would suggest though that many online battles are not very challenging at all when players are mismatched. I’m sure you have enjoyed many an online cakewalk, Lord Ted.

Believe it or not there are plenty of people for whom the AI is challenge enough right now. Not brain dead droolers either. Just folks who don't play games 10 hours or more a week. But you're right. How good might the AI ever be? It's comes down to the same issue as the MP campaign really. How much effort will designers expend on something when what is done seems already good enough market wise? The issue of diminishing returns once again rears its’ ugly head.

I want brilliant AI just like I want a multiplayer campaign. I'm gonna get neither for the same reason.

longjohn2
02-13-2002, 03:44
Tac
If you give an order to march or attack at the run and your unit is exhausted it gets bunped down to walk. However if it gets close enough in its pursuit that the cursor text shows it as attacking then it'll run all day while it's attacking the same target. Set up a custom battle where you have YS and the computer has CA. I'm sure you'll be able to reproduce it to your own benefit.

As for the a.i. reacting quickly, I'm not sure what your point is. If you're sitting watching a bunch of enemy you don't wish to engage, and they start moving towards you, how long does it take you to react.
However, the a.i. does have an advantage in that it can look everywhere at once on the battlefield. To counter this advantage, the a.i. only evaluates evey 4 or 5 seconds. This means it has an edge in bigger battles, but can be outmanoeuvred in small ones.

As for rallying, all I can do is assure you that the a,i, enjoys no special privilidges. There are though lots of conditions that determine when a unit becomes elligable to rally, so I don't know how you can do a controlled experiment.

Cheetah
The a.i. does stick to generally to the principles you describe, but sticking rigidly to them would make it predictable, boring and weak. Do you stay on your high ground when your position is hopelessly flanked, or the enemy are standing off and shooting you to bits ? Do you let the routing enemy rally because you insist on keeping your army together ? There are a myriad of different ifs and buts to apply. Also concepts that come easily to humans often take a lot of work to define for the computer. For instance, it's easy to say deploy on a slope, but it's several days work to write algorithm to even find the slopes on a map, let alone worrying about how you deploy on them. You can find solutions to make the a.i. perform better in any given situation, but with a game as complex as Shogun, you never have the time to deal with more than a few of those that can possible arrise.

Puzz3D
02-13-2002, 03:52
Tac,

I've observed an ai unit get exhausted. It couldn't run for more than an instant before dropping back to walking. I made the ai unit chase me all over the map, and it eventually ran away. The ai is good at conserving stamina and ammo which can give the impression that it has more of these things than the human player.

You cannot control the charge speed. The unit automatically goes to charge speed when it is within the proximity radius and the indication is "attacking". Marching equates to walking and marching quickly to running. Only those two speeds are under manual control.

Routing and rallying is determined by a unit's morale level, not it's honor level. Many factors on the battlefield affect a unit's morale.

Here is what I think might be happening in your games: Your units are getting tired by moving around too much or too fast. When very tired your units get combat and morale penalties. Even quite tired has a combat penaltiy. Exhausted units are almost useless. The ai is very good at making individual hth matchups, and, if one of your units routs, all nearby units get a morale reduction.

[This message has been edited by Puzz3D (edited 02-12-2002).]

Cheetah
02-14-2002, 04:07
longjohn2 Thx for your reply.

Quote The a.i. does stick to generally to the principles you describe, but sticking rigidly to them would make it predictable, boring and weak.[/QUOTE]

I agree with the second half of your statement but not with the first. http://www.totalwar.org/ubb/smile.gif

Here is one of my battles against the AI to illustrate the point. I was attacking a hilly province with 3SA, 3YS and with my Daimyo (Imagawa). The AI was defending with 2SA, 1YS, 2YA and with his Daimyo (Oda). The AI's very first move was to come down from the hill and attack my forces uphill! Only when I decimated his SAs and YAs did he retreated. But then he tried to set up an "ambush" by "hiding" the two YA in a nearby forest. I attacked its remaining forces but he didn't come out with his YAs until it was too late (i.e. when only its Daimyo was left). I killed his Daimyo (who had no heir) and massacred its army almost to the last men.

Now, I think that the AI made at least four fundamental mistakes:
1) came down from the hill and attacked me uphill without any reason;
2) divided its forces in sight of the enemy, again without any reason;
3) remained inactive with 1/3 of its army while I was attacking the remainig 2/3;
4) enganed with its Daimyo in a losing battle instead of retreating.

I don't expect the equivalent of "Deep blue" engaging me, but I expect the AI not to make such fundamental mistakes.

Quote Do you let the routing enemy rally because you insist on keeping your army together ? [/QUOTE]

Good question. Chasing is a tricky buisness. Routing troops can be rallied, enemy forces can be waiting in ambush, chasing unit can be cut off from the main force, etc. I think that the difficulty of chasing exceeds the intelligence of the current AI. So, yes, my priority is to keep the army together and let the opponent rally if it is the cost of it.
Besides, the current AI chases every unit it engaged regardless of what happens on the battlefield. The results is often confusion and chaos in the AI army. As a result you can beat the "main" AI force and then you can beat the returning AI units (from the chase) one-by-one. I would expect the AI to use at least some simple rules to decide whether it should chase a routed unit or not. For example, chase only when at least half of the opponents army was routed, or chase only with fast units (YA, horses). YES, I have seen the AI chasing with nagis (when it had plenty of other units).

PS. longjohn2 I love STW/MI, keep up the good work and improve the AI!!!

longjohn2
02-15-2002, 02:14
Thanks for your thoughts Cheetah, specific criticisms are always useful.

I stnad by the statement that the a.i. generally keeps to high ground when defending. This is not the same thing as saying it always keeps to the high ground. Sometimes it'll attack when defending when it feels it'll be outshot, and would rather chance its arm in melee. There is also a random element in it's actions, which is intended to provide a degree of unpredictability. In many ways it's as important for the a.i. to be an interesting opponent as to be a strong one.

I am aware that the a.i. doesn't do that well in battles it's clearly lost, but I'm not sure it's worth spending that much effort on losing less badly. Usually it'd retreat anyway. Why it didn't in this case is hard to say.

Your point about it getting scattered in pursuits is interesting. I'll admit it's not really an area I've given much attention to, at least not in respect to the post melee aspect. I'll give it some thought

Jaguara
02-15-2002, 02:28
LongJohn,

I want to thank you for all of the attention that you give us here at the ORG. It would be nice if more game develeopers were like this.

Cheetah touched on one thing that bothers me very much.

That is the reckless way the AI deploys it's Daiymo units. Particularly when there is no heir. The result is that in the campaign, clans turn to ronin at an alarming rate...and players normally have an anti-climatic ending fighting vs ronin to become Shogun. That is, of course, unless they deliberately allow one faction to survive to the end...but even then, you never know...

That being said, I love the game, and feel you guys have done a great job. Keep up the good work!

Cheetah
02-15-2002, 03:25
Quote There is also a random element in it's actions, which is intended to provide a degree of unpredictability. In many ways it's as important for the a.i. to be an interesting opponent as to be a strong one.[/QUOTE]

For me the most interesting opponent is the strongest one. http://www.totalwar.org/ubb/smile.gif