YesNoOk
avatar

AI keeps powering up (Read 3959 times)

Started by coldskin1, November 13, 2016, 01:22:08 pm
Share this topic:
AI keeps powering up
#1  November 13, 2016, 01:22:08 pm
  • avatar
  • **
    • USA
    • hamalto1990@yahoo.com
I have problems with AI keep charging when I code charging state and sometimes they will even charge when its an player only move
Last Edit: November 20, 2016, 07:44:18 am by coldskin1
Re: AI keeps powering up
#2  November 13, 2016, 01:40:16 pm
  • *****
  • Shame on you!
    • USA
I would think that' you're using just two buttons to power up. Probably B+Y.
I think if the cpu "presses" those buttons it'll activate the move.
Are you using a variable to check if AI is turned on?
vVv Ryuko718 Updated 10/31/22 vVv
Re: AI keeps powering up
#3  November 13, 2016, 10:53:47 pm
  • ****
  • Still lurks regularly, but posts once a blue moon
    • Canada
If you're using Mugen1.0+, you can try using trigger# = AILevel = 0 for your ChangeState
Re: AI keeps powering up
#4  November 16, 2016, 01:46:31 am
  • avatar
  • **
    • USA
    • hamalto1990@yahoo.com

      Posted: November 16, 2016, 01:47:11 am
If you're using Mugen1.0+, you can try using trigger# = AILevel = 0 for your ChangeState

the character is before mugen 1.0

the CPU and player controls are on diffrent variables

Spoiler, click to toggle visibilty

AI sometimes ignore the code  (where can only when the p2 is down, far away and not attacking) and keep charging. and sometimes power up even when its player only move

probably going to try changing the AI input


Last Edit: November 16, 2016, 04:12:56 am by coldskin1
Re: AI keeps powering up
#5  November 16, 2016, 04:35:48 am
  • ****
  • Still lurks regularly, but posts once a blue moon
    • Canada
Yeah, AILevel won't work in this case.
If you don't want the AI to use the move at all, maybe you can just Null the AI version of the sctrl.
Make sure the player version isn't changed.
Re: AI keeps powering up
#6  November 18, 2016, 06:45:31 pm
  • avatar
  • **
    • USA
    • hamalto1990@yahoo.com
Yeah, AILevel won't work in this case.
If you don't want the AI to use the move at all, maybe you can just Null the AI version of the sctrl.
Make sure the player version isn't changed.

so just

[State -2, Null]
type = Null
trigger1 = var(45) > 0
trigger1 = stateno =1900


Last Edit: November 18, 2016, 07:42:53 pm by coldskin1
Re: AI keeps powering up
#7  November 18, 2016, 08:26:05 pm
  • *****
  • Shame on you!
    • USA
Usually when you Null something out it's for testing. You'd just simply add Null; infront of changestate
So
[State -1,‹C—Í—­‚ß]
type = Null;ChangeState
value = 1900
triggerall = var(45) > 0
triggerall = roundstate = 2
triggerall= !inguarddist && !enemy,numproj && p2movetype!=A
triggerall = power <= 3000
triggerall = p2bodydist X > (200-((p2movetype=H)||(p2statetype=L))*100)
triggerall = statetype != A
triggerall = ctrl ||(stateno=[20,22])
trigger1 = random < 250

All of the triggers would still be read, but it makes testing a lot easier when you can just delete "null;" to get back to where you were.


Also, maybe try
 
triggerall = (roundstate = 2) && (var(45) != 0)  ;AI ON
and
triggerall = (roundstate = 2) && (var(45) = 0)  ;AI OFF
for activating AI changestates. Unless the values can be less than 0 to represent off.

I think this is how I'd set up your changestate.
Spoiler, click to toggle visibilty
When I adjusted the values to match my Ibuki she barely charged. I changed the var and the state no and that's it.
vVv Ryuko718 Updated 10/31/22 vVv
Re: AI keeps powering up
#8  November 18, 2016, 11:28:38 pm
  • avatar
  • **
    • USA
    • hamalto1990@yahoo.com
Usually when you Null something out it's for testing. You'd just simply add Null; infront of changestate
So
[State -1,‹C—Í—­‚ß]
type = Null;ChangeState
value = 1900
triggerall = var(45) > 0
triggerall = roundstate = 2
triggerall= !inguarddist && !enemy,numproj && p2movetype!=A
triggerall = power <= 3000
triggerall = p2bodydist X > (200-((p2movetype=H)||(p2statetype=L))*100)
triggerall = statetype != A
triggerall = ctrl ||(stateno=[20,22])
trigger1 = random < 250

All of the triggers would still be read, but it makes testing a lot easier when you can just delete "null;" to get back to where you were.


Also, maybe try
 
triggerall = (roundstate = 2) && (var(45) != 0)  ;AI ON
and
triggerall = (roundstate = 2) && (var(45) = 0)  ;AI OFF
for activating AI changestates. Unless the values can be less than 0 to represent off.

I think this is how I'd set up your changestate.
Spoiler, click to toggle visibilty
When I adjusted the values to match my Ibuki she barely charged. I changed the var and the state no and that's it.

it still has the same probablys only work sometimes but on a certain  match it starts charged almost the whole round

      Posted: November 18, 2016, 11:29:11 pm
Usually when you Null something out it's for testing. You'd just simply add Null; infront of changestate
So
[State -1,‹C—Í—­‚ß]
type = Null;ChangeState
value = 1900
triggerall = var(45) > 0
triggerall = roundstate = 2
triggerall= !inguarddist && !enemy,numproj && p2movetype!=A
triggerall = power <= 3000
triggerall = p2bodydist X > (200-((p2movetype=H)||(p2statetype=L))*100)
triggerall = statetype != A
triggerall = ctrl ||(stateno=[20,22])
trigger1 = random < 250

All of the triggers would still be read, but it makes testing a lot easier when you can just delete "null;" to get back to where you were.


Also, maybe try
 
triggerall = (roundstate = 2) && (var(45) != 0)  ;AI ON
and
triggerall = (roundstate = 2) && (var(45) = 0)  ;AI OFF
for activating AI changestates. Unless the values can be less than 0 to represent off.

I think this is how I'd set up your changestate.
Spoiler, click to toggle visibilty
When I adjusted the values to match my Ibuki she barely charged. I changed the var and the state no and that's it.

it still has the same probablys only work sometimes but on a certains  match it starts charged almost the whole round

it works 100 percent when I take off the player code

it works alot better now since a change  the AI varset trigger. (Even when the player trigger is that constant but it did power up for like 2-3 second on a diffrent match)
From var(45) <= 0, var(45) !=1  to var(45) = 0

I was using var trigger from AI that was already there ( it was not specfic)

Spoiler, click to toggle visibilty
Last Edit: November 19, 2016, 12:54:05 am by coldskin1
Re: AI keeps powering up
#9  November 19, 2016, 12:09:27 am
  • ******
Use DisplayToClipboard to see if var(45) is changing mid-fight. That's the only thing I can think of if nothing else is working.
Re: AI keeps powering up
#10  November 19, 2016, 02:41:32 am
  • avatar
  • **
    • USA
    • hamalto1990@yahoo.com
Re: AI keeps powering up
#11  November 19, 2016, 09:25:58 am
  • *****
  • Shame on you!
    • USA
The other AI code could be messing with it also.
But like vgma2 mentioned, gut the charge move out of the cmd and see if it sneaks into it somehow.


If it does it at different frequencies you just need to change the values until you get them where you want. If the character only power charges a lot vs certain characters, put a trigger in to monitor those matches? IDK how this would be possible, but if it's happening it's happening.
Usually AI plays "harder" the second round if it lost the first. Keep that in mind
vVv Ryuko718 Updated 10/31/22 vVv
Re: AI keeps powering up
#12  November 20, 2016, 06:55:34 am
  • avatar
  • **
    • USA
    • hamalto1990@yahoo.com
The other AI code could be messing with it also.
But like vgma2 mentioned, gut the charge move out of the cmd and see if it sneaks into it somehow.


If it does it at different frequencies you just need to change the values until you get them where you want. If the character only power charges a lot vs certain characters, put a trigger in to monitor those matches? IDK how this would be possible, but if it's happening it's happening.
Usually AI plays "harder" the second round if it lost the first. Keep that in mind

I think I got it now the AI has to wait till the pc to activate one of the activation triggers which is by chance.
so going to try a AI helper method
Last Edit: November 20, 2016, 06:01:38 pm by coldskin1
Re: AI keeps powering up
#13  August 20, 2017, 05:24:23 am
  • avatar
  • **
    • USA
    • hamalto1990@yahoo.com
AI helper method works but is not perfect, the character still charges randomly charges some matchs in the beginning. How here converting the character to mugen 1.0 and using the ai activatation, the ai works perfectly