collapse

Author Topic: Quick Adjust for AI  (Read 573 times)

0 Members and 1 Guest are viewing this topic.

Offline prnzokoshiro

  • Initiate
  • **
  • Posts: 68
  • Last Login:July 08, 2015, 12:51:10 PM
    • Email
Quick Adjust for AI
« on: April 12, 2013, 05:08:47 AM »
ok say I have this in the AI of a char


;Counter Low
[State -1]
type = ChangeState
value = 1800
triggerall = var(9) = 1
triggerall = statetype != A
triggerall = p2stateno != [5080, 5090]
triggerall = p2stateno != [5100, 5110]
triggerall = p2stateno != [5121, 5160]
triggerall = p2stateno != [5170, 5200]
trigger1 = p2statetype = A && ctrl
trigger1 = p2movetype = A && P2bodydist x <=55
trigger1 = random < 450
trigger2 = p2statetype = S && ctrl
trigger2 = p2movetype = A && P2bodydist x <=55
trigger2 = random < 450

...which way would I adjust the random, up or down to make it use the attack/combo/routine more often or less often?  or is that not even how it works?  to make it less often, would I change to random < 250 or change to random > 650 ?  just want to know how that works.



Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Quick Adjust for AI
« Reply #1 on: April 12, 2013, 05:40:18 AM »
This ignores probability a lot, but here is how you should think of random.

Random < 500, this is logically true 50% of the time yes? So logically it will be 100% when considered over 2 ticks. Basically meaning that the move has a 100% chance to happen, especially as those conditions aren't very strict. If it's not happening enough for your liking, it's because your AI is too loose already and you have other things listed above it that are taking precedence.

The best way to do AI is actually take your randoms lower than 100, and only use high values for specific situations like continuing combos. To explain that, going back to the probability and percentages

Random < 100. This is true 10% of the time, so you have a 100% chance over 10 ticks, or 6 chances to do the move every second. If you move down to random < 50, it's a 5% chance and true once every 20 ticks. This has the benefit of OTHER moves with the same potential being able to take effect. More of your AI is able to work. Rather than it picking the same couple of moves over and over because they are so loosely triggered and their random value is so non-random.

Offline prnzokoshiro

  • Initiate
  • **
  • Posts: 68
  • Last Login:July 08, 2015, 12:51:10 PM
    • Email
Re: Quick Adjust for AI
« Reply #2 on: April 13, 2013, 07:30:05 AM »
Appreciate it!  thanks ::salute::

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

Virtual Bart Science Fair by Rage
[June 21, 2024, 01:25:51 PM]


Turn Battle - Mega Man Robot Master Mayhem by O Ilusionista
[June 18, 2024, 10:11:08 AM]


Classic VS : Cheng / Athena by O Ilusionista
[June 18, 2024, 10:10:26 AM]


Downtown Nekketsu Monogatari Stage Pack by Vegaz by LightFlare
[June 17, 2024, 02:30:12 PM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by Uche_of_IMT
[June 10, 2024, 11:25:24 PM]


Street Fighter Spec Ops 2021 by O Ilusionista
[June 08, 2024, 01:36:06 PM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[June 06, 2024, 07:34:10 PM]


Kirby the Dream Battle by O Ilusionista
[June 06, 2024, 01:04:12 PM]


Neo Geo Pocket by malevka2
[June 05, 2024, 10:53:57 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[June 03, 2024, 03:18:12 PM]

* IMT Calendar

June 2024
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
[23] 24 25 26 27 28 29
30

SimplePortal 2.3.5 © 2008-2012, SimplePortal