Just some AI talk from Brad

Hey guys,

So that you know where we are.  At this stage, the underlying AI plumbing is complete.  That is, the AI knows how to play the game completely. It just plays it rather poorly.

So for the next month, I'm spending all my time on the strategy portion.  This is, as you can imagine, non-trivial especially since we want different players to play differently.  

Not all strategies are equal.  Some AI players will most definitely lose many of the games because their strategy isn't viable against certain styles of play.  I'm really struggling with trying to make sure these different strategies remain viable, particularly diplomatic and cultural strategies.  

Today's big job was getting the AI to design better ships and doing so without cheating. In fact, the whole "without cheating" is an obvious major disadvantage we have from other games.  To be sure, we WILL allow players to crank up the difficulty beyond normal in which case the AI gets some documented bonuses (basically money) but the goal here is to have a non-cheating AI that will challenge most players.

Another area I'm struggling with A LOT is having the AI intelligently choose what ships to build and when.  There is no hard and fast rule on that since it changes based on the map in question and what planets the AI is aware of.  In the OS/2 version of GalCiv, the AI just knew where everything was.  Now, it has to guess and scout which is a lot harder. It means the AI will send ships in the right direction (or wrong direction) as a guess.  

What techs to get is working pretty well.  That was a lot of work to get it to focus but it is working now as designed (on my machine, not on yours, it totally sucks on your version still).  However, where I"m currently stuck is getting the AI to intelligently pick a good combination of ships.  I haven't figured out the bug but something is causing it to crank out the exact same war ship no matter what. It's very annoying and it's in your build too.  I am hopeful I can get this fixed during the weekend.

That's all for now.  More to come.  

57,718 views 24 replies
Reply #1 Top

Does the AI have a function in it where it calculates which ship is needed, or 'best'?  If so, it may not be that the ai is refusing to make different ships because it only knows to make one, it could be that the ai figure out that there's a problem with other types of ships. 

 

For example --  the tiny bombers are totally useless For most things. Tiny ships that get one shot are a bit of a waste when you can make 5 frigate level ships instead.  I'm guessing that there's some basic thrust to weight ratio wrt speed and maneuverability going on, but it seems that all ships in the main map get the same speeds.  Perhaps some things should get scaled based upon the size of the ship.  

 

Wrt ai strategies, if one type of strategy is failing constantly, perhaps there is a balance problem in the design of some mechanics .  f there is, then it'll show up in multiplayer as well.

 

   One thing I noticed in your ai wars stream was that the ai needed to find better front lines and stop moving all fleets somewhere when it only wanted one to go there.   Adding in zones for both defensive and offensive strategies (risk assessments, ship and star base  requirements for the area - which leads into what to build - etc) could be a big boon for the ai .

 

the ai could also be given some heuristical decision making wrt the tech tree and 'what it can see'.  If the ai sees an enemy fleet with a lot of missiles, it should consider point defense weapons.  It could also probably calculate what techs the enemy has, and therefore define what it could need.  Weirdly most of that is is the diplomacy screen, so techs and ship design of the enemy is an open book for the most part. 

 

Similarly, if the ai sees big influence borders near it, it should add a priority to get it's own influence rolling - or kill that enemy.  Etc, etc. if you provide the ai with lots of data, you'll also need to have it make decisions that aren't entirely based upon that data. 

Reply #2 Top

Quoting SBFMadDjinn, reply 1

Wrt ai strategies, if one type of strategy is failing constantly, perhaps there is a balance problem in the design of some mechanics .  f there is, then it'll show up in multiplayer as well.

Great point, hopefully the AI and balancing are being done hand in hand

 

Reply #3 Top

look at using Heuristic algorithms (instead of linear programming).  They work really well for best guessing very fast.

 

some non-cheating things you can do (that a player for example could do), would be to offer trade to players and 'see' what techs they have researched.  based on that, you can pretty easily guess what weapons/defenses they have available.  You can also make very specialized massive scan range ships, and use those (just like players) to have better intel on enemy movements etc.  Of course you can also do some small cheating (at higher lvls) such as just letting the AI know a base aggregate amount of ships and aggregate strength values within a give range of any shared boarder, then you can pretty easy figure out what sort of defensives or offensive forces to deploy toward that boarder (as well as get some idea of what kind of weapons/defense the enemy is deploying).  note, you don't have to know each ship or total strength of player, just some sum amounts of what is Nearby your AI.  Of course, on high difficulty, perhaps you make that cheat much more 'blatant'  I'd guess most players would prefer a slightly cheating AI at higher lvl than a dumb one that just has massive prod bonuses.... 

Finally, based upon what I see to date, the AI needs to stage forces to a few locations and not spread ships around all over the place (8 ships in a fleet is better than 2 ships on planet, 2 on starbase, 2 roaming around etc...  The current AI tends to spread out way too much.

 

Reply #4 Top

you can see every ship in the diplo menu, so there's no real reason to 'cheat' it.

 

The other side of that is if the AI can't see what's on it's border, it should just drop a military starbase there with a lot of sensors.

Reply #5 Top

The biggest issue I have with the AI so far is that it seems to have no purpose.

I can play several hundred turns into the game and the AI factions are just sitting around trading with each other. I have yet to witness the AI at war with itself or forming alliances.  Its seems it does great and is aggressive on the colonization phase but then just seems lost.

I won a recent game that I set the victory conditions as alliance victory or conquest victory  with 11 Genius level factions. Not through any great skill because all I was doing was building up my planets, researching, building starbases [None were influence starbases] and spending ideology points. I literally did nothing else. I ended up controlling the entire universe except each races home worlds and the AI never lifted a finger to stop me. 

I know it is a beta still and the AI will improve constantly for many years but I hope the AI factions are a little more interesting and have some personality at initial launch.

Love the games and love Stardock though.

 

 

Reply #6 Top

Wonder if it saw a situation and assigned a value to it and used parts that matched the situations value thus balancing the equation so to speak. Like if I was using MD and the Ai would pick armor and beams at it balanced the values for the situation? :D

Reply #7 Top

For one thing if the player puts a suped up starbase near you to attack. Don't attack it over,  and over. Remember some races start out with a tech where they can see all the stars. If they have that they can at least see where to send colony ships as far as they know a star is there. I check out other people's tech through diplomacy,  and espionage. I like how the korath identified what kind of warship to build against you by what kind of warship you use in dark avatar.

The only problem they needed to be quicker. The annoying savatoge of the iconians,  and krynn in da was good. The only real imfastructure problem I've seen was you didn't use bonus tiles right if you have a certain bonus use it. Lets not put a starport on a bonus tiles. You really need to work your manufacturing and technology capitals on research,  and production bonus bigger planets. You need to research more smaller bonus techs.

Some  ways the terrans and altarians did better infastracture better in dark avatar. The krynn did good influence in dark avatar. Iconians had decent war stradegy as far as planetary invasion in dread lords. A real problem I've seen they would have hundreds,  or thousands of bc's they wouldn't use,  or they would be broke. For the most bc's are better spent in production,  or colony ships instead of anywhere else. I did miss the large fleets of the drengin,  korath,  and krynn from da.

I don't like bad guy's to weak to bother anyone. I liked the thalans and dread lords by the way. I don't like nerfed expansions. You appearently have an exploit where if you keep even research,  production,  farming,  and econimy is the most preferable untill you reach 40 billion population it is most preferable. Fix this or use it.

On upgrading only do that if your income is better than your expences. Only upgrade tiles if you don't have anymore empty ones. Identify as far as ships go what things you have from techs vs empty space to use effectively,  and upgrade when you can. Don't fall so much in debt you have to shut down your empire,  even if this means you have lower your production,  or tear down some buildings. If you are not using some spys use them.

I don't see unarmed defender's defending planets as a problem. The problem is they should've had weapons. By the way declaring war to early worked untill I figured out the ruse. Remember if you don't fix the exploit building the technological,  and manufacturing capital together helps as your technological capital. Just make sure that the ai can play its stradegy ie yor.

I hope these tips wIll help you out. Don't have nerfed colonization races,  or make sure everyone builds imfastructure.  As far as the jagged knife goes they need to do what it takes to not go broke. They also need to build all their super projects left. Ways to fix jagged knife,  build economic structures rush buy if possible.

Sell some of their more expensive buildings to maintain. My reasoning for using their super projects is to make retaking them sweeter. The other ai's will have a combination of wanting their planets back to wanting to take the best planets from the jagged knife. The way to identify best planets is by class unless you have the espionage. Also the problem with unarned defenders is you should already have had weapons not that you are using them. I think that you should have a limit on how many turns it takes to research a tech ie if planetary invasion is going to take to long to research right now research something else untill you get better infastructure. At least everyone should want extreme planets,  and advanced versions at some point. Planet trading, resource trading, survey ship trading nerds to be more difficult. I did like how you made It harder to treaty trade.

An exploit I loved from two Iwouldn't  mind seeing again is where the ai is bragging about what it was researching. If you haven't fixed it and still trade off this trade from this. When I research I go for survey tech one, and build a fleet of cargo hull survey shipd from this. Morale techs are good for researching early. Military,  tesrarch,  economics,  and population growth techs are good to start off with. Were not going to control approval this time around other wise I was going to recommend 100 percent for as long as possible. Kerp production as high financially possible without shutting down the computer will need to monitor this based on expenses vs income. If you are implementing my combined research idea,  or the idea of suggesting techs this could be used to your advantage. You could make it harder to make treaties,  and trade at higher levels. At higher levels don't build defensive,  and influence structures unless on border planets at higher levels. You could colony rush harder at harder levels. 

Considering the fact that I can run circles around everyonein making wonders It would be harder if at harder levels their were fewer trade goods,  and galactic achievements,  but more super projects evening out the playing field for everyone. Their will be a time when a tech will provide buildings with better bonuses,  or the same bonus but cheaper. This is time to upgrade that one per planet building. At higher levels you can make it where bonuses from multiple versions of the same super project don't stack. You can make the ai more prone to be hostile towards you at higher levels. At higher levels you can make the ai less likely to vote with you on the galactic council,  or vote in a way to make it really hard on you,  and then withdraw from the galactic council. Make a level ehere it only builds economic structures.

Ai more proned to savatoge through espionage at harder levels. Ai more proned to allie against you with each other at harder levels. Pirates harder at harder levels. Ai more proned to allie with pirates at higher levels. More often negative random events at harder levels. More significant nrgative random events at harder levels. Some ais not researching weapons,  or building warships is a problem. Ai less likely to send you freighters,  and more prone to send freighters to each other at higher levels. More likely to trade emvbargo you at higher levels. Attempts more to steal techs from you at higher levels.

Altarians more proned to use more people againstbyouif attacked. If there Is a new super instigater more proned to brive people to attack you at higher levels.  More ais  are more likely to intimidate you,  or declare war on you at higher levels. More ais build up quicker on higher levels

Reply #8 Top

The diplo windows showing you everything the enemy has is a real problem itself, it's terrible that you can keep track on exactly what your opponent has got.

+1 Loading…
Reply #9 Top

I don't know I kind of like being able to look at the AI's stuff. Not from a tactical advantage standpoint but from an immersion standpoint if that makes sense. I could waste hours of gaming time just looking through each factions stats. Yes I know I am a big nerd :)

 

I would actually like more galaxy wide info like being able to view other faction battles and invasions. Maybe galaxy news like when a major battle is won or a viewable war score between opposing factions etc.

Reply #10 Top

What I would like to see the AI play similar to the way I play or at least one faction...

Take advantage of trading with all known races...

For instance If I know 3 races, and they each have technologies that I don't I may trade some lesser value (non-military, non-production based) techs to these races for those technologies spreading it out so one race, isn't getting all my techs. 

Doing this I normally have almost all the techs researched in the game at any point because I'm trading with them all, this gives me a great tech advantage even if I'm weak at researching it myself.

Another thing is the AI tends to survey anything it can with it's survey ship.  Because of this if there is a wormhole near their home world they loose advantage of getting anomalies.  With this in mind maybe have them avoid wormholes for the first so many turns...

May have them get cheap resources, durantium, ect... use them to trade for techs too :)

Reply #11 Top

It's a shame the game is only getting serious A.I development for a month.I suppose great A.I does not improve sales very much.

Reply #12 Top

Quoting psychoak, reply 8

The diplo windows showing you everything the enemy has is a real problem itself, it's terrible that you can keep track on exactly what your opponent has got.

In GC2, your level of espionage spending and time determined what you knew about a particular faction, including techs, ships, etc.  

I fully expect at some point that some improved version of this will be implemented.    It would seem like if you had good relations with a faction you might know more, for example.   If you fought a battle against particular ships you would know more about those.    And if there was a mechanism to capture a ship, or you bought a ship, you would gain full knowledge of the techs and make up of that particular ship.   Just encountering another faction's ships would give some information, even without a state of war.    And a trading relationship would increase knowledge of the factions' economic strength among perhaps other things.   A sidebar to this is that if you have an open borders treaty you grant free recon access to your territory, so that scout ships, survey ships and trade vessels could gain more information about numbers of colonies and so forth.  On the other hand, sending recon vessels into another's territory without an open borders treaty should be tantamount to a DoW unless "fixed" promptly (by getting out or making a treaty).

If you had only partial information on another faction's techs, ships, and colonies then trading would be a much more interesting process.   BTW, I think an accepted trade between two factions ought to improve relations a bit.

All this is an area where programming the AI to be effective is I think a big challenge compared to the ability of the human player(s).   It is also an area that increases the value of scanning techs and recon missions.    

Be very interesting to see what happens here.

 

Reply #13 Top

Quoting psychoak, reply 8

The diplo windows showing you everything the enemy has is a real problem itself, it's terrible that you can keep track on exactly what your opponent has got.

I totally agree with this. In our era of satellites and spying we know almost everything about everyone. However, you are talking about a future of vast distances. How in the heck would I know the Iconian's entire fleet when they are past where any of my ships can possibly go?

 

Reply #14 Top

Quoting Blaze, reply 13

Quoting psychoak,

The diplo windows showing you everything the enemy has is a real problem itself, it's terrible that you can keep track on exactly what your opponent has got.



I totally agree with this. In our era of satellites and spying we know almost everything about everyone. However, you are talking about a future of vast distances. How in the heck would I know the Iconian's entire fleet when they are past where any of my ships can possibly go?

 

 

I think you overestimate satellites and spying but agreed.The diplomatic screen should only show what you are seeing on scanners or unless in a alliance treaty.

Reply #15 Top

Quoting Ashbery76, reply 11

It's a shame the game is only getting serious A.I development for a month.I suppose great A.I does not improve sales very much.

The game is not released, it's in beta and Alpha, full release non-beta is set for next month.  Stardock games have better AI by far than most games, however they do it is fine by me.  I'm happy with their process and can't wait for the full release.  With that being said I've enjoyed playing the game every step of the "beta" process.

Reply #16 Top

Another way to make things more difficult.at harder levels is if ais were less prone to aid you in time of war,  and more prone to aid each other in time of war. When aiding you they gIve you less ships that are less advanced, while giving each other when possible more ships that are more powerful through their best technologies. At the hardest level everyone would be at war allied against you. Even allied with the pirates. Even the small races. Trying to savatoge your whole empire. Voting you down in the galactic council unless you have over half of the galaxies influence. Everyone trade embargoing you. Noone trading with you while maximising trade wIth each other at hardest level. All ais making no treaties with you at the hardest level. Pirates insanely attacking trying to cripple everyone at the hardest level.

Reply #18 Top

Quoting admiralWillyWilber, reply 16

Another way to make things more difficult.at harder levels is if ais were less prone to aid you in time of war,  and more prone to aid each other in time of war. When aiding you they gIve you less ships that are less advanced, while giving each other when possible more ships that are more powerful through their best technologies. At the hardest level everyone would be at war allied against you. Even allied with the pirates. Even the small races. Trying to savatoge your whole empire. Voting you down in the galactic council unless you have over half of the galaxies influence. Everyone trade embargoing you. Noone trading with you while maximising trade wIth each other at hardest level. All ais making no treaties with you at the hardest level. Pirates insanely attacking trying to cripple everyone at the hardest level.

 

that's an example of the worst kind of "difficulty".  The AIs shouldn't all be at perma war against you just because it's the difficulty level.  that basically kills most of the game as influence, diplomacy, research etc stop being viable options for the ai. Or player.  

 

they should be aiming to win and be very good at it.  Using diplomacy to hem in growing empires that are a threat, but not just assaulting the human just because. 

Reply #19 Top

Quoting Ashbery76, reply 11

It's a shame the game is only getting serious A.I development for a month.I suppose great A.I does not improve sales very much.

 

The AI will get tons of work post-release, and the AI had work before release.  Stardock AI is consider one of their strong points- the GalCiv II AI ended up really good for the most part.

 

 

Reply #20 Top

Quoting SBFMadDjinn, reply 18


Quoting admiralWillyWilber,




 

that's an example of the worst kind of "difficulty".  The AIs shouldn't all be at perma war against you just because it's the difficulty level.  that basically kills most of the game as influence, diplomacy, research etc stop being viable options fo
 

they should be aiming to win and be very good at it.  Using diplomacy to hem in growing empires that are a threat, but not just assaulting the human just because. 

Ok hoe do you make more difficult ais at harder levels without giving arbitrary bonuses to the ai at harder levels. Remember the game balance is basically at normal levels,  even in the other gamethis was so by giving arbitrary bonuses above tough Imbalancing the game. My suggestion was for a more warlike ai maybe you have suggestion s in other arias. He's asking. Pretty much your sentiments is mine about arbitrary bonuses.h

Reply #21 Top

Quoting Alstein, reply 19


Quoting Ashbery76,
 
 



 

The AI will get tons of work post-release, and the AI had work before release.  Stardock AI is consider one of their strong points- the GalCiv II AI ended up really good for the most part.

 

 

Just remember that the game got patched I think three times, and got patched again recently. Brad promised one more patch. Now the aiis in text not code so we can make it even better. So if galactic civilizations two got a lot of improvement as we go you can expect the same with galactic civilizations three. Just remember when they patch they basically play with text files not code. Your also forgetting about his 20 years of ai developnent behind him. go figure even with my comments sometimes I have a lot of respect for these guys.

Reply #22 Top

I am not that worried about AI. Hell, they update FELH for years. However, the AI didn't ever seem to learn to manage resources very well. It seems all AI where you can level up heroes/leaders and units do a poor job of keeping them alive. If it needs a certain resource, it seems to do even worse. I am not just saying Stardock, I am saying anyone. 

Hell Total War STILL sends cavalry charging into spears in a shield wall. Probably why the generals no longer are on horse. Anyone recall the suicide generals?

That said, Stardock always has at least an above average to very good AI.

 

Reply #23 Top

I personally have no problem with an AI cheating.

All I want is a fun game. Sure try to make it smart and play to its advantages, rather than just throwing bonuses at it but at the end of the day, whatever makes it a fun game.

Thanks for getting stuck in to it! 

Reply #24 Top

Big +1 for the info! Thanks for the update.