| View previous topic :: View next topic |
| Author |
Message |
prisoner881 Space Emperor

Joined: Jul 15, 2007
|
Posted: Tue Jan 29, 2008 7:04 pm Post subject: BM 1.12 Weapons Platforms for AI |
|
|
Kwok,
I'm finishing up my latest BM 1.12 game. I'm noting the AI hasn't built weapons platforms hardly at all. Lots of troops, some fighters, lots of mines, some planetary shield gens, but almost no platforms. I've glassed about 70-80 of his planets and not a one of them has had a platform on it, including homeworlds.
My ministers build them, although not as many as I'd like. Why won't the enemy AI's do this?
Back to top |
|
 |
CaptainKwok Balance Guru

Joined: Aug 04, 2003 Location: Toronto, Canada
|
|
 |
prisoner881 Space Emperor

Joined: Jul 15, 2007
|
Posted: Tue Jan 29, 2008 8:32 pm Post subject: |
|
|
I'm going to make some guesses here. I'm assuming you've got some formula to determine what's the best number of WP's on a given planet. It's probably keyed to the amount of cargo space on the planet. Bigger planets get more WP's than smaller ones, undomed get more than domed.
Let's assume for a planet of size X that your formula says it needs four WP's. Let us further assume you don't want to fill up all cargo space with WP's so you leave some spare for other things. What I'd like the AI to do is this:
- When the old WP design is set as "Obsolete," the AI should start building a new WP of the new type immediately on all planets with WP's.
- Upon completion, one of the "Obsolete" WP's will be scrapped.
- Repeat until all WP's are of the new variety.
I'd love to see this same logic applied to fighter and sats in and around planets.
Is the above possible? It has the advantage of never scrapping a WP until a replacement is ready.
Back to top |
|
 |
CaptainKwok Balance Guru

Joined: Aug 04, 2003 Location: Toronto, Canada
|
Posted: Tue Jan 29, 2008 8:53 pm Post subject: |
|
|
Unit demand is determined across the entire empire. If a particular unit is in high demand then it's added as a wanted design type to construct. Then there's a queue sort for the wanted units which prioritizes how much space is currently being used for units at that queue's location. Planets with the lowest unit concentrations tend to top the sorted list. In theory, all the planets should get about the same percentage of units.
With some revisions in v1.13, defense locations should start seeing more units being constructed since they'll be launching their units more often than non-defense locations.
However, the demand system itself considers all design types - ships and units - so sometimes planets with SYs add fewer units because they tend to be building ships.
Disentangling ship and unit construction is something that's been on the to do list for some time - I might actually do it for v1.15.
---
Scrapping is also handled differently now. Before it was pretty simple, just checking if there were obsolete units to scrap with some minor modifiers for the AI's economic state. Scrapping them would boost demand for new units and so hopefully those units would be constructed soon.
The new system in v1.13 considers the location and general economic state of the empire more carefully to modify the scrap conditions for units. If the planet is in a defense location, units will be scrapped slowly and they'll most likely receive queue up new units first.
Space Empires Depot | SE:V Balance Mod
Back to top |
|
 |
prisoner881 Space Emperor

Joined: Jul 15, 2007
|
Posted: Tue Jan 29, 2008 8:56 pm Post subject: |
|
|
I must say I'm impressed. My suggestion above assumed the decision matrix was pretty simple so I didn't want to put economic conditions into the mix. However, I see you've already done so!
I'd absolutely love to see a decision tree matrix showing how your AI works. Have you ever diagrammed one?
Back to top |
|
 |
CaptainKwok Balance Guru

Joined: Aug 04, 2003 Location: Toronto, Canada
|
Posted: Tue Jan 29, 2008 10:38 pm Post subject: |
|
|
I'm going to put together a small reference document together describing what each of the minister's do. That should briefly cover what most of the AI does or how they do it.
Space Empires Depot | SE:V Balance Mod
Back to top |
|
 |
DarKnight770 Space Emperor

Joined: Oct 03, 2005
|
Posted: Wed Jan 30, 2008 12:31 am Post subject: |
|
|
Without spying more than sabotaging, I wouldn't know, but how strapped for resources is the AI usually? If they're running at a surplus, they wouldn't need to continuously scrap, leaving a build-up of units over time. Until they run up a maintenance bill or start filling up planets, is that a problem?
Back to top |
|
 |
prisoner881 Space Emperor

Joined: Jul 15, 2007
|
Posted: Wed Jan 30, 2008 3:31 am Post subject: |
|
|
Kwok, is the source code for your AI available in the mod? I'm embarrassed to say I've never looked. However, you've piqued my curiosity. I may actually delve into the AI coding a bit because of it. I haven't done any programming since college (and that was a ways back for me) but I do remember enjoying it.
Back to top |
|
 |
CaptainKwok Balance Guru

Joined: Aug 04, 2003 Location: Toronto, Canada
|
|
 |
|