collapse

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

Classic VS : Balrog by ELECTRO
[September 25, 2024, 11:44:58 PM]


Justice League Seattle Stage by Vegaz by LightFlare
[September 23, 2024, 12:14:06 PM]


Ancient Gears Stage 1.1 & 1.0 by MatreroG
[September 20, 2024, 11:59:18 AM]


Justice League Metropolis Stage by Vegaz by LightFlare
[September 16, 2024, 11:57:49 AM]


Ultimate Mai Shiranui (FF2 & FF3) by nickfurry
[September 15, 2024, 02:27:53 AM]


thunderstrike eric masterson by Blagoy
[September 12, 2024, 02:41:33 PM]


Justice League Gotham Stage by Vegaz by LightFlare
[September 11, 2024, 09:41:42 AM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[September 07, 2024, 03:06:46 AM]


MatreroG's Stages W.I.P. Concepts by MatreroG
[September 06, 2024, 01:27:09 PM]


Justice League Flash Stage by Vegaz by LightFlare
[September 03, 2024, 10:30:40 AM]

* IMT Calendar

September 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