Brad Wardell's site for talking about the customization of Windows.
Published on June 17, 2009 By Frogboy In Elemental Dev Journals

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.


Comments (Page 4)
5 PagesFirst 2 3 4 5 
on Jun 19, 2009

psychoak
If an AI ever does become sentient, we're hosed...  It's sure to exterminate us just for the hell of it.
Why destroy us when it could manipulate the brainless masses into doing its will?

on Jun 19, 2009

Why destroy us when it could manipulate the brainless masses into doing its will?

I get this part, but why the cow? Because it's the thing that looks closest to a sheep?

on Jun 19, 2009

Milked like cows?

on Jun 19, 2009

I suppose, though brainless masses are usually compared to sheep.

on Jun 19, 2009

Cows are almost as dumb as Horses, so the analogy still stands.

on Jun 19, 2009

Now we're up to horses? Where did horses come from?

on Jun 19, 2009

Annatar11
Now we're up to horses? Where did horses come from?

From the Hyracotherium.

on Jun 19, 2009

... Thanks.

on Jun 19, 2009

good read!

on Jun 21, 2009

I think the horses conversation stemmed from the Unicorn conversation we had in another thread.

on Jun 24, 2009

I know nothing about AI programming and very little about video games, so forgive me if my question is stupid :

Why not allow the AI to "think" longer before playing ? I play computer chess, where there is a strong correlation (although not linear of course) between the program's playing strength and the amount of time its computes before playing. Wouldn't that work in strategy video games ?

I wouldn't mind waiting one or two minutes before the AI plays (for late-game turns at least).

The program could also compute while the human player is playing (many things on the AI side seem independent from what the human player does ; or it could try to guess what the human player will do, as chess computers do). I know it takes me a long time to play, so the AI would strongly benefit from that.

on Jun 24, 2009

Wittgenstein83


The program could also compute while the human player is playing (many things on the AI side seem independent from what the human player does ; or it could try to guess what the human player will do, as chess computers do). I know it takes me a long time to play, so the AI would strongly benefit from that.

I don't think we need to concern ourselves with it, but your suggestion about the AI being able to come up with better strategies the longer he player takes to do his turns would be bad news for anyone who likes to consider what they're doing.  If it did work that way everyone would be worried about taking too much time to complete their turns.

on Jun 24, 2009

KellenDunk

I don't think we need to concern ourselves with it, but your suggestion about the AI being able to come up with better strategies the longer he player takes to do his turns would be bad news for anyone who likes to consider what they're doing.  If it did work that way everyone would be worried about taking too much time to complete their turns.

If I'm not mistaken, GC2 did do something like this (or they talked about maybe doing it, at least) - most of the AI actions were calculated during the player's turn. And it needn't be "bad news" for anyone who takes long turns. For one, most would enjoy the challenge, and secondly AI competence would still ultimately be limited by the difficulty level. For example, if you leave an Easy AI for 10 minutes it's not going to turn into a harder AI - it is fundamentally limited by its difficulty setting (easy AI doesn't have access to the same, better, algorithms that harder AIs have). Having longer to take turns could just mean AIs can consider more things more thoroughly and act a little less predictably, but its decisions wouldn't necessarily be of a higher quality.

Also, you don't really want even easy AIs to act as if they're just clicking things at random - ideally you want them to act as a bad or beginner player. Having more time for the AI to figure out what to do could potentially help get rid of some of those nonsensical actions that pretty much only a bad AI would ever do. I also don't know that much about AI, so I could be wrong about all this...

on Jun 24, 2009

If I'm not mistaken, GC2 did do something like this (or they talked about maybe doing it, at least) - most of the AI actions were calculated during the player's turn.

That's essentially why AI in turn based game tends to be quite considerably superior than in real time strategy games.

In a TBS, the AI has, for all practical purposes, an infinite amount of time to decide what to do - the player's turn. In an RTS, all the calculations have to be done in real time at set intervals which greatly limits the AI's potential. It just can't be complex enough because it needs more time and more resources than it's able to get.

on Jul 09, 2009

Wittgenstein83
I know nothing about AI programming and very little about video games, so forgive me if my question is stupid :

Why not allow the AI to "think" longer before playing ? I play computer chess, where there is a strong correlation (although not linear of course) between the program's playing strength and the amount of time its computes before playing. Wouldn't that work in strategy video games ?

I wouldn't mind waiting one or two minutes before the AI plays (for late-game turns at least).

The program could also compute while the human player is playing (many things on the AI side seem independent from what the human player does ; or it could try to guess what the human player will do, as chess computers do). I know it takes me a long time to play, so the AI would strongly benefit from that.
Chess programs are more like search engines , thus they look at all possible moves :1 ply( to keep it simple let's say there are  20 possible moves), then all replies to the first moves 2 ply (20x20 =400), then all those replies 3ply (8000) , 4 ply (160,000), 5 ply (3.2 million), 6 ply (64 miliion), 7 ply (1.28 billion), 8 ply (25.6 billion),etc. If you have a 3 GH processor then it takes a little over 8 seconds to see all replies 8 moves ahead.

 Also the chess program pick it's calculated "2 ply" move  from it's list as your next move then start searching it's next reply during your turn. If you happen to pick a different move then the search engine has to start over as all the calculations done during your turn are now useless.

Since most TBS has tons of more options then just moving one piece per turn (diplomacy, resources, building more units for example) as well as luck (chess battles are absolute) a chess AI search engine  isn't very useful in other strategy games.

  Just for example let's increase the most possible moves  for each turn to 100. For a 3 GH processor to search every possible reply 8 moves ahead it will take a little over 38 days.

5 PagesFirst 2 3 4 5