Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » The Academy » Player assistant "AI"
Re: BattleSim with arbitrary tech Mon, 06 March 2006 06:03 Go to previous messageGo to previous message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
Wow! I was not expecting such interest! Very Happy

wumpus wrote on Sun, 05 March 2006 12:18

m.a@stars wrote on Sun, 05 March 2006 10:40

Main automatable/boring tasks:


I think you underestimate the "human element" that goes into doing a stars! turn well Smile Plus, I think a lot of these problems are fairly difficult AI problems; consider that stars! has been around, more or less unchanged in all but (comparatively) minor details, for over a decade, and there are still a fair few different viable race designs and play styles - testimony, IMO, that the vast majority of situations in stars! have no simple, always-correct solution.


I'm afraid you overestimate the scope of my concept of "automation". It would be closer to your own of "optimization" than to any true "Intelligent Agent" Rolling Eyes

I don't want to code a full AI (yet). What I want is to automate some checks and actions, the ones the player would/should be doing anyway. Very Happy A "smart" script could yield a host of warnings, perhaps with proposed solutions. Another kind of script could automate, for example, the introduction on all planetary Qs of your latest "nubian-killer" design, taking care of, say, placing it after autobuild defenses at border planets with less than 100% defenses, but before anything else for the rest of your big worlds, while leaving your small colonies untouched. Weeding out all non-partially-built obsolete designs (as stated by the player) at the same time should be easy, too.


Quote:

What I have been pondering is an X file analyzer which will warn of *possibly* strange orders or make suggestions; it might spot stuff like sending damaged ships through gates such that they have a vanishingly small chance of surviving (because the player forgot to take the existing damage into account)


Or because the player forgot that some designs are heavier than others, yes. Wink That would be one of the main roles of my envisioned "routing" helper.

Also, if we knew about fleet composition, it could suggest fuel xports for damaged or fuel-challenged fleets.


Quote:

or targetting an enemy fleet 1LY away from a planet when you may have meant to target the planet itself,


Trickier, that, but essential, too. Nod I guess you'd need some kind of "popularity" counter for destinations assigned to fleets in the vicinity. Should leave room for allowing skirmishers and such, tho. Sherlock


Quote:

or chasing the MT at a speed which isn't going to work out,


That's not that frequent (or boring) an event. Still, it would be interesting, as well as interception calculations for common fleets, such as: Do I have the fuel? Will I catch them in one turn? Two? If they change course?


Quote:

or setting a fleet to improbable orders (I've slipped up and set layers to "patrol" rather than "lay" a few times, ouch ;P).


Heh. What about having your freighters "unload" all their cargo in open space because you loaded them manually and forgot to check the intermediate waypoints? Embarassed I think much of that could be accomplished by assigning a role to each of your designs and letting a dumb beancounter script pore over the whole fleet listing.


Quote:

The scope for actually tampering with the players turn is fairly limited I fear :-/


Limited, hah. My current scripts are just outputting reams of "suggestions" for the player to heed (or not) and manually set up.

Pls explain, if you dare Wink , what kinds of things can be done at the x file level: Changing planetary Qs? Speed adjustments for fleets? Routing destinations for planets? Packet warp speeds or destinations (at launch)? Changing waypoint orders?


Quote:

Another thing that could be useful: an analyzer for finding out things about enemy races:
- Collects data on all the ship designs you've seen and tries to extrapolate tech levels from that


That would be cool, yes. A small database on every race of the galaxy. Very Happy

As a starter, it would be nice to display exactly *when* you noticed for the first time an unknown design, and in what quantities. The same for known designs (independently of fleet groupings) would greatly enhance the current "fleet report" we have.


Quote:

- Tries to guess enemy ship designs based on their weight and the guessed-at tech of their first production yea


My attempt on that one needs more work, I'm afraid. Evil or Very Mad


Quote:

- Tries to determine hab, PRT, LRTs, ...
- etc etc


Determining hab and terraf levels by scanning planet reports has proved to be tricky but doable. Needs more work, too. Twisted Evil


Quote:

There'd be a few potential snags to deal with - gifted ships being the most obvious - but this strikes me as a managable task.


And, for the hab/terraf intel, friendly CAs using their OAs, and conquered planets, and... Wink


Quote:

emulating a so-so player might be doable (but far from trivial), emulating a really good one is probably very hard, if it is even viable at all without a direct tap to the player's brain Razz.


Sure. What I want is to just streamline the most automatic/boring tasks, allowing both the middling and the master strategist more time devoted to what they do best. Very Happy


Quote:

Having said all that... my AI programming experience is extremely limited; if someone feels they have can formally express algorithms for doing some of this stuff well, then I'm all ears Smile You know what kind of information is available to the AI (basically: anything visible normally in stars!, and very little else), so... Very Happy


In my limited experience with AI and games, I've come to realize you don't need, or even want, "formal" or even "correct" algorithms. What you want is reasonable approximations. Flexibility is often coupled to "AI personality", where the poor thing just semi-randomly cycles between a given set of goals/methods. And that could be enough to prevent most "tried and true" methods of beating it. Wink


Quote:

In the mid-term, it may actually be easier to write a complete stars! AI, hopefully better than the existing ones, than to write a player assistant - since the AI then has complete control, and can plan and so on without having to take an unknown element - IE the player - into account.


The full AI will need assistants. Sherlock I feel I need to know what tools I can use before I can even think about the best way to use them. Nod


Quote:

How does the proposed AI recognise an "old" design that you don't want anymore?


You tell it Wink . It's just an automation assistant, not an "intelligent" agent. And it has the potential of telling you exactly how many of that new wonderful design of yours your empire will be actually able to build, turns in advance of your building them, allowing for a redesign based on costs. Cool


Quote:

... mineral/pop balancing... I can't even begin to see how to automate that without a lot of configuration possibility by the player.


Of course. Among the main parameters:
- Amount of pop growth considered optimal (given by race design)
- Average mining ratio (given by empire-wide statistics, possibly including several turns)
- Current shipbuilding demands (as seen in the planetary Qs and the standing orders for any "automaton" scripts)
- Freighter speed
- "Urgency" and/or "completeness" margins.

It is indeed a logistics problem, and a hard one to solve "exactly". If given some slack, however, many simple approximations yield reasonable results. Very Happy


Quote:

Having an AI doing it for itself could definitely be viable, but doing it for a human whose plans the AI can't evaluate easily at all, sounds Hard. Setting orders and letting the player change them *might* be viable, but I'm not entirely convinced this won't make more work then it saves.


Of course, override would always be an option. In the worst case, the player could set up "exclusion" areas, for, say, borders or war zones. In the best, the "helper" could warn the player to build more freighters because the divide between mineral/pop rich and poor planets is widening or the projected shipbuilding is way lower than empirewide averages would say.


Quote:

How does the AI know what is "correct" other than by looking at your orders? Which stars! seems (to me) to be perfectly capable of showing and highlighting problems with all on its own. Granted, you could catch some of the "off-by-one" errors that crop up occasionally due to the integer rounding phenomena, but the cases where this makes a year difference are pretty rare.


My own thoughts, too. The thing is, those "rare" problems force the player to review the whole fleet list just to catch one possible small problem. Better have a dumb automaton looking for these.


Quote:

Having said that, this is a point where something useful could potentially be done, namely some "optimisng" by an "AI"; the player sets the orders in stars!, and then run it through the optimiser which tries to save a year or two on some of the ship routes by changing that 129 LY trip at W8 (3 years) to a 1-year W9 leg and a 1 year W7 leg etc...


Already done. Very Happy

And useful where for some reason a w10 engine gets throttled to w9 because the "Route" orders don't feel like crossing a 99.5 or 100.5 ly gap in one turn. Razz


Quote:

But even this needs to allow for player intervention; sometimes you don't *want* fleets arriving early, sometimes the speeds you set are important due to planned fleet merges en route, or due to minefields (which may not be visible on your scanners, or not even exist yet, but you as a player expect one to be established right away), sometimes you need to arrive with lots of fuel to spare...


Fortunately, as such optimisations tend to be rare, they can be managed as "warnings" or "suggestions".


Quote:

Beyond the routing already available in stars!, what would you want? Different routing based on design? But then you have to configure it, and then the player will probably overrule it half the time because of exceptional situations, etc. When should you use a gate even if it's technically not quite safe? Should the AI shove that 112kT large freighter through the 100/250 gate? etc etc.


Indeed. I want my lighter ships gate thru 505 ly while my heavies go the scenic route. Too many perfectly good gatings are "born" as 5/6-turn w10 trips beause the "Route" orders don't feel like overgating 1%. Whereas perhaps a very heavy ship cannot travel those same 5 turns at warp 10 and need to detour for refueling. Overgating should be decided by "acceptable risk" as well as "urgency".

As for configuration: Set the primary destination(s) and let the geography handle the rest. Fleet # limit would also mandate setting up "hubs" or preferred "meeting" gates.

The automation would include "routing destinations" for planets as well as fleets currently at a gate if, for example, a new gate was just built. And, most specially, if you need to suddenly change the focus of your whole gating network, what better way than let the helper handle all the myriad details of it? Confused


Quote:

Unless you have 200 identical (including damage and fuel) skirmishers on your side and on theirs,


That was just the special case I meant.


Quote:

how does the AI prioritise? Which fleets is it allowed to use for an attack? which fleets is it allowed to split up? Should it attack enemy fleets which might duck back to a heavily guarded enemy SB? What risks can it take regarding enemy minefields (including ones that you as a player might know or guess are there, but you haven't actually scanned yet)? or even "friendly" detonating ones? How fast shall it send the fleets (consider factors like fuel, minefields again, retreating to a planet again, merging enemy fleets, ...)?


Fortunately, we already have a good AI for that: the player itself. Very Happy The "helper" would just warn of untargeted enemies, possible minefield hazards, fuel scarcity, and such.


Quote:

... upgrading starbases... How does it know when that's a good idea, and when you'd rather save the resources and mins for later?


You tell the "building assistant" to Q up an "SB 2000" at every planet which has an "SB 1800" and can build it in one turn, except for border planets, which get the SB2000+W10 massdriver", with warning for those planets that can build it in two turns for the player to decide if Q them or not. Easy. Wink

Of course the player can already sort by SB design and get a listing of planets to upgrade. But the "helper" could save manually adjusting 45 planetary Qs, plus 25 more for the Massdriver option... Razz


Quote:

Plus, the existing stars! AIs ship design is notoriously iffy, one would first have to design an AI for that which is better (or at least a reliable way for the AI to recognise a "better" design).


Wouldn't I love to see that one done. Nod It is a prerequisite for any "true" AI you might conceive. Sherlock


Quote:

Even if you set the packet destination manually to tell the AI to throw a packet there, what does it need to take into account? Should it be calculating a packet to wipe out the planet?


For starters, spotting any enemy planets with low defenses in range of any massdriver with excess minerals. Or warning about vulnerable ones on your side. Suggesting amounts and speeds to ensure a kill would be nice, too, as it would avoid many calculations with the good ole' Starscalc, specially if your know the enemy's an IT or WM, or has a given Energy lvl. The best way to split packeting among multiple throwers could be interesting, too.

The cases where your own attack fleets are involved would not be "rote" or "boring", of course. Wink


Quote:

Beyond the "borders" criterion, which is already tricky, although possibly not insurmountably so


A "border" is just a geography/math problem, therefore solvable. Very Happy As for the rest, it is conceivable giving the "helper" some parameters such as enemy max warp speed inside a minefield, tech superiority and/or warlikeness, quality of your own scanners, and let it worry about poorly scanned spots, lack or size of minefields, need of building defenses (or even bringing extra pop/minerals) and suggest its findings to the beleaguered player/emperor.


Quote:

Or just contribute to research so that you can get that upgrade to W24 this year rather than missing by a few hundred res?


That one would be for the "production" helper, the one who actually knows the miniaturization lvl you would reach with just one more techlevel and can calculate exactly how many of your "ubernubian" need to remain unbuilt (and where) to ensure you get said tech next turn.

There's just so many options once you can actually gather all the rightful information your m file carries! Very Happy If only minefield and packet/salvage and prod Q and fleet details could be dumped same as the rest of info can be dumped! Sherlock

Perhaps you are in a position to release a "full info" dumper, for strictly "kosher" uses, or at least know if such a marvel can one day exist?

Just my 2 cents...



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Minerals - mining and depletion
Next Topic: Need a quick answer with detonating minefield question
Goto Forum:
  


Current Time: Sun Jul 07 02:57:14 EDT 2024