Elemental: AI designing

image

For those of you not familiar with game development, most of the development is spent designing the engines and technologies that will be used by the game. In our case, about 2/3rds of the time is spent on that kind of thing. 

In many respects, this time is much like developing a traditional software application.  Elemental uses a graphics engine that has been developed over the past couple of years for Society.

Our previous games used an engine called Pear that was developed in the late 90s and enhanced over the years.  The new engine, called Kumquat, has all kinds of goodies (as you'd imagine).

One of the big differences in Kumquat from my personal coding perspective is its use of Python for scripting.  Our old engine wasn't scriptable so everything was written in C++.  Now, Stardock is a bit unusual that we don't tend to use scripts in our games. In Elemental, the only reason we're using scripting is to make it easier for other people to mod the game.

Anyway, now we're starting to put the pieces together to actually make "the game" as opposed to a series of technologies.  That means I finally get to start sinking my teeth into AI.

With Galactic Civilizations, I only got a couple of months to work on the AI and I had to do it basically on my own.  This time around, our team is large enough that I get to work on it longer and I have help.

Not that I don't mind writing functions like get the distance between two points or whatever but having others who can write the worker functions will save me a lot of time.

One other difference in Elemental was the decision to have multiplayer support. There's a single player reason for this - I want to see how people play the game before the game is released so that I can incorporate clever strategies into the AI.

Those of you not familiar with Stardock developed games know that from my personal perspective, the only point to these games is the AI.  Personally, I think it's great that humans want to play the game too but I'm in it for the computer players.  My fun on GalCiv was always watching the different AI personalities fighting each other to see who would win.  But then again, I'm a pretty weird guy.

114,193 views 67 replies
Reply #1 Top

Neat stuff. :thumbsup:

*Makes a note to start using camelcase in function names*

Reply #2 Top

So would you say that the underlying technologies, the engine and so forth are complete at this point, or do you expect they will continue to be "tinkered" with during the remainder of the development cycle?

I really appreciate your perspective that a major purpose of multiplay is to develop AI's that can both emulate human type of innovation as well as develop good counter strategies to human dirty tricks! Based on the fact that you did the GalCiv AI in a couple of months, I really have high hopes and expectations from E:WOM's AI - I really believe that you have the capability to develop a truly next generation of AI (at least that has been seen in computer games). I was pretty happy with the AI in GalCiv2, but I will say I had the feeling that the different personalities could have been fleshed out more and have at least some of the opponents display some real cunning - although they did a fine job of behaving accurately for the stereotypical opponents that were represented.

I would realy like to see opponents that are in it to win, but also behave at least somewhat like a person would. Instead of just blowing up at you, an ally should be a little more willing to warn you that you are doing something that it does not approve of, and give you an opportunity to comply. I also want some surprises from the AI that will reflect the unpredictability of the human player. Most AI out there now, you just have to learn how a given computer opponent needs to be dealt with, and then follow by rote how to behave to get the AI behavior that you want. AI needs boith a degree of consistency (a real personality profile) but also the capability of doing something unexpected.

I have high hopes that you will be able to deliver something that will really shake up the ganing industry.

Reply #3 Top

Agreed with you on the watching computer dish it out.

Mathematically interesting!

Reply #4 Top

One other difference in Elemental was the decision to have multiplayer support. There's a single player reason for this - I want to see how people play the game before the game is released so that I can incorporate clever strategies into the AI.

:smitten:    I love you! 

I can't wait for the first time an AI 'goes Gandalf' on me.

Sammual

Reply #5 Top

you are pretty strange frogboy ^_^

 

personally, i enjoy playing games. i am a human and i like to play against other humans. im thrilled that you are adding multiplayer to elemental

Reply #6 Top

The AI in Galactic Civilizations 2 was pretty good. I'm eager to see what the AI will be like in Elemental.

Reply #7 Top

So will the modders be able to individually access the member AI functions to change the scripts? Meaning, is that hierarchy in the screenshot what's going to be available to the public, and if I want to change the AI's foreign diplomacy stuff I can just start messing around in AIPYForeignPolicy()?

Reply #8 Top

This (the AI moddability) is looking very good thus far.

And I'd really like to pit AIs against each other in AI-only matches too, Brad.  Hint, hint ;)  I'll consider my custom built AIs a success when they don't get eaten by yours every time.

Reply #9 Top

Quoting Denryu, reply 2
So would you say that the underlying technologies, the engine and so forth are complete at this point, or do you expect they will continue to be "tinkered" with during the remainder of the development cycle?

Today's twitter updates have been about getting units hooked up to receive messages and do what the player tells them to. Based on that, I'd speculate that the underlying tech isn't totally done yet, though it is far enough along that they can start putting it together into a functional game.

They've got quite a lot of development time left until release, so it seems unlikely all the tech is finalized.

Reply #10 Top

If it means I can help you make the AI slightly meaner, I would gladly play a game against you.

Reply #11 Top

Quoting keithLamothe, reply 8
This (the AI moddability) is looking very good thus far.

And I'd really like to pit AIs against each other in AI-only matches too, Brad.  Hint, hint   I'll consider my custom built AIs a success when they don't get eaten by yours every time.

Yes wouldn't it be cool if this launched a whole new type of multiplayer - no human interaction allowed, it is just "my AI vs. your AI" or even better "my AI vs your and your and your and your AI". :drool:

Reply #12 Top

So Frogboy what is your general AI approach? Are you going more for a mathematical approach (trying to rate and weight all decisions), going more for heuristics (implementing your gut feelings about the game)...or what else?

I'am really interested, I've implemented one AI for a card game and I already found this really challenging.

And that was for a well known game concept, not like what you have to do, for a completely new concept without any real experience regarding the overall mechanics of the game.

Reply #13 Top

Is the python AI api available in the alphas / betas? And are the Stardock made scripts available for editing? Getting started from scratch will be really hard...

I am looking forward to doing some AI programming in python. Doing web-programming in Java at work, so I need to start coding something fun. All Java and No Python makes Horemheb a dull boy...   :)

Reply #15 Top

I hope we create some clever strategies for the AI.  O.o;      I'm usually pretty bad at creating such thing.  I just tend to be good at general micro which puts me about middle-high on any ladder or teir system (using other compeditive online strategy games like Starcraft as a base)

 

So I guess the single player AI will be different from the multiplayer AI?   (since the multiplayer AI will have to be mod-ready, where the single player won't)

 

the AI is a part that really excites me.  Just because I'm still enthralled by the old "are you human?  are you sure?" idea of AI that mimics humans as much as possible.

Reply #16 Top

Simply awesome stuff. The ability to dig into the AI scripts and actually use my developer skills as part of the alpha/beta is a big reason I'm really interested in being part of the alpha/beta.

Reply #17 Top

More people and more time spent on AI great! :thumbsup: Ill be toying more with the AI as I get more CS Classes done.

Reply #18 Top

Quoting Lost_WLd, reply 1
Neat stuff.

*Makes a note to start using camelcase in function names*

That's funny because I believe wide_names are preferred over camelCase in the Python community :)

Reply #19 Top
That's funny because I believe wide_names are preferred over camelCase in the Python community :)

That seems to be the case for function names, though classes are mixed case. However, it also says to essentially stick with whatever style the project you're on is using. Given Elemental is coming from a C++ background, that'd be the camel case convention.

http://www.python.org/dev/peps/pep-0008/

 

Reply #20 Top


My fun on GalCiv was always watching the different AI personalities fighting each other to see who would win.  But then again, I'm a pretty weird guy.

As single player, you could have an option (goodness, everything is solved by the all mighty options) in which you put the AI in charge of your empire/kingdom so it plays for you while you go to work/sleep/study/watch/... until the game ends or you take the control again. It would feel like some kind of autoresolve game instead of battle.XD (I'm partially joking, of course)

Thank you for the update, Frogboy.

Reply #21 Top

Every Heroes of Might & Magic since the first one; both Age of Wonders, so obviously, I'd like to help beta this.  How do I make sure I'm in the lotery please?  (I have Galactic Civilizations II, DemiGod & Sins).  I guess my friend, who has no SD games has no chance to get in (insert boos/hisses)?

Reply #22 Top

Ah functions takes me back to the good old computer science days but business is the ultimate evolution of just about anything. 

Reply #23 Top

Quoting PurplePaladin, reply 21
Every Heroes of Might & Magic since the first one; both Age of Wonders, so obviously, I'd like to help beta this.  How do I make sure I'm in the lotery please?  (I have Galactic Civilizations II, DemiGod & Sins).  I guess my friend, who has no SD games has no chance to get in (insert boos/hisses)?

Everyone who pre-orders the game will be able to help beta test. The lottery is only for the alpha. Stardock usually has 3 beta rounds, not including any alphas or gammas.

So you and your friend both will be able to beta as long you both pre-order.

Reply #24 Top

Quoting Denryu, reply 11

Yes wouldn't it be cool if this launched a whole new type of multiplayer - no human interaction allowed, it is just "my AI vs. your AI" or even better "my AI vs your and your and your and your AI".

There are games out there that do this.  They are a blast (As long as they are supported to keep the game balanced).

Sammual

Reply #25 Top

The AI has to be one of the top priorities.  Also, the AI has to be good at avoiding every exploit the human comes up with- especially since this will be primarily a SP game.