October 6th, 2015, 18:01
(This post was last modified: October 6th, 2015, 18:05 by Seravy.)
Posts: 10,496
Threads: 395
Joined: Aug 2015
I'd like to make the AI smarter by making it assign their units better, in particular :
-Very strong units should be used to attack targets (enemy towns, encounter zones) or to guard the fortress exclusively (by very strong I mean high level heroes and rare or higher summons mainly)
-Protecting nodes should receive priority based on node strength but definitely less than current. AI seems to use better units for nodes than for towns now, even if node power isn't the maximum.
However, I have no idea how the AI even decides unit movement...
-Does it have a priority system I can adjust?
-If yes, where. If not, how is it deciding what to do with units instead?
The code around $CB1EB looks like something that might be related to AI node priority but I'm not sure. I couldn't really observe much difference by changing code here.
I found a subroutine that looks around the map and marks all locations with some binary flags and stores the assumed enemy army strength at the location. However, this most likely is used for deciding where to attack, not for what to defend, so it doesn't help. As far as I can tell the AI correctly attacks the weakest spots first, so nothing to fix there.
In particular, I want to avoid Sky Drakes and similar units and demigod heroes being stuck guarding a node.
October 8th, 2015, 15:08
(This post was last modified: October 8th, 2015, 15:10 by Seravy.)
Posts: 10,496
Threads: 395
Joined: Aug 2015
So...in my current game the AI had been keeping their Black Knight hero with 29 attack, 13 defense, and 22 health on a node. It never moved from there even when the town next to it was low on defenders.
I really wish there was a way to avoid this.
As far as I can tell, the AI never, ever moves a unit guarding a node into an active stack, at least I haven't seen that happen yet.
Posts: 488
Threads: 51
Joined: Apr 2012
From what I've gathered, when the game was made everyone assumed that guarding nodes and towers was going to be a big thing. As a player I hardly ever guard nodes, and only sometimes guard towers. Looks like they just wrote the code to guard nodes and then moved on.
Does this mean we can assume anything on a node has been sucked into a black hole and will never move? This makes things easier and more predictable...I seem to begin to understand what kyrub said when he refused to reveal how the computer players worked. If you know, you can play them like a fiddle and the game's not so interesting any more.
Posts: 10,496
Threads: 395
Joined: Aug 2015
(October 9th, 2015, 00:22)Tiltowait Wrote: From what I've gathered, when the game was made everyone assumed that guarding nodes and towers was going to be a big thing. As a player I hardly ever guard nodes, and only sometimes guard towers. Looks like they just wrote the code to guard nodes and then moved on.
Does this mean we can assume anything on a node has been sucked into a black hole and will never move? This makes things easier and more predictable...I seem to begin to understand what kyrub said when he refused to reveal how the computer players worked. If you know, you can play them like a fiddle and the game's not so interesting any more.
My preferred choice is not to keep anything a secret but to change it to a behavior that cannot be abused.
Either the units that guard a node should be limited to mid tier or lower, or they need to be able to move away when needed.
Problem is, this part of the code is extremely complex, I expect it'll take months or more to figure out how it works on my own.
I did improve how the AI rates units, but have no idea how it is using that value if at all.
October 9th, 2015, 04:47
(This post was last modified: October 9th, 2015, 04:51 by Asfex.)
Posts: 525
Threads: 6
Joined: Dec 2010
AI may be improved endless. How about improve the spell "warp node"? may be some benefit for battle here ? like disable node aura?
The other idea is force wild monsters appears near the warped node and attack the nearest target, if it is so close.
October 21st, 2015, 17:07
Posts: 10,496
Threads: 395
Joined: Aug 2015
I found the code that prevents Melding units to move off from the node which is great...but where are the other units :/
Posts: 398
Threads: 31
Joined: May 2012
(October 9th, 2015, 03:04)Seravy Wrote: (October 9th, 2015, 00:22)Tiltowait Wrote: From what I've gathered, when the game was made everyone assumed that guarding nodes and towers was going to be a big thing. As a player I hardly ever guard nodes, and only sometimes guard towers. Looks like they just wrote the code to guard nodes and then moved on.
Does this mean we can assume anything on a node has been sucked into a black hole and will never move? This makes things easier and more predictable...I seem to begin to understand what kyrub said when he refused to reveal how the computer players worked. If you know, you can play them like a fiddle and the game's not so interesting any more.
My preferred choice is not to keep anything a secret but to change it to a behavior that cannot be abused.
Either the units that guard a node should be limited to mid tier or lower, or they need to be able to move away when needed.
Problem is, this part of the code is extremely complex, I expect it'll take months or more to figure out how it works on my own.
I did improve how the AI rates units, but have no idea how it is using that value if at all.
How did you improve the AI rates units?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it.
Posts: 10,496
Threads: 395
Joined: Aug 2015
Well this was a long time ago and since then we know a lot more about it (you can find details in the various strategic combat discussions in the CoM subforum) but in a nutshell, the base game uses total unit rating = defense rating+attack rating while I changed that to total unit rating = defense rating * attack rating.
Posts: 398
Threads: 31
Joined: May 2012
(May 3rd, 2018, 11:35)Seravy Wrote: Well this was a long time ago and since then we know a lot more about it (you can find details in the various strategic combat discussions in the CoM subforum) but in a nutshell, the base game uses total unit rating = defense rating+attack rating while I changed that to total unit rating = defense rating * attack rating.
it is done an a unit by unit base (so a unit with 0 attack or defense is worth 0) ?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it.
Posts: 10,496
Threads: 395
Joined: Aug 2015
Defense rating of a unit with 0 defense isn't 0 and aside from settlers there are no units with 0 attack in both melee and ranged, so that's not an issue.
|