Speaking of shadow demons:
I can't remember the AI EVER using Plane Shift ability of shadow demons. There are two cases where it could be used effectively:
1) sneak attacks on player's cities. Fly to a square corresponding to another square next to a player's city, then shift plane. I would try to base this on evaluation of two paths: Myrror and Arcanus, and see which is safer.
2) escape. If AI's shadow demons are threatened and they're not guarding anything important, they should escape to the other plane and not return until the threat is gone.
If you teach the AI using Plane Shift, perhaps you could unlock the Planar Travel spell as well ? Two birds with one stone.
If AI wishes to attack enemy wizard's fortress, it could send demons along the path (Arcanus/Myrror) which has fewer player cities and armies along the way. The point is to make Shadow Demons appear out of nowhere, if possible.
Safer2:
Send shadow demons or planar travel armies against cities which form the interior of enemy wizard's empire, especialy if they have less guards. Normally, external cities intercept incoming armies. This could be a surprise. (if player has 10 cities on Arcanus and 0 on myrror, shadow demons can probably strike in the middle of player empire and nothing will stop them)
Safer3:
Simply send shadow demons against nearest city and make them shift plane once next to it. This would be especially good against cities (vision range doesn't help) and heroes with scouting.
Really, just making demons aware of nearby enemy units (nearby in the sense "1 plane shift away") would be good, so that if you are close to demons but on another plane, demons can switch plane and attack you.
Safer3 could be probably somehow implemented. It is hard though - mainly because, if I am right, the game does not recognize that you switched the planes and the battle does not begin (correct me if I am wrong).
I admit that it is tempting, your city grabbed up by monsters from the other side... I have to look if it could be done.
I'd like to return to something we discussed long ago, how the AI creates stacks. Which also has connection to city defense and disbanding obsolete units.
Would you be willing to reveal part of the mechanism here in order to better discuss how to improve it? Or maybe in PM if you don't want it to be public? This is what interests me the most about the AI, and it's where I believe we can improve it the most overall. The AI has a crazy amount of troops that it uses with laughable efficiency.
I am not prepared to discuss this in depth at all. The creating and maintaining stacks in MoM is a broken concept in itself. It was remade at least twice by the programmers (there are two independent systems of tracing AI stacks and their stats for instance), so it is a kind of bad mess where various parts are probably dysfunctional but you cannot be exactly sure (remember the simple fact I was unable for half a year find out why the damned stack could not get on board of a ship). Revealing how it works (how I think it works) will lead to even more exploits from players.
My past experiments with changing current system lead me to the statement that the stacking strategy cannot get on the next level where you can speak about "sneak attack" or "threatening", if it is not reworked from the scratch. Everytime I tried to correct something obvious, I bumped into another massive problem. What you have in Insecticide today, which is by no means satisfying, I admit, is a result of many hours of watching spectator games (only AIs are playing on Alt-RVL map) and about 30-40 isolated logical attempts to make AI stacks better. Most of them were useless.
The units are taken from the cities, There are some very stupid decisions made at the very base of the system. I believe the problem is they modelled it in the same way as MoO - but they forgot or even willingly overlooked that
- units in MoM move 10 times slower than MoO (on the map scale)
- citites in MoM are not discrete points like the planets in MoO that are the only places where the clashes can happen.
That is all I can say.
One good thing for Catnip, though: I think that AI stacks could improve a bit after you increase overland movement.
-----
As for your place of interest: we can influence which creatures are taken from a city into the fields. Now it is done based on the cost (best go out, I believe). But if you take a whole bracket (like shooters) and tell them to stay in, you'll have no shooters in attacking stacks.
Speaking of ships, I would be much happier if AI was improved in these ways:
- aggressive ship behavior, attempt to intercept enemy ships and flyers (there are almost no naval battles !)
- build a lot less ships in general, vast majority of them is unused anyway ! A simple rule would be stop building ships if there are more than X on the plane (landmass size could be a factor too).
I don't see an appropriate thread for this:
Offensive use of Transmute spell
I don't think AI uses it that way.
Transmute can be used offensively - Mithril into silver. This is even better than improving the use of Raise Volcano and Corruption - the change is only semi-permanent and AI won't be crippling cities it conquers. Using Transmute on Mithril adjacent to a player city could be very effective. It's a pity Adamantium has no corresponding resource - otherwise AI could teach players to respect the oh-so-pathetic Nature magic.
Adamantium changed into gems or crystals would be interesting, but unfortunately outside of the scope of Insecticide ;[
b0rsuk Wrote:...evaluation of two paths: Myrror and Arcanus, and see which is safer.
...if AI's shadow demons are threatened
Think in algorithms. Define "safer" and "threatened".
Is it easily possible to implement randomized decisions? This could improve AI and keep it mysterious and unpredictable.
Trying to think in algorithms:
First, I would put a 3-5 % chance each turn on Shadow demons to plane shift. If there is some target map square in the algorithm involved, and the plane is known, this probability can be raised to 20% or higher if the Shadow demon is on the other plane.
After plane shifting is solved and a "safer path" algorithm should be applied:
- Count water tiles on both paths and prefer the one with more
About the "retreating" of demons: I would not like to see this in demons, perhaps in other units. But demons are aggressive by nature and not easily controlled and to try to force them use actions against their nature should actually trigger a disruption of control chance. This is more akin to the Life wizard's unit, isn't it? Just my opinion.
Is there a way to force the AI to always keep 9 units, preferably the best ones (but no more than 4 of the same thing if there is an alternative at a similar value) in their capital?
It is sad to see the AI leave the capital with 4 units just to build a stack of 8 units elsewhere, only leaving 5 -and not even the best 5- defenders in the city when I'm about to attack.
An example situation in the current game :
Capital : 2 Storm Giants, 1 Paladin, 1 Hero, 1 Pikemen left (had 9 units a turn ago)
Sorcery Node in the cell next to capital : 4 Storm Giants, which would double the strength of the capital on their own, been there in the past 5 turns.
Stack of 8 units on a nearby road : 3 Storm Giants, 3 Magicians, 1 Priest, 1 Berserker, also stronger than force in capital.
I most likely couldn't have taken their capital for a long while more if it had those 6+ storm giants with the paladin and whatever else left. I really don't see a point guarding a node with more storm giants than the capital itself.
This isn't the first game when a tough enemy suicides by removing 4 of their best units from their capital, instead of dragging out the situation, giving more time for the other 3 to develop.
Or is it because we are not at war? (Even though he kept sending stacks to attack my cities and I kept killing them)
I even threatened the wizard into giving me a summon champion spell and then he weakens his fortress, why?
Edit : after taking the fortress and banishing the wizard, that stack of 8 units destroyed the remaining invading force and took it back. Ouch. I guess it wasn't all that bad of a decision, although if I had razed the city and ran away...
Edit again : attached an image. The AI seems to be really neglecting to defend his cities. There are 4 stacks of units near that town, but it's undefended. One stack is protecting a node, another settlers, and two more, smaller ones are in the middle of nowhere.
I waited a turn and the 2 cannons moved through the empty town to attack a lair and die. The lone halberdier went towards a city further away. The big stack of units didn't move, seems like they were guarding a tower along with the Settlers. The town is still empty. Oh, and that wizard has Meteor Storm in effect, yet all of his units are outside, to make it worse.
Question : Is it possible to make the AI dump the game state into a file, call an external AI program, which loads it, makes the decisions, and updates the game state file with the decisions made before returning to wizards.exe? If yes, we could redo the entire overland AI (both spellcasting, building and unit movement) without hex editing, using C or Pascal, we could even include the source code for easier AI modding, which would help making custom spell changes work much better.