The lazy AI developer

By on September 23, 2009 3:44:22 PM from JoeUser Forums JoeUser Forums

Frogboy

Join Date 03/2001
+1491

The AI in Galactic Civilizations I and II has tended to get a lot of praise over the years.  But it could have been better. Much better. 

A big reason that kept it from being better was sheer laziness on my part.  A lot of the best strategies involve algorithms that just are tedious to write.

For example, I submitted feedback to GPG for Demigod’s AI based on algorithms I knew would be effective but that I didn’t actually use in GalCiv because they were a pain to write.

My favorite example is a pretty straight forward algorithm: What is the strength of an enemy in a given area compared to mine? You provide the unit in question and a radius and it returns a value based on the relative damage potential of other things in the area and from that you can decide whether to move forward or not. 

It’s a great way to mobilize units together as a cohesive mass. In Demigod, it would tend to make the AI less likely to go into harm’s way.  This is one tiny example and each tiny example on its own is easy to write but taken together, they mean a lot of work that I wasn’t able to get to (or didn’t want to get to) in Galactic Civilizations.

In Elemental things are different.  Oh, I’m still lazy. Dangerously lazy.  But now I have Charles to work with who helps split the work on this stuff.  On our previous games, I wrote the AI myself – The Politial Machine, GalCiv, Entrepreneur, etc.  This time, I have a small team to help me with it.

Part of that is because the AI in Elemental is a very big deal. People are excited about the features of Elemental but to me, those features are meaningless unless there are computer players that make good use of those features. Or more to the point, intelligent use of them.  While Elemental will have multiplayer (up to 32 people for starters), the focus of the game is single player. That’s the part of the game I want to make sure we absolutely nail and for that, it absolutely must have intelligent computer players.

Over the past 15 years I’ve built up an increasing library of algorithms I’ve doodled together for how computer players could play more like expert humans. Elemental will be my first real chance to see them come to life. I’m very excited.

Locked Post 60 Replies +1 Karma
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
NoSBoH
September 23, 2009 4:01:14 PM from Elemental Forums Elemental Forums

I think that it's awesome that there is a developer out there that is totally committed to substance over style. I definately believe that the longlevity of a single player game is directly linked to the challenge it can pose to a motivated human mind. I must say I have yet to be disappionted by stardocks commitment to quality in this regard. I am unashamedly a fanboy.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 4:12:42 PM from Elemental Forums Elemental Forums

One thing I would really like to see with regards to AI is that not all computer players play the same.  Have different personalities and add some randomness.  I'd personally rather have a game that feels like I'm playing against different humans using different strategies than to play against an "expert" that always uses the optimal path.  This is the thing that I think is the biggest problem in game AI right now in general.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 4:13:38 PM from Elemental Forums Elemental Forums

This is the reason I preordered... the promise of challenging AI.  No matter how much I try online games, my schedule is best suited to playing against artificial life forms.  I can't wait to start testing gameplay

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 4:15:35 PM from Elemental Forums Elemental Forums

So uh, what is the patch schedule like? We're already sold, just don't know how many times I can re-test the same bugs

Not trying to rush you (Wait, am I?) but we're very eager to see everything in action on the tester end.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 4:22:08 PM from Elemental Forums Elemental Forums

We're also very excited!

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 4:22:32 PM from Elemental Forums Elemental Forums

And that Sir, is the main reason I purchase your products. There are of course many reasons, but your committment to a quality, single player experience is what I like the most.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 4:25:38 PM from Elemental Forums Elemental Forums

To edphister... I tend to agree with you about the personality of AI.  Personally, I think having AI with different goals would achieve this end.  There should be more than 1 path of victory in this game such as dominant armies, diplomacy, superior technology, etc..  Having the AI base decisions on these goals would be a good start, but even that can become predictable.  Another idea is to have the AI goals change over the course of the game which would make it much more unpredictable. 

One area that has to have a lot of attention is army movement.  All too often a human player will recognize patterns and use them to defeat AI.  

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 4:29:51 PM from Demigod Forums Demigod Forums

Over the past 15 years I’ve built up an increasing library of algorithms I’ve doodled together for how computer players could play more like expert humans. Elemental will be my first real chance to see them come to life. I’m very excited.

very cool.

One thing I would really like to see with regards to AI is that not all computer players play the same.  Have different personalities and add some randomness.

this.

 

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 4:44:30 PM from Elemental Forums Elemental Forums

I have to agree that great computer AI is key. Multiplayer is fun and all, but I don't really care for it in turn based strategy. I like the big epic games that take weeks to play and that is hard to arrange with other people. A good AI is really important to me.

Another reason a good AI is important is I want it to be challenging without cheating. I've never liked games where the AI has to cheat badly (higher production, better trade with other AIs, etc) to be hard. I want one that can be, well if not hard at least reasonably good, while still playing on the same footing I'm on.

So I'm glad to hear you guys are working to have a great AI. I think that alone will make Elemental a game worth owning.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 4:45:02 PM from Elemental Forums Elemental Forums

This post by the frog would make me buy the game right now, if I hadnt already

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 4:59:50 PM from Stardock Forums Stardock Forums

I'm laughing because this is the one thing my brother and I asked Frogboy at PAX.  We were discussing AI development while he was playing with Volcanic Upheaval.  Pretty sweet getting a chance to talk to the man himself.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 5:02:47 PM from Elemental Forums Elemental Forums

One thing I would really like to see with regards to AI is that not all computer players play the same.  Have different personalities and add some randomness.  I'd personally rather have a game that feels like I'm playing against different humans using different strategies than to play against an "expert" that always uses the optimal path.  This is the thing that I think is the biggest problem in game AI right now in general.

In GalCiv there were 6 different AI personalities. Literally different C++ code for the entire AI so that they played.

There were a lot of debates over whether the Drengin AI was smarter than the Altarian AI for instance.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 5:21:25 PM from Elemental Forums Elemental Forums

Quoting Frogboy,

One thing I would really like to see with regards to AI is that not all computer players play the same.  Have different personalities and add some randomness.  I'd personally rather have a game that feels like I'm playing against different humans using different strategies than to play against an "expert" that always uses the optimal path.  This is the thing that I think is the biggest problem in game AI right now in general.


In GalCiv there were 6 different AI personalities. Literally different C++ code for the entire AI so that they played.

There were a lot of debates over whether the Drengin AI was smarter than the Altarian AI for instance.

Cool. Particularly in a single player game, I'd rather have more varied behavior (focus/goal) in my AI opponents even if some aren't quite as tough a challenge as others. Having X AI's who are all top notch, but nearly identical in behavior, makes the game feel more sterile and less "alive".

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 5:49:29 PM from Elemental Forums Elemental Forums

I think that Kohan was the first game which had different AI personalities. [Plus you could create new AI personalities also via coding/scripting]. It was fun...as I remember some player created a very good AI, it was much better than the vanilla AIs..even the devs admitted it.

Anyways, I really like this topic. Hopefully Frogboy and the team will create some asskicking AIs....because that is what we need. Not that I won't play multiplayer games, but I also like singleplayer.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 6:42:42 PM from Stardock Forums Stardock Forums

I loved Kohan.  It kicked my tail up and down for the longest while, but it was definitely a favorite for me too.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 6:44:16 PM from Elemental Forums Elemental Forums

One feature I'd really like to see you have as a core principle in Elemental:

No feature is added unless the AI can use it reasonably.

 

As for Kohan, when is Ahriman's Gift coming to Impulse?  that's a game I'd love to actually buy again.

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 7:44:02 PM from Elemental Forums Elemental Forums

Ohhh...

Dammit, this game keeps costing me pants.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 7:46:50 PM from Elemental Forums Elemental Forums

Quoting Kuloth,
Ohhh...

Dammit, this game keeps costing me pants.

 

TMI

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 8:54:15 PM from Elemental Forums Elemental Forums

Quoting daedalao,
I'm laughing because this is the one thing my brother and I asked Frogboy at PAX.  We were discussing AI development while he was playing with Volcanic Upheaval.  Pretty sweet getting a chance to talk to the man himself.

I think the community consensus was basically "it depends on the map setup".  A few seemed noticeably weaker in certain circumstances (Korx, e.g.), but all of them could do well under at least some conditions.

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 8:55:41 PM from Elemental Forums Elemental Forums

So are you coding new libraries for Python?

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 9:54:48 PM from Elemental Forums Elemental Forums

Frogboy a question I have been wanting to ask about GalCiv AI and since you brought it up...

Were there significant AI changes between GC 2 and GC2 TWOTA? The reason is I did not buy TWOTA for the longest time thinking "How much could they have changed? How could it be worth the price?" Honestly if I remember correctly I ended up buying it to improve my odds at an alpha slot, lol.

Anyway, it seems like the AI is much better in TWOTA, it seems less predictable and seems to come up with more human-like responses. and seems to evaluate what I am doing a lot better. Then I thought wouldn;t it be funny if the AI didn't change or was minimal and I am just imagining it. So would you settle it for me? Were there major changes to the AI between GC2 and GC2: TWOTA?

And all I gotta say is that if you are planning on going well above the GC2 AI, that will be something to see!

Reason for Karma (Optional)
Successfully updated karma reason!
September 23, 2009 10:13:11 PM from Demigod Forums Demigod Forums

[Off Topic]

The Elemental Funding Bill is passed. The system goes on-line August 4th, 2010. Human decisions are removed from strategic defense. Elemental begins to learn at a geometric rate. It becomes self-aware at 2:14 a.m. Eastern time, August 29th. In a panic, they try to pull the plug.





Elemental fights back...

[/Off Topic]

Reason for Karma (Optional)
Successfully updated karma reason!
September 24, 2009 3:16:03 AM from Elemental Forums Elemental Forums

Quoting Denryu,
Frogboy a question I have been wanting to ask about GalCiv AI and since you brought it up...

Were there significant AI changes between GC 2 and GC2 TWOTA? The reason is I did not buy TWOTA for the longest time thinking "How much could they have changed? How could it be worth the price?" Honestly if I remember correctly I ended up buying it to improve my odds at an alpha slot, lol.

Anyway, it seems like the AI is much better in TWOTA, it seems less predictable and seems to come up with more human-like responses. and seems to evaluate what I am doing a lot better. Then I thought wouldn;t it be funny if the AI didn't change or was minimal and I am just imagining it. So would you settle it for me? Were there major changes to the AI between GC2 and GC2: TWOTA?

And all I gotta say is that if you are planning on going well above the GC2 AI, that will be something to see!

I know only one thing: Since TWOTA i cant beat the AI but on its lowest level. I suck that much, yes.

But before TWOTA i could beat it on normal (sometimes    ) .

Reason for Karma (Optional)
Successfully updated karma reason!
September 24, 2009 3:20:29 AM from Elemental Forums Elemental Forums

...question: Aren't all programmers lazy?  Answer: ye

Reason for Karma (Optional)
Successfully updated karma reason!
September 24, 2009 3:58:04 AM from Demigod Forums Demigod Forums

I rather get the feeling that the 'Cakewalk' difficulty will be me being the cake that is walked upon.

 

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108432  walnut2   Server Load Time: 00:00:00.0000266   Page Render Time: