View unanswered posts | View active topics It is currently 14 Mar 2025, 08:35



Reply to topic  [ 9 posts ] 
 Basic AI 
Author Message
Crewman
User avatar

Joined: 15 May 2005, 01:00
Posts: 49
Location: Germany
Hi,

I added some basic AI to the game. It would be nice if you could leave some feedback, I especially need info on when and what the AI should build at their colonies, what ships to build, fleet composition, when to colonize, etc.

Currently it does the following:

Ship production
    - Empires build a colony ship every 20 turns until they have 6 colonies (including the homeworld)
    - Expanding Powers will build a colony ship every 30 turns until they have 3 colonies (including the homeworld)
    - Empires and Expanding powers will try to create the best station they can in their homesector
    - Empires will try to create a defense fleet at their homesector consisting of one command ship and 4 or 5 cruisers (or fastattack ships if no cruisers can be build)
    - Minors will try to build 2 or 3 fastattack ships
    - Developing and Expanding powers will try to build 2 or 3 cruisers (or fastattack ships if no cruisers can be build)

Diplomacy
    - AI will refuse agreements unless they have appropriate regard for you*
    - You can increase regard by giving them credits or resources, currently 1 regard point for 100 credits (currently it stays for 10 turns, might change that in the future)
    - If you declare war regard will drop by 1000 points for 30 turns

Colony Management
    - AI will build food facilities if needed
    - AI will build industry facility for every 20 population


I added the ability to the AI to explore the map with its scout ships but because the algorithm used for that which was already there seems to be slow.
Therefore I disabled it for now, but you can reenable it by running the game with the /aiexplore command line parameter. Turns might take long during the "Pre-Turn Operations" phase though.


* Required Regard Levels:

Code:
Membership => Unified
FullAlliance => Allied
DefensiveAlliance => Allied
WarPact => Allied
Affiliation => Friend
NonAggression => Friend
OpenBorders => Friend
ResearchPact => Friend
TradePact => Neutral
CeaseFire => Neutral


You can get builds here: https://bitbucket.org/OverlordCW/supremacy/downloads
Please post issues and feature requests regarding AI here: https://bitbucket.org/OverlordCW/supremacy/issues

_________________
Image


07 Mar 2014, 11:23
Profile
Admiral
Admiral
User avatar

Joined: 14 Jan 2009, 10:17
Posts: 2130
:bigthumb:

I posted a few issues there already.

BTW, I don't think I managed to get a trade pact with a neutral minor, will check again.


07 Mar 2014, 14:57
Profile
Admiral
Admiral
User avatar

Joined: 14 Jan 2009, 10:17
Posts: 2130
Those required regard levels you posted, they seem more to be the Attitude level of the AI after you sign one of those agreements? Like its unified when they accept membership etc. (cease-fire cannot require neutral for example,or it is moot)
Also, in the game currently Open Borders includes trade and travel - I dont think there is a Trade Pact agreement by itself.


07 Mar 2014, 19:56
Profile
Ship Engineer
Ship Engineer
User avatar

Joined: 10 Jul 2006, 01:00
Posts: 5220
Location: Space is disease and danger, wrapped in darkness and silence!
For starters:

1.) Would be nice to have major races under AI, mostly Klingon and Dominion, declare war on and invade some minors. More diplomatic action from the Feds for minors to join would be trek like. For the Cards and Romulans I see eventually more spy pressuring of minors to join or to weaken minor for invasion.
2.) Think we will need to address spying and diplomacy before we can push out all the possibilities in AI. We could be getting ahead of ourselves a bit trying to control things that do not exist. One example is I would like the AI, even if it is a human controlled major, to be able to open trade routes based on good diplomatic relations.
3.) For the non AI issues it would be very helpful for game play to have diplomatic relations available to Major races to share ship range and see past the fog of war restrictions by adding in what the other guy can see.
4.) For intelligence it would be nice to get a lifting of fog of war into the other guys space even if you do not have good relations with a major or minor race.

_________________
Image


07 Mar 2014, 22:14
Profile
Admiral
Admiral
User avatar

Joined: 14 Jan 2009, 10:17
Posts: 2130
Overlord wrote:
I added some basic AI to the game. It would be nice if you could leave some feedback, I especially need info on when and what the AI should build at their colonies, what ships to build, fleet composition, when to colonize, etc.


Re Colony Management
- I think the next step should be energy management. The AI should look at what it needs (ideally from game start, so that starting conditions are easier to implement) and allocate pop to energy PFs or build more if needed.
- The AI should also look at its PFs and see if they require upgrading - if so, queue them.
- Empires should try to build shipyards in their colonies, when they're ready to do so - say when the shipyard takes 8 to 10 turns to build, and there aren't other more important things to build (like energy buildings or more PFs).
- Minors should try to build their special structures instead of overbuilding food and industry facilities; we'll need a way to flag which structures should actually be built by minors, and which should only be built by the empire when they join one.

Re Exploration and colonization
- In order to keep things relatively fast, the AI should explore by sending its scouts to the star systems in range, as if the game used a non-free movement system; that is, as if movement would only be possible to non-empty sectors (star systems and anomalies). that should keep the calculations to a minimum.
- Empires should value systems with dilithium, high population, high growth rate, duranium and deuterium (I'd say more or less by that order). Other factors like food and energy bonuses, and types of planets where you can build energy buildings (Wind Turbines and such) are also important; they're not so easy to factor in though, especially the latter, due mostly to tech level availability.
- Implementing territory enforcement would be a good idea, as soon as the diplomacy agreements start being effective.


08 Mar 2014, 11:45
Profile
Admiral
Admiral
User avatar

Joined: 14 Jan 2009, 10:17
Posts: 2130
It appears that the AI is first checking to see if it needs to build additional farms and then trying to activate any inactive ones?


09 Mar 2014, 00:11
Profile
Ship Engineer
Ship Engineer
User avatar

Joined: 10 Jul 2006, 01:00
Posts: 5220
Location: Space is disease and danger, wrapped in darkness and silence!
Iceman wrote:
Overlord wrote:
I added some basic AI to the game. It would be nice if you could leave some feedback, I especially need info on when and what the AI should build at their colonies, what ships to build, fleet composition, when to colonize, etc.


Re Colony Management
- I think the next step should be energy management. The AI should look at what it needs (ideally from game start, so that starting conditions are easier to implement) and allocate pop to energy PFs or build more if needed.
- The AI should also look at its PFs and see if they require upgrading - if so, queue them.
- Empires should try to build shipyards in their colonies, when they're ready to do so - say when the shipyard takes 8 to 10 turns to build, and there aren't other more important things to build (like energy buildings or more PFs).
- Minors should try to build their special structures instead of overbuilding food and industry facilities; we'll need a way to flag which structures should actually be built by minors, and which should only be built by the empire when they join one.



Good points. Clearly improvements can be made in running the minor and major races internal features even before we have better interracial functions like more complete diplomacy and intel.

You might add to the internal list the ability to turn on and off power to things like orbital batteries and planet shields vs. peacetime structures on the basis of diplomatic relations. If you are not at war turn off what you can in favor of the ob, shields and yards. If you need more power for defence moving population to energy production would help. Being at war might also scrap a non combat ship in production replacing it with a war ship. It might trigger more orbital batteries or shields in the build queue.

_________________
Image


09 Mar 2014, 03:17
Profile
Admiral
Admiral
User avatar

Joined: 14 Jan 2009, 10:17
Posts: 2130
Shipbuilding

As with Scouts, there should be a fail safe for building Colony Ships, in case they're not set in the starting conditions - otherwise it'll take 20/30 turns for the first one to be built. Try to build 1 (minors) or 2 (empires) ?
Maybe do something like:

Scout
Colony
(empires: Scout)
(empires: Colony)
Construction

The number of Scouts could depend on map size, while at it. They will be useful in combat too.

Minors could also try to build Command Ships, if they have them in their techtree. Some do.

I haven't noticed minors building Cruisers, only FastAttacks. Also, having them build the same amount of them, they have different upkeeps and stats; they should probably be built in a 2:3 proportion or so.


Diplomacy

Regard points, instead of being eliminated after 10 turns, could be eliminated in blocks of 10 points each 10 turns, so that a larger offer would last longer in terms of relations boost.

If membering a minor will eventually net you their ships too, then buying them off cannot just be a matter of Regard points as implemented right now.


11 Mar 2014, 19:48
Profile
Admiral
Admiral
User avatar

Joined: 14 Jan 2009, 10:17
Posts: 2130
Iceman wrote:
I haven't noticed minors building Cruisers, only FastAttacks.


Actually, it's Empires that seem to be building FastAttacks only, minors don't seem to be buidling ships at all?


13 Mar 2014, 12:04
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.