Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.
Gone for nearly three weeks!
Published on April 26, 2006 By Draginol In GalCiv Journals

Tomorrow I'm off to Texas for 9 days. Then I come back and I'm off to Redmond Washington for meetings with some software company there for a week.

I heard someone on JoeUser say that only people from Texas would go to Texas on vacation. Well, okay, yes, I'm from Texas. And I'm going to Dallas to visit friends and then to the gulf of mexico.  But it's warm, it's sunny, and I'll get to spend some much needed time with the wife and kids.

It's been a real adventure since this past November.  We got WindowBlinds 5 out in November and then at the very end of February we released Galactic Civilizations II.  I won't deny that it's been a lot of work.  Between Thanksgiving and mid March I had worked every day (including Christmas) to make sure things got taken care of.  So it'll be nice to get away from the computer and such for a couple weeks.

We just released Galactic Civilizations II v1.1 yesterday and things seem to be going pretty well.  It's just as well that I'm going because I've already thought of some new things for the AI that I think could make a difference in how it plays.  And the engine team got my new option in -- "Allow AI to use extra CPU time" that people who are willing to wait (or have really powerful CPUs) can set the AI to use algorithms that are more time intensive. 

I don't think most people sit and and realize the restrictions on writing computer AI code is.  You can't do things like do a for loop of all the tiles that are uncovered by the FOW that a ship might travel on in its turn or the following several turns along with nearby tiles to see what might happen. Each ship has to decide its move in less than a milisecond. Each planet has about a milisecond to decide what it's going to build.  And this is on typical hardware mind you, not state of the art machines. The trick to writing good computer AI isn't just sittin gthere putting together clever algorithms, it's also being able to create algorithms that do their thing without using much time.

For example, one of the most intensive things that the AI does is design ships. Part of that reason has to do with the actual graphical assemblage which I don't fully understand what's involved on that part.  But I only allow the AI to design ships once per year right now. If I tweaked it to even 3 times a year I think you'd notice a significant difference, especially early on when human players have better ships because in 2226 the human player has gotten plasma weapons and the AI is still running around with laser 1 or something when it has actually researched Plasma weapons as well.  But I digress.

I've really had a lot of fun these past few months. There's not a real good business justification to be working on AI tweaks on weekends and such, but that's not what it's about.  It's about making cool stuff. If I weren't doing this on GalCiv II, I'd be modding some other game and at least in GalCiv's case, I have the source code.

One of the real bright points of my day was the arrival of some really thoughtful goodies from Texas Wahine, a blogger on JoeUser.com. She and my wife are on-line friends and she's a really nice person. She lives in Hawaii and sent some really neat Hawaiian stuff. Thank you very much TW if you see this.

But that's the whole thing about on-line communities, I love them. You meet such great and interesting people. A lot of companies don't actually have their own forums and such. I think they miss out.  Even though I get flamed dozens of times per day (one irate user emailed me about the "Unpleasant like northern Michigan" joke that I put in the user manual, she didn't find it funny at all), it's still worth it to talk to people and hear their ideas.

So anyway, hopefully no one will burn down the place while I'm gone <g>. I will be pretty much off the grid. Hope you have a great couple weeks. When I get back, we've got new DesktopX builds, Galactic Civilizations 1.2, Multiplicity 1.1, a new IconDeveloper, SoundPackager, and a bunch of other stuff on the schedule to get out in a short amount of time.  And I have to start arranging interviews for game developers to work on Society.

Cya!   (Draginol/Frogboy)


Comments (Page 4)
4 PagesFirst 2 3 4 
on Apr 30, 2006
"It's just as well that I'm going because I've already thought of some new things for the AI that I think could make a difference in how it plays."

Bring your laptop. You can code while the wife drives ... I'm sure she won't mind.

"And the engine team got my new option in -- "Allow AI to use extra CPU time" that people who are willing to wait (or have really powerful CPUs) can set the AI to use algorithms that are more time intensive."

Great! I will now give serious thought to becoming a fan boy. Personally, I'd be happy to wait 5 or 10 mins per turn or even much longer. If I was playing it PBeM, I'd have to wait a lot longer than that.

I wonder if there is some significant diminising returns in processing time after a certain point, or if it approaches a limit?, e.g. 5 minutes processing time allows the AI to make 50% better decisions (however you'd measure it), but waiting forever would only give 125%. Somewhere on that curve is probably a good trade off point. It would be nice to have an option to pick positions along that curve.

Any way, my short response is I'd be prepared to wait a LONG LONG time for a turn if I thought the AI was spending it hatching evil plans.
on Apr 30, 2006
Enjoy the vacation! To Texas from Upper Michigan - talk about wanting to bake the winter out of your bones...
on Apr 30, 2006
Glad to here you're going to introduce an option for the CPU to chew more time. I hate it when options are taken out of my hand, and when the developer assumes I have no patience. There's a TBS I like called Massive Assault where one of the AI developers was telling me one of the biggest limiting factors was trying to get the AI to think smart in five seconds... well, I was like "Well WTF does it need to be five seconds??"

Rather than a checkbox, I'd prefer a "think time" setting, where you can define, in seconds or minutes, how long you're prepared to wait for the AI. Why doesn't the AI redesign its ships during your turn? A good time for the AI to reconsider its designs would be when it attacks one of your fleets with one of its fleets and loses, a sure sign that it needs to rethink its design.
on May 01, 2006
"Each ship has to decide its move in less than a milisecond. Each planet has about a milisecond to decide what it's going to build."

Gee, so much autonomy. Is that how they program a chess game? "Bishop looks for good moves... nope. King's Knight looks for good moves... JUMP!"

It seems like redesigning ships for each new tech would be the perfect way for a computer to gain an advantage on the players. I know I redesign with each new tech unless I'm not building anything and researching the next one. On the other hand it's a little comforting for all the computer's fighters to be identical so I know what they do.
on May 01, 2006

You can't compare a chess AI algorithm to GalCiv.  There are very very limited moves on a very very small board.

If a game of GalCiv II were played in a single sector with 2 planets maybe that would work.

on May 02, 2006
Have a great holiday, hope you enjoy it.

And the engine team got my new option in -- "Allow AI to use extra CPU time" that people who are willing to wait (or have really powerful CPUs) can set the AI to use algorithms that are more time intensive.


w00t! That is awesome, though my setup is not state of the art I would welcome this option, though it would be nice to have this suggestion by Quitch:

Rather than a checkbox, I'd prefer a "think time" setting, where you can define, in seconds or minutes, how long you're prepared to wait for the AI.


This would allow me to play Gal Civ 2 while doing things I really should be doing !

Anyway good to see you moving in this direction!

EZ

AR
on May 02, 2006
Ooh, just imagine the branching factor for a min-max tree of a variation of chess where every piece could move every turn. Nope, not the same at all, Tandis.

on May 02, 2006
1st of all, I'm glad to see you are taking a much deserved break. 2nd, I'm not sure where to post this so I'm trying here. If someone knows of a better place for it, please feel free to move it.
Ok, I'm going to admit right here up front that I am NOT a programmer. I don't understand the limitations that you must operate under. However, if it were possible to codify, it seems (to my very limited perspective) that the best way to give the AI additional time to optimize it's moves, strategies, ship designs, fleets etc. would be during all the dead time while a human is making it's move. I DO know that the amount of time spent playing is predominantly human created. In my own case I'm going to hazard that out of a 3 hour gaming session, I'm hogging 2 hours, 59 minutes plus some number of seconds while the AI is struggling with (let's say it's a 120 turn game session with 5 AI's) 1200 miliseconds (1.2 seconds). Hardly seems balanced. In order to cut down on the fragments of analysis, I'm thinking the AI's could take turns at optimizing. In the event that I'm being my normal muddy self when trying to explain things I envision it something like this. Turn 1, AI number 1 optimizes, turn 2, AI number 2 etc. Windows and current microprocessors are reportedly capable of appearing able to multi task, it seems a logical (to a naive user) solution.
4 PagesFirst 2 3 4