collapse

Author Topic: Quick Adjust for AI  (Read 539 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

Street Fighter 1 Ultimate Ryu by ELECTRO
[May 22, 2024, 03:58:25 PM]


China Town (Revenge of Shinobi) by Lord_Enemil
[May 22, 2024, 03:02:10 PM]


Neon Light Force Demo by Uche_of_IMT
[May 22, 2024, 10:21:37 AM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by Uche_of_IMT
[May 21, 2024, 11:50:20 PM]


The Spider release + Spider-Man game by kobun
[May 21, 2024, 02:05:24 AM]


Let's all try it together! Yazawanainn gose breakdancing in MUGEN! by GTFoxN6Y
[May 18, 2024, 05:00:14 PM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[May 18, 2024, 11:17:34 AM]


Classic VS : Athena by ELECTRO
[May 15, 2024, 01:25:51 PM]


D2TD VS Showcase Thread by D2TD
[May 12, 2024, 10:20:11 AM]


Ballroom Hallway (1.1 Only/AIGS) by Vegaz by LightFlare
[May 09, 2024, 11:53:48 AM]

* IMT Calendar

May 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 31

SimplePortal 2.3.5 © 2008-2012, SimplePortal