More weekend AI musings

I’ve been getting a lot of messages. Let me first say that I get between 20 to 30 a day (just messages, not counting my regular email) so I tend to be very very slow in getting back to them (I apologize in advance for this).

But the most common question I have been getting these past few days is “How will I know if the AI is “good enough”?

Now, I understand that people want the game to come out on August 24th (the scheduled release day). I very much want this too. But we’ve been working on this game for a long time and we want to get it right and the AI is a big part of that. If the AI isn’t ready, we’ll push it back to the next retail slot available to us (February 2011).

I am pretty confident that the AI will be ready.  So again, how will I know if it’s ready?

The basic answer is, if it can beat me on my test map, it’s probably ready to go.  The test map consists of a main continent and 4 islands.  Thus, the AI has to be able to handle everything from me simply walking to him and crushing him to taking care to not let me take over the islands and wipe him up with magical spells (the shards are on the islands). 

There’s lots of other strategies in between I’ll try out on it and have it learn.  But that’s the basic minimum I expect – be able to play a good game without having to cheat.

Today, I focused more on the nuts and bolts. Getting the AI to build a decent army and start carefully targeting cities and units that it thinks it can take.  One AI player ultimately beat out the other 3 and won the game (I wasn’t participating in this game).  It didn’t do it very well IMO. It was inefficient and sloppy but it did, after many new functions being added, eventually get its act together beat its AI competitors.

But it has a looong way to go.  The TACTICAL battle AI I won’t get to for another 2 weeks. That’s why we haven’t been showing it yet.  Then there’s the matter of it using magical well both tactically and strategically.

The part I’m really not looking forward to is dealing with islands and human cheese (build up via magic a wall of mountains or turn your area into an island).

I am happy to say that right now, the AI does do some critical (and difficult) things even now such as designing its own units (non trivial), intelligent building up a city under many different circumstances (again, non trivial, the GalCiv AI never built its planets well ). It can recruit NPCs. It can marry and have children.  It can gather together units and form a combined arms army. It can research technologies intelligently.

So even at this stage, other than the island hopping and the tactical battle AI (and having it cast spells) we could toss out a “challenging” AI if I let it cheat enough.  Of course, that’s not acceptable. The AI needs to play well without having to cheat.

I’m going to toss in a disclaimer here – EVERY AI I’ve ever written has guys who have just gotten incredibly good or found some loophole and said “The AI sux!11!”.  This will be the case here too.  I’ll be working on this AI for years to come.

If you have any questions on AI development, feel free to ask here.

 

p.s. Hello to my friends on CanardPC. :)

114,756 views 65 replies
Reply #1 Top

Yes i have a question, Does each AI have a different personality in how it interacts with people in wartime and diplomacy. Cause it striked me if you can win through both the main quest and diplomacy, the computers obviously going to try and do the same. 

By the way, the complications of the AI having children will be worse than skynett or even Space Oddysey 2001, your breeding the doom!!! :borg:

Reply #2 Top

Yes.  Each AI's personality is defined in XML.  Modders can make their own AI personalities as well.

Reply #3 Top

AI development sounds crazy hard, kudos for not taking the easy route - hopefully we'll end up with a satisfying single player experience, and a challenge when playing with friends and AI "bots" are present!

I do wonder, though, can I design a custom race and have the AI use that race?  If so, will the AI be able to use the custom settings I've set up intelligently, or will AI players always use only the stock factions/races?

Reply #4 Top

I have a question. Don't you have a life outside of this game?:P It's Saturday night, and you posted this at almost 11:30 PM your time. Get the team together and go partying or something. It's not like any of the fans are going to form and angry mob and raid your house if you're not working 24/7 until August 24.... oh wait, yeah, they might do that}:) Still, you deserve a break to at least sleep.

Reply #5 Top

Quoting Frogboy, reply 2
Yes.  Each AI's personality is defined in XML.  Modders can make their own AI personalities as well.
 

:drool:  this and the map editor are going to ensure i have  alot of fun. Thanks for working hard even if it is a saturday night for you.  :beer:

Reply #7 Top

I like the part were you mention people just turning their area into an island. That was my grand strategy dammit! My second best was to just make volcanoes everywhere and kill everyone off including me.

Reply #8 Top

"Human cheese." Interesting way to put it.

 

The day the AI is able to figure out how to counter me doing absolutely batshit things that would leave me defenseless/dead against human players (but yet, maybe not!) I'd call it ready.

 

Basically: When it can adapt at human speed.

Reply #9 Top

Island hopping seems to be a bottleneck for many AI's.  Total War AI absolutely sucks when it comes to sea invasions and many other games, such as Europa Universalis III, are not much better.  Hopefully you can get this AI to figure it out.

Reply #10 Top

Will we be able to mod AI in the beta 2, so we can try some changes and discuss the outcome with you ?

Reply #11 Top

Quoting Servius, reply 7
My second best was to just make volcanoes everywhere and kill everyone off including me.

Very Dwarven, good sir.  I approve.

Reply #12 Top

Do you think it will be ready for this Thursday?

I am truly impressed with the amount of feedback you give on your current work. Keep up the good work!

Reply #13 Top

The ability to alter the terrain is a weapon.  Even with alterations as minor as raise/lower land, as in Alpha Centauri, this is true.  Teach the AI to fight using the map and it will be an awesome thing.

Reply #14 Top

Wait... What... we can actually send you personal messages and questions.... oh shit.

Though curious. Would it be helpful if you released a set map (AI Meat Grinder) as a beta phase like you did in the last half of 1z to test the mechanics.  We could play the hell out of the poor thing, comment on it's tactics and problems. Would that help build it faster?

Don't get me wrong I cannot wait for graphical random maps finally. But if us doing a bit more time on static maps would help with the development of the AI. I am pretty sure most of us are on board. Least as long as you turn on the sparkly pretty colors.

Reply #15 Top

Brad, is it a case of setting a priority for the AI or for it to set one for itself, on exploring the world, to recover magic/resources. And then as you mentioned for it to learn.

I for one understand the part about it learning. That makes sense. My question in general is how important is a navy going to be. I get the part of the test meat grinder.

In all of this, I have complete confidence in your AI skills. And this version sounds even better for it to learn within the programming available, without a bunch of "cheats". So, we continue to look forward to your time and other things you're experiencing. (Side note, this company is easily one of my favorites. Hands down. Great job!)

Reply #16 Top

Quoting kyogre12, reply 4
I have a question. Don't you have a life outside of this game? It's Saturday night, and you posted this at almost 11:30 PM your time. Get the team together and go partying or something. It's not like any of the fans are going to form and angry mob and raid your house if you're not working 24/7 until August 24.... oh wait, yeah, they might do that Still, you deserve a break to at least sleep.

You shut up! #:( Frogboy should be putting every ounce of his being into this game. He needs to focus, what he doesn't need is people putting lofty ideas about free time or fun having into his head. This is exactly how the late 20th century United States lost its control over Latin America; see how I use my studies in every part of my life, frogboy.:thumbsup:

After all, Stalin didn't win all of the Great Patriotic War (WWII to people from the United States) by allowing fun time on the weekends.

Its funny how we think we beat the Germans. 

Keep at it Mr. :frogboy: ,  I'll send you some adderol (not sure on the spelling) if that is what it takes. o_O

Reply #17 Top

I don't know if I'd call that "Human Cheese" exactly. In a world of magic raising and lowering mountains and rivers sounds like a viable strategy to try to save your capitol city to me.

You can probably deal with this in the "path-finding" part of the AI. Have it detect what kind of land is in front of it. If mountain then lower the land. If ocean, build a boat or raise a land bridge using magic. If a human can do it and call it "Human Cheese" then the AI should be able to do the same thing to protect its-self from us :)

Reply #18 Top

Quoting kyogre12, reply 4
I have a question. Don't you have a life outside of this game? It's Saturday night, and you posted this at almost 11:30 PM your time. Get the team together and go partying or something. It's not like any of the fans are going to form and angry mob and raid your house if you're not working 24/7 until August 24.... oh wait, yeah, they might do that Still, you deserve a break to at least sleep.

 

Actually, he doesn't, if something needs to be fixed/released prontosauce. Curse of schedules. Though he should take a break. . .(Just about 10 minutes or so, mind you.)

Reply #19 Top

L3ss talk, Moar code!1!11! :3  nom nom nom

 

Reply #20 Top

ok I registered an account especially for this msg....

 

PLEASE PLEASE PLEASE include an option for cheating AI....

also it would be great if we can set what and how much the AI should cheat :)

 

it will not take too many hours to do :) - i am a game developer so i have some idea how much it can take

+ it will be great bonus to the game

Thank you!

 

P.S. I am tired of [pretty graphics - shallow gameplay] games....  so i am waiting anxiously for this one

Reply #21 Top

My question is probably stupid, but could AI learn by getting feedback from others AIs on trying new tactics that turned to be efficient or not? I mean that a successful AI (means it beated the human player) would connect to a server and upload its tactics, then all other clients would connect and update from there. This would allow AI to adapt seeing what type of strategy the human player has (expensive, economist) and use the most appropriate countermeasure. I hope you see what i mean :)

Reply #23 Top

Quoting EvilScience, reply 20


PLEASE PLEASE PLEASE include an option for cheating AI....

 

If, I'm understanding previous posts from Brad on the AI XML files, you can edit something or other with a handicap/allowance variable above 1.00 to allow the AI to cheat in some way or another. His intent is to make the AI INCONCEIVAB(LE)LY mod-able by someone with just a hint of coding knowledge, or even, I suspect, a hint of common sense.

Reply #24 Top

Quoting Frogboy, reply 2
Yes.  Each AI's personality is defined in XML.  Modders can make their own AI personalities as well.

Nice, this reminds me of the Kohan AIs. :thumbsup:

 


Now, I understand that people want the game to come out on August 24th (the scheduled release day). I very much want this too. But we’ve been working on this game for a long time and we want to get it right and the AI is a big part of that. If the AI isn’t ready, we’ll push it back to the next retail slot available to us (February 2011).

I am pretty confident that the AI will be ready.  So again, how will I know if it’s ready?

Hm, that is good to hear Froggie. I must admit...I was[?] pretty sure that the game won't be released in this year.

Reply #25 Top

Just a little (maybe O:) ) question, will we be able to just have a few AI's play against each other and see how / why they decide to do the things they do? That could make for an interesting new game, have people try to develop an AI that can beat the others, could even become a tournament, let the best AI win and become self aware... Ok, that last part may be a bit too much :grin: