Elemental: War of Magic - Development Update - AI Wars

skavenhorde

Little BRO Rat
Joined
February 3, 2007
Messages
5,347
Location
Taiwan
Brad Wardell posts about the difficulties of creating the A.I. for v1.1. According to him the key to the problem is threads which hasn't been used in v1.0:

But there is another way: Threads. Threads allow you to have different things computing concurrently. Even on a single-core machine, threads can make a huge difference. Threads are the reason why Stardock games have historically had such a strong reputation for good AI. The AI can be calculating strategies while the player moves. There can even be background threads that do nothing but look at the game state and set various flags for the AI to act on when the time is right.

Threads are the reason why Galactic Civilizations II was able to have some of its most infamous diplomatic moments such as “So, I see you’re building up quite a fleet there, so let me guess, you’re going to mass up for an attack, take my planet and then sue for peace? Well, sorry but in the meantime, I’ve been putting ships around your ships..”

So why not threads?


Why do games (including Elemental v1.0 and other major strategy games of 2010) not use multithreaded AI? Debugging. If multiple things are touching bits of memory, modifying variables, creating or deleting objects it can be a real pain to coordinate. The bigger the team, ironically, the harder it is to do.

.............

Now that we have Kael to take charge of production, Toby as design implementer and CariElf back as lead developer, I can do for Elemental what I do best: Multithreaded AI development.
More information.
 
Joined
Feb 3, 2007
Messages
5,347
Location
Taiwan
Great to hear. I definitely want my ass kicked. :)
I've been waiting around for a long time now for this game to really come into its own. I suspect 1.1 may be the time I get back into it, though I may wait for a patch after that for them to smooth things out even further. This game will be phenomenal once enough work is put into it. I do still love it as it is now, though.
 
Joined
Oct 13, 2010
Messages
78
Guess i can play it before christmas. Curious how it will play. Not touched the game so.
 
Joined
Jan 8, 2009
Messages
1,745
Location
The Netherlands
Actually, right now they have fixed a lot of the biggest issues with the initial release. It's not everything they promised (or that we hoped for) but it is pretty good. If the current release (1.09?) had been the initial release there would still have been (well justified!) criticism but not the raking over the coals they received.
 
Joined
Oct 24, 2006
Messages
1,769
Location
Minnesota, USA
I don't know. This guy doesn't inspire a lot of confidence. If he can't design basic game systems properly, why would anyone think he could design complicated and sophisticated multi-threaded AI?
 
Joined
Aug 18, 2008
Messages
15,679
Location
Studio City, CA
I don't know. This guy doesn't inspire a lot of confidence. If he can't design basic game systems properly, why would anyone think he could design complicated and sophisticated multi-threaded AI?

Because he has.

They're good.
 
Joined
Feb 23, 2009
Messages
520
finally, a commercial game that takes advantage of multithreading programming. Mind you, multitasking operating systems have been doing that for years, only they do it linearly by cycling through the processes.

Nevertheless, it means someone out there is finally taking advantage of what everyone's desktops can do. Typically, most games don't advantage of more than half (or the square root!)of what your computer can do. Its extremely complicated though and collisions can be problematic. Quite often, if not done right, multithreading can slow down the process and can even freeze up thanks to deadlocks.

Anyways, can distributed multithreading in gaming be far behind? A little cloud computing with multiple players?
 
Joined
Oct 19, 2006
Messages
5,209
Location
The Uncanny Valley
Yes. Get yourself a copy of GalCiv or GalCiv II. The AI does some freaky things.

That was one of the few games I have ever played where the AI ended teaching how effective certain strategies could be. I had been pressing a massive assault against one AI player for several turns. My ships were significantly more advances and more powerful than theres, if a bit slow due to my choice of combat effectiveness over range and speed.

I also had relied on using starbases to extend their relatively short range but figured the AI would be too stupid to attack them as I was used to AIs focusing on the most obvious, closest, and immediate threats. And hey, the only defense they seemed to manage to produce were mid-sized and suprisingly under armed warships and even only a few of those. In fact most of their plantets didn't seem to have any defenders in orbit by the time I captured his first two planets.

A few more turns into my conquest of this apparently feeble AI I discovered why those planets were empty of defending ships. I also discovered why the ships had so few weapons for their size. They had been outfitted for range and speed. Almost all at once they attacked the starbases which had given me the range to reach their planets and the troop ships I had held back behind my main fleet until one was needed to invade a planet.

It was only my second game but it was also the last time I would do anything as stupid as think the if I were aware of a giant potentially day-ruining flaw in my plan that the AI might not also somehow come to realize it. I should have probably realized they had better sensors then me too. They kept trying sell me the upgraded sensor techs and I kept refusing because I wanted to use that money to build more ponderously slow space-hulks for their inevitable demise.

Their defeat was still inevitable, but it ended up being one of those more distant kind of inevitability like say the sun turning into a red dwarf. I think by the time my warships finished their cold-sleep automatic returns to refueling range the AI had managed to destroy all my trade vessels, every one of my starbases, and I event hink I heard it laughing at me when it thought I had the volume turned down too low to hear. Cheeky bastard.
 
Joined
Nov 20, 2006
Messages
1,710
It's really that good? I bought GalCiv 2, but it's been sitting in my "to do" pile for awhile now. It just got bumped to the top of the pile :)
 
Joined
Feb 3, 2007
Messages
5,347
Location
Taiwan
the AI had managed to destroy all my trade vessels, every one of my starbases,

This reminds me of my strategy of Homeworld of constantly trying to catch enemy harvesting ships. ;)

Especially full ones. ;)

It became my favourite part of strategy. ;)

It's as simple as this : If I manage to capture them again and again, the AI has 2 problems at the same time :

- need to build more harvesting ships
- running out of stuff, because the harvested stuff is stolen by me. ;)

It was risky, though, because at one point the AI decided to dispatch some smaller ships for watching over their harvesting ships, too. ;)
 
Joined
Nov 5, 2006
Messages
21,893
Location
Old Europe
It turns out what I thought was GalCiv 2 was actually GalCiv 1. Is the AI in that one as good as the second game?
 
Joined
Feb 3, 2007
Messages
5,347
Location
Taiwan
I hate cheating AIs. A lot of games either give the AI unlimited resources or faster ways of generating resources (for example in old C&C where the enemy AI maxed out all their silos every time a harvester returned to the refinery).
 
Joined
Oct 18, 2006
Messages
7,578
Location
Bergen
Thanks, Bill. I loaded it up and tried it out. I don't know why I never got around to it before. Seems decent enough. I need to get the hang of the rules, but other than that everything looks, feels and sounds nice.
 
Joined
Feb 3, 2007
Messages
5,347
Location
Taiwan
Back
Top Bottom