possible mastermind AI solution


Beltor

 

Posted

I've seen the problem with ranged pets running in to brawl all too often, like every other mastermind player.
I finally gave it some serious thought while playing my robot mastermind and noticed something.

If your pet is at maximum range, they will take quite a while to run in to use brawl. That time they take running in is more than enough for at least one of their ranged blasts to recharge.
That means that they are "choosing" to continue running in to brawl rather than activating the recharged ranged blasts.



I wonder what would happen if a command to "un-queue power" command were inserted into the code that signals when a power is ready to be used by the mastermind pets?

It could cancel the brawl command, and stop the pet in its tracks, when a better power is recharged. It would essentially "reset the power choice code" to check for the best currently recharged power and activate whichever one will activate.
Yes, it would cancel powers other than brawl, but that is not an issue with ranged powers that immediately activate.
If every power is still out of range, and thus canceled by this code, then all the pet powers would come off recharge and the pets would be able to queue any power without it being canceled, allowing them to run into range.

It doesn't solve the problem of the pets trying to brawl in the first place, but it would stop them from continuing to run in to brawl while ignoring better powers for far too long. It would probably keep them a little farther away for a little longer than currently as well.

I don't know if that would work, but that is how I see it likely working.



Another idea would be to slightly change pets' brawl, akin to how brawl behaves differently for different archetypes. You could change it to cancel itself immediately when queued if not in melee range already.
I'm thinking it would work like that text warning "out of range" we players see when we activate powers from too far away. If you could just code it to check that and cancel if that occurs then the pets would stop trying to brawl.

I'm not sure if the game can support such a function, but it does seem simple enough as a function executed when brawl is queued by a pet.


 

Posted

Just to go on in a similar vein to your posts in the Ragdoll Thread..

No, your ideas wont work. There is no possible way they can fix, change, update, rollback the pet AI in ANY way without totally breaking something else. I can guarantee it!

There...see how utterly unhelpful that kinda reply is?


 

Posted

Quote:
Originally Posted by MisterD View Post
Just to go on in a similar vein to your posts in the Ragdoll Thread..

No, your ideas wont work. There is no possible way they can fix, change, update, rollback the pet AI in ANY way without totally breaking something else. I can guarantee it!

There...see how utterly unhelpful that kinda reply is?
1) Don't troll me. I don't bite.

2) I am not talking about "rolling back"/"using old code", which is what the other thread talked about IF YOU ACTUALLY READ THE FIRST POST(caps for emphasis, not yelling).
(Edit: Actually, it was the 5th poster who proposed "using the old code" in that other thread, not the OP. But, nobody else offered any actual solution other than "fix it". It's just a lot harder to fix than other problems which are a lot more important than "flopping enemies that look unrealistic". Anyway, this is not the thread for that topic to be discussed.)

3) You need to think about what is said rather than just read an entire post, which is attempting to explain the reasoning of a position, as nothing more than "I disagree".

It seems that you are just getting upset that people posted anything other than "you're a genius".
I pity your "selective reading comprehension".


 

Posted

An idea i had was to make the pet command "stay" more absolute. If a pet is set on stay, it won't move but still uses any attacks that can reach the enemy as well as abilities on allies like healing or buffs. Commands can be given to individual pets with petcom_name "it's name" so you could put the suicidal Arsonist for example somewhere near the battle so it can lob firebombs in and it would brawl only if the enemy is on it in melee. This would work with other pet types as well and wouldn't mess them up.


 

Posted

Quote:
Originally Posted by Beltor View Post
An idea i had was to make the pet command "stay" more absolute. If a pet is set on stay, it won't move but still uses any attacks that can reach the enemy as well as abilities on allies like healing or buffs. Commands can be given to individual pets with petcom_name "it's name" so you could put the suicidal Arsonist for example somewhere near the battle so it can lob firebombs in and it would brawl only if the enemy is on it in melee. This would work with other pet types as well and wouldn't mess them up.
That would probably be good, but I'm betting that would only work when the mastermind issues the command to "stay".
I was trying for a solution that is "always on" to affect the pets while they are doing anything, in combat of course.


 

Posted

Quote:
Originally Posted by ShadowMoka View Post
It would be pretty nice to select attack range preferences for each/all pets.

/Signed
Hmm, I don't think my idea could force any pets into melee range, but they already all run into melee range anyway.
This just may fix the ranged pet issue. It doesn't fix their power choices issue though(like the Oni apparently).


 

Posted

Quote:
Originally Posted by T_Immortalus View Post
That would probably be good, but I'm betting that would only work when the mastermind issues the command to "stay".
I was trying for a solution that is "always on" to affect the pets while they are doing anything, in combat of course.
I thought that as well. The pet AI seems to be the same for all the MM sets, so any solution would have to work on all MM sets. Your idea might work when the pets attack but may cause support pets to not use their healing and/or buffs. They'd change their mind too much. My idea would work if the player knows more about pet control but as you pointed out, it need's the "stay" command. It may not be as hands free as would be needed in an intense situation like battle, especially when teaming. Perhaps if pets set on guardian wouldn't go farther than a set distance from the MM so that ranged pets wouldn't run into melee unless the MM does too. Isn't guarding the MM the point of bodyguard mode?


 

Posted

Quote:
Originally Posted by Beltor View Post
Your idea might work when the pets attack but may cause support pets to not use their healing and/or buffs. They'd change their mind too much.
Actually, that's the beauty of my idea. healing and buffs are ranged, usually.

My idea only stops the "queue melee power then run into melee to activate".
Ranged powers, at least when they all have the same range, activate immediately because they don't sit queued while they try to get into range. You can't cancel a power that is activating(except a few interruptable ones).

The only possible problem is if an enemy is running away, which would only be a problem because of the way I think pet attacking works.

I'm thinking that pets, once they are set to attack a target, queue a power and then either activate it or move into range if out of range.
I don't think they move into range first, like players can/do, and then activate the power.



It would probably be better to attach the function to brawl so that they still try to brawl, but they un-queue/cancel it as soon as another power is recharged(which would require less work likely).
That seems best. It would keep them from just queueing brawl and chasing a target down forever(if the target was fast enough to remain out of range forever).


 

Posted

Quote:
Originally Posted by Beltor View Post
The pet AI seems to be the same for all the MM sets
I think this describes the crux of the issue. There are both melee-based pets and ranged-based pets. But, rather than try to come up with an AI for both cases, they decided to try to cram both behaviors into the same AI. (At least, that appears to be the case, since any modification of the MM pet AI affects all MM pets regardless of power set.)

I think the real solution may be to develop separate AI logic based on power sets. Or even develop a unique AI for each MM set.

It's probably more development than they're willing to invest in fixing MM pet AI, though.


Save Paragon one more time! http://www.cohtitan.com/forum/index....ic,4877.0.html
Petition to end shutting down CoH:
http://www.change.org/petitions/ncso...city-of-heroes

 

Posted

Quote:
Originally Posted by Zybron1 View Post
I think this describes the crux of the issue. There are both melee-based pets and ranged-based pets. But, rather than try to come up with an AI for both cases, they decided to try to cram both behaviors into the same AI. (At least, that appears to be the case, since any modification of the MM pet AI affects all MM pets regardless of power set.)

I think the real solution may be to develop separate AI logic based on power sets. Or even develop a unique AI for each MM set.

It's probably more development than they're willing to invest in fixing MM pet AI, though.
Actually, mastermind pets share AI with every NPC in the game.(thank Cryptic and their shortcuts)

Now that I think of it, this was probably broken back when they tried to fix the "Mob AI RUN AWAY!" bug, and/or when they tried to get pets to not sit in burn patches and cook to death.


I just tried to come up with a simple solution, and it looks like ti could work.


 

Posted

Quote:
Originally Posted by T_Immortalus View Post
Actually, that's the beauty of my idea. healing and buffs are ranged, usually.

My idea only stops the "queue melee power then run into melee to activate".
Ranged powers, at least when they all have the same range, activate immediately because they don't sit queued while they try to get into range. You can't cancel a power that is activating(except a few interruptable ones).

The only possible problem is if an enemy is running away, which would only be a problem because of the way I think pet attacking works.

I'm thinking that pets, once they are set to attack a target, queue a power and then either activate it or move into range if out of range.
I don't think they move into range first, like players can/do, and then activate the power.



It would probably be better to attach the function to brawl so that they still try to brawl, but they un-queue/cancel it as soon as another power is recharged(which would require less work likely).
That seems best. It would keep them from just queueing brawl and chasing a target down forever(if the target was fast enough to remain out of range forever).
Their was a game for the first playstation called "Carnage Heart" where you design and build robots, then use them on a battlefield against enemy robots. You didn't control them manually, instead you used a flowchart like system to design an AI for them to use. If a queue wasn't used, the AI would be ok if two different actions had differing ranges. But if both had the same range, only one would be used. The last action on the list would be done because the AI wouldn't wait on earlier actions to be done. In the case of MM pets, if healing or buffing is also ranged, favoritism would got to the last action. Either healing, buffing, or ranged attack. Not a problem with buffing as without favoritism, it would just be done when the other actions weren't (not in battle). But in a battle, the pets would either attack and never heal, or heal and never attack. Not having queue on melee attacks and having them first on the action list and then starting over if melee is done (enemy is in melee range), but still having queue on other actions may work. The only problem then would be melee pets, like thugs Bruiser. They wouldn't close to melee unless all ranged attacks were charging. Now i got flowcharts on the brain


 

Posted

Quote:
Originally Posted by Zybron1 View Post
I think this describes the crux of the issue. There are both melee-based pets and ranged-based pets. But, rather than try to come up with an AI for both cases, they decided to try to cram both behaviors into the same AI. (At least, that appears to be the case, since any modification of the MM pet AI affects all MM pets regardless of power set.)

I think the real solution may be to develop separate AI logic based on power sets. Or even develop a unique AI for each MM set.

It's probably more development than they're willing to invest in fixing MM pet AI, though.
This is why i thought about making "stay" more absolute. The players could handle the problem themselves with all pets and everything else that uses the same AI wouldn't be affected. It wouldn't take as much coding either. Just more player effort.


 

Posted

Quote:
Originally Posted by Beltor View Post
Their was a game for the first playstation called "Carnage Heart" where you design and build robots, then use them on a battlefield against enemy robots. You didn't control them manually, instead you used a flowchart like system to design an AI for them to use. If a queue wasn't used, the AI would be ok if two different actions had differing ranges. But if both had the same range, only one would be used. The last action on the list would be done because the AI wouldn't wait on earlier actions to be done. In the case of MM pets, if healing or buffing is also ranged, favoritism would got to the last action. Either healing, buffing, or ranged attack. Not a problem with buffing as without favoritism, it would just be done when the other actions weren't (not in battle). But in a battle, the pets would either attack and never heal, or heal and never attack. Not having queue on melee attacks and having them first on the action list and then starting over if melee is done (enemy is in melee range), but still having queue on other actions may work. The only problem then would be melee pets, like thugs Bruiser. They wouldn't close to melee unless all ranged attacks were charging. Now i got flowcharts on the brain
That is not how this game works.

1) Pets only buff or heal when another pet is sufficiently injured or the buffs expire(which they are constantly using as soon as recharged even when unnecessary).

2) Pet attacks are weighted by the developers. They like to use them in a certain order, if they are all recharged.

3) Pets will still buff and heal in a passive or defensive state when not attacking. The stances really only affect whether they are allowed to attack or not, and thus chase or not.

4) Pets always use powers as soon as they are recharged. That is why they like to run in to brawl so much. Any gap in the attack chain is filled by brawl(whether they can actually use it or not, meaning they may run into melee to sit there), so they brawla lot more at lower levels.


That is why I believe my idea will work.
The AI is very simple for pets. The devs have even said "they don't use AI". It's just a "dumb" priority system with simple commands.

All they need to do is stop the pets from queueing brawl(which they do whether they can use it or not) and thus activating the code for "get into range" that sends them into melee.


Currently, they try to make pets "smarter" by changing the recharges on their powers and other methods, but it isn't that successful obviously. They have had some success, but they just can't keep the pets from queueing brawl and thus running into melee.

They can't just delete brawl either, according to the developers. It's an intrinsic part of the pets, like every player character has it and every enemy has some melee whack.
It is also still useful when the pets are out of endurance.


 

Posted

Quote:
Originally Posted by Beltor View Post
This is why i thought about making "stay" more absolute. The players could handle the problem themselves with all pets and everything else that uses the same AI wouldn't be affected. It wouldn't take as much coding either. Just more player effort.
That won't go over well. People would rather have the bug(I would) than have pet management be even more complicated.

I don't think stay can be made more absolute either, simply because of how the AI works.
As soon as the pet queues an attack, they will try to get in range to use it. They will chase that enemy down until they can.

That is not something that can be changed at all easily.



But, it is an idea, and if they were going to do that then they would likely be best off completely rewriting the pet behavior code.
Again, it's a lot more work than they have been willing to do, especially for free now since they couldn't charge for a fix.

Simple is usually best anyway according to the law of K.I.S.S.


 

Posted

Quote:
Originally Posted by T_Immortalus View Post
3) Pets will still buff and heal in a passive or defensive state when not attacking. The stances really only affect whether they are allowed to attack or not, and thus chase or not.
Unless it was changed (and i hope it was), pets on passive didn't heal or buff or do anything.

As brawl is a default, removing the queue for brawl alone does sound like a good idea since right now other powers aren't being checked for readiness while brawl is queued and trying to be executed. They would still close if no powers are charged but it would still be a massive improvement. A jerky stop/go closing movement might be a problem, but that would probably be easy to fix.


 

Posted

Quote:
Originally Posted by Beltor View Post
Unless it was changed (and i hope it was), pets on passive didn't heal or buff or do anything.

As brawl is a default, removing the queue for brawl alone does sound like a good idea since right now other powers aren't being checked for readiness while brawl is queued and trying to be executed. They would still close if no powers are charged but it would still be a massive improvement. A jerky stop/go closing movement might be a problem, but that would probably be easy to fix.
Exactly, queuing(wow! so that's the "ing" form of that) brawl seems to override every other attack, and often overrides commands to heel as well. Canceling it with commands such as Passive and Defensive stance commands and the ranged attacks when they activate is a logically good idea.


Last I checked, my robot pets healed and refreshed the shields while on passive.


 

Posted

I just checked my bots MM. My protector bots don't bubble while on passive. They were fully upgraded. They started bubbling when i took them off passive and stopped again when put back on passive. Shame, i was hoping they'd changed that


 

Posted

Quote:
Originally Posted by Beltor View Post
I just checked my bots MM. My protector bots don't bubble while on passive. They were fully upgraded. They started bubbling when i took them off passive and stopped again when put back on passive. Shame, i was hoping they'd changed that
Oh well, it's only really necessary in combat, and works on Defensive when it really counts.


 

Posted

I don't want to throw a wrench into your idea, but I don't think Protector Bots have any melee attack. At least, City of Data doesn't list one (Protector Bot) and I've read elsewhere that they don't have one. Now, maybe there is a 'baked in' brawl sort of ability in them, anyway, that is suppressed, perhaps? Or something similar. Still, though, without any melee attack at all, Prot Bots still run into melee.

I've seen them do it without any other pet running into melee, too, so they aren't chasing another pet there to heal or bubble. I don't think they have a 'brawl' sort of ability to un-queue. Otherwise, what you suggest may work, I don't know.

What would work, since I didn't realize all NPCs used the same AI, is writing an actual AI for pets. Not only that, but if they actually had a 'real' AI, you could allow for customizations, like setting certain pets to only range or only melee, etc. Of course, I haven't seen the code, so I don't know what kind of complications there could be to actually implementing that. But, I'd pay for another subscription to have it. Or whatever point cost in the Paragon Market they decide something like this would be worth.


Save Paragon one more time! http://www.cohtitan.com/forum/index....ic,4877.0.html
Petition to end shutting down CoH:
http://www.change.org/petitions/ncso...city-of-heroes

 

Posted

Quote:
Originally Posted by Zybron1 View Post
I don't want to throw a wrench into your idea, but I don't think Protector Bots have any melee attack. At least, City of Data doesn't list one (Protector Bot) and I've read elsewhere that they don't have one. Now, maybe there is a 'baked in' brawl sort of ability in them, anyway, that is suppressed, perhaps? Or something similar. Still, though, without any melee attack at all, Prot Bots still run into melee.

I've seen them do it without any other pet running into melee, too, so they aren't chasing another pet there to heal or bubble. I don't think they have a 'brawl' sort of ability to un-queue. Otherwise, what you suggest may work, I don't know.

What would work, since I didn't realize all NPCs used the same AI, is writing an actual AI for pets. Not only that, but if they actually had a 'real' AI, you could allow for customizations, like setting certain pets to only range or only melee, etc. Of course, I haven't seen the code, so I don't know what kind of complications there could be to actually implementing that. But, I'd pay for another subscription to have it. Or whatever point cost in the Paragon Market they decide something like this would be worth.
From what was said earlier, brawl may be a default used when no other action can be done. It may not be listed.
It may be that "move closer" may be the default though.


 

Posted

Quote:
Originally Posted by Zybron1 View Post
I don't want to throw a wrench into your idea, but I don't think Protector Bots have any melee attack. At least, City of Data doesn't list one (Protector Bot) and I've read elsewhere that they don't have one. Now, maybe there is a 'baked in' brawl sort of ability in them, anyway, that is suppressed, perhaps? Or something similar. Still, though, without any melee attack at all, Prot Bots still run into melee.
Yes, they still have brawl. I believe it is "suppressed".

But....

1) Protector Bots run into melee a lot less than the bots who do have and use brawl.

2) My idea is for a solution to brawl making them run into melee when they should be focusing on ranged attacks.
Protector Bots are not the main focus nor the only focus.


This would make all pet AI a lot better. It could also probably apply to enemies as well so that ranged enemies stay more reliably out of melee, even if players may not like it when they don't bunch up for AoE. :P



Edit:
If they wanted to make "only ranged" pets/enemies then they could probably just add an effect to brawl(like tanker's bruising or controller containment or like Pack Mentality stacks) that cancels brawl immediately when it is queued. It could be a part of their brawl or be a "special power granter" like how Pack Mentality supposedly works.
That's a good way to force pets to focus on their powers other than brawl, but it would essentially remove brawl from their powers list(could be a bad thing for pets that run out of endurance, though they're useless at that point).


 

Posted

It's now 2012 and I'm seeing a halfway decent conversation about fixing the MM Pet A.I. Ah if only....I've so often wished that this issue had been fixed years ago. Perhaps I'd spend more time playing MMs other then the one 50 I got back in 07 and then the demon MM thats still sitting in her 40s...sigh.

Funny that my favorite class turned out to be my least played. That's a bad reflection on the class in and of itself. Yes I know how to play one, yes I know how to bind pet controls and yes, I'm a veteran MM player, so playing one well wasn't ever the issue. However Pet A.I. was and most certainly posed a HUGE drawback to ever wanting to seriously play a viable role in a team ever again.

Seems simple doesn't it. Pets with ranged attacks should stay at ranged and only activate close range abilities when enemies come within proximity of their close range attacks OR when you send them in to be close range.

Melee type pets shouldn't cast ranged abilities and then get stuck casting them over and over again when their strength is in MELEE!!! I got sick of watching my grave knights just sit back and cast dark blast when their strongest attacks are head splitter and disembowel. *facepalm*

You would think being that they're coded to behave how they currently are it would be a simple fix to code them to behave how they "should" behave. One must know how to write the code to even get them to do what they do in the first place. I know if I knew anything about game programming my first priority would be to make sure buggy behavior in the A.I. would be ironed out before anything ever hit live. I'm just saying.


- Bow �o �he Reaper of Souls�
- 68 Unique Characters / Fifteen Level 50s & Counting! Damn you alt-itis!!!!!!!

 

Posted

Quote:
Originally Posted by Tyranny_NA View Post
I know if I knew anything about game programming my first priority would be to make sure buggy behavior in the A.I. would be ironed out before anything ever hit live. I'm just saying.
The first and foremost priority of every game developer should be smooth performance and great usability, with no bugs in those(that may be hard but it needs to be strived for).

Sadly, many game developers, the ones who made this included, did not, and possibly currently do not, have that as their first and foremost priority.
That is why we have bad bugs and games that continually are lacking in performance compared to even older games with better graphics.


It is what it is, but we still work to make it as good as we can, in our own ways.


 

Posted

In that we both agree.


- Bow �o �he Reaper of Souls�
- 68 Unique Characters / Fifteen Level 50s & Counting! Damn you alt-itis!!!!!!!