jump to navigation

AI ( artificial inteligence )that learns with its mistake 20 20UTC June 20UTC 2009

Posted by mugencharacters in m.u.g.e.n.
trackback
The current methods of AI are only comparisons of position between you and the opponent, there was this attack, a projectile is fired in his direction or even if you have enough energy to activate a super. Activities to identify possible controls to be applied at a specific moment, but in a way that commands are still “blind”.
That advance knowledge of all these features of an opponent if there is no way to predict the effectiveness of the attack?

It’s not funny see an opponent spend one, two, three bars, a special attack that does no harm to you? (Ex: Death-Force vs Zangief)
This update on IA somehow evolves more the perception of the fighter and his opponent is attacking with complete certainty the success of the method through trial and error, if Erre will not repeat this mistake.
This method is very broad and I will depend solely on your character, I quote here only its method of creation and preparation.

Pre-requisites:
>>> Variable IA
>>> different variables on

====================================
Step 01: Setup
====================================

Depending on the type of IA used by your char and the various features of their strokes, the method may Moderate use a large number of variables
Basicamnte the variable should assume different values as “test”, “ACCEPT” and “DISAPPROVED.”
>>> Test and the initial value of variable (zero) and represents the current state of a particular set of movements or a coup. With this value the char will test the scams that could normally be “accepted” or “disapproved”
>>> ACCEPT is the complete acceptance of all of the blow or blows. This value should not be set in the first successful coup, should be given at least 2 attempts to take notes so.
>>> DISAPPROVED is the value of elimination, not blows hit the opponent with the same distance “vulneravies. 2 testing also is needed for proof.

The variable should then at least 5 values:

0 “testing”
1 “accepting”
2 “accepted” <- statement value
3 “reprovadando”
4 “failed” <- statement value

====================================
Step 02: Checker
====================================

To save a large number of variables is advisable to add some blows and implement a set only one variable for this set. You may start using two basic groups that were cited above by the group of “coups arremessáveis” and “senior scams.”

QUOTE
Ex:
variable-verification scams arremessaveis (50)
Current value
Var (50) = 3 <- pitch bad happened, one mistake and the group will be disapproved.

variable verification of senior scams (11)
current value
Var (11) = 2 <- two successful coups, you’re not fighting a char Chibi or your bangs are able to hit him

There is nothing that impessa you to use a variable to a single shot, and there preoculpação in 2 attempts to use the evidence in special moves.

QUOTE
Ex:
variable to verify the coup Galactica Phantom (33)
Current value
Var (33) = 3 <- Special bad happened, variable took the value failed to save waste of energy
Var (33) = 4

Exemplifying the verifier would thereby be put in CMD:

QUOTE
Trigger1 = Var (x)! = 4 <- different value of 4 which is the failure of established
—————————–
trigger1 = Var (x) = 2 <- only active if the coup proved

====================================
Step 03: Applying the Verification
====================================

QUOTE
Summary for activation of IA in DCM basically

[Command]
name = “cpu_1″
command = F, F, F, F, F, F, F, F, F, F
time = 1
[Command]
name = “cpu_2″
command = D, D, D, D, D, D, D, D, D, D
time = 1
[Command]
name = “cpu_3″
command = B, B, B, B, B, B, B, B, B, B
time = 1
[Command]
name = “cpu_4″
command = U, U, U, U, U, U, U, U, U, U
time = 1
;———————–
[State -1]
type = VarSet
triggerall =! Var (59)
trigger1 = command = “cpu_1″
trigger2 = command = “cpu_2″
trigger3 = command = “cpu_3″
trigger4 = command = “cpu_4″
v = 59
value = 1

To demonstrate this part I use the files KungFuMan as guinea pigs.

=====================================
Checking for the group of pitch
variable of IA: a 59
Variable chosen for the group: a 44

Deploying verification

QUOTE
CMD, with the AI settings ready

; Kung Fu Throw
, “Š, °
[State -1, Kung Fu Throw]
type = ChangeState
value = 800
triggerall = (command = “y” & & Var (59) = 0) | | (Var (59)! = 0 & & Var (44)! = 4)
triggerall = statetype = S
triggerall = ctrl
staten triggerall =! = 100
trigger1 = command = “holdfwd”
trigger1 = p2bodydist X <3
trigger1 = (p2statetype = S) | | (p2statetype = C)
trigger1 = p2movetype! = H
trigger2 = command = “holdback”
trigger2 = p2bodydist X <5
trigger2 = (p2statetype = S) | | (p2statetype = C)
trigger2 = p2movetype! = H

As the Kfm has only one throw of the trigger activation is simple

QUOTE
CNS: Here it is necessary that you know the weaknesses of the coup to the triggers correctly setar

; Kung Fu Throw – Attempt
[Statedef 800]
type = S
movetype = A
physics = S
Juggle = 0
velset = 0.0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT; Attributes: Standing, Normal Throw
hitflag = M-; Affect ground only people who are not being hit
priority = 1, Miss; Throw has low priority, must be dodge or miss type.
sparkno = -1; No spark
sprpriority = 1; Draw in front of p2
p1facing = ifelse (command = “holdfwd”, -1, 1); Turn if holding forwards
p2facing = 1; Force p2 to face Kfm
p1stateno = 810; On success, Kfm 810 changes to state
p2stateno = 820; If hit, p2 changes to state 820 in Kfm’s cns
guard.dist = 0; This prevents p2 from going into state if the guard close
1 = fall, falling down into force p2

[State 800]; test error, easy to be seen in throws (course when not working)
type = VarAdd
triggerall = Var (44)! = 4; forehead until you reached the value of proof of error
trigger1 = AnimTime = 0; check at the end of the state because normally there is a change to another when success
trigger1 = abs (P2dist x) <= 10 & & S = Statetype; checks that the opponent was close enough to be turpentine
v = 44
value = 1

[State 800]; Test correction, if the coup fails after being set to “ACCEPT”
type = VarAdd
triggerall = Var (44) = 2
trigger1 = AnimTime = 0; failed coup with approval
trigger1 = abs (P2dist x) <= 10 & & S = Statetype; if there was a critical failure subject to disapproval
v = 44
Value =- 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;———————————————-
; Kung Fu Throw – Throwing the opponent (Success)
[Statedef 810]
type = S
movetype = A
physics = N
anim = 810
poweradd = 60

[State 810]; imcrementa acceptance
type = VarAdd
trigger1 =! Time & & Var (44)! = 3; coup has not yet been proven
v = 44
value = +1

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 1
.
.
.

========================================
Checking for the group of senior scams
variable of IA: a 59
Variable chosen for the group: a 51

Meet the blows that you consider “high” and that may not hit rats

As the following example I setar blows of Kfm
>>> Stand Light Punch
>>> Triple Palm Kung Fu (hyper)

Deploying checks

QUOTE
CMD:

; Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = (command = “x” & & Var (59) = 0) | | (Var (59)! = 0 & & Var (51)! = 4)
command = triggerall! = “holddown”
trigger1 = statetype = S
trigger1 = ctrl
staten trigger2 = = 200
trigger2 time => 6

; Triple Palm Kung Fu (uses one super bar)
[State -1, Triple Palm Kung Fu]
type = ChangeState
value = 3000
triggerall = (command = “TripleKFPalm” & & Var (59) = 0) | | (Var (59)! = 0 & & Var (51) = 2)
triggerall = power> = 1000
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype! = A
trigger2 = = hitdefattr SC, NA, SA, HA
staten trigger2 =! = [3000.3050]
trigger2 = movecontact

The coup “Triple Palm Kung Fu” will only be activated with the check group’s high “Accepted”

QUOTE
CNS:

; Stand Light Punch
; CNS difficulty: easy
[Statedef 200]
type = S; State-type: S-stand, crouch, C, A-air, L-liedown
movetype = A; Move-type: A-attack, I-idle, H-gethit
physics = S; Physics: Y-stand, crouch, C, A-air
Juggle = 1; Number of air Juggle points move takes
; Commonly-used controllers:
velset = 0.0; Sep velocity (x, y) (Def: no change)
ctrl = 0; Set ctrl (Def: no change)
anim = 200; Change animation (Def: no change)
poweradd = 20; Power to add (Def: 0)
sprpriority = 2; layering priority to Set 2 (in front)

[State 200]; verifying acceptance
type = VarAdd
triggerall = Var (51) <2
trigger1 = Movehit = 1
trigger1 = abs (P2dist x) <= 25
trigger2 = Movecontact
v = 51
value = 1

[State 200]; checking disapproval
type = VarSet
triggerall = Var (51) = 0 | | Var (51) = 2 | | Var (51) = 3
trigger1 = abs (P2dist x) <= 25 & & [b] P2Statetype = S, (corrected)
trigger1 = Movecontact = 0, there is no contact
v = 51
value = ifelse (Var (51) = 0,3,4 – (Var (51) = 2) * 3), if the coup is set as approved and returns fail to test
[/ b]
.
.
.

;————————————–
; Triple Palm Kung Fu (hyper)
[Statedef 3000]
type = S
movetype = A
physics = S
Juggle = 4
velset = 0.0
anim = 3000
ctrl = 0
sprpriority = 2

[State 3000], noting that failure already confirmed the evidence
type = VarSet
triggerall = Var (51) = 2
trigger1 = abs (P2dist x) <= 25 & & [b] P2Statetype = S, (corrected)
trigger1 = Movecontact = 0, there is no contact
v = 51
value = 1
[/ b]

.
.
.

Of course, the test may be suspended and the variable has only 3 values to reduce the chance of errors, it will depend a lot of triggers that you use to query / verify the success of each attack. If there are moves with a minimum level of protection as the “Galactica Phantom” consultations can be avoided in the first disapproved the hyper failure.

====================================
Step 04: Using Verification
====================================

That is the good part where the programmer before the certainty of the efficiency of each group may attack his arm tactics.
The prohibition of strikes shows that the highest possible opponent is Chibi but that does not indicate that all senior scams should be disabled … You can test to make new adjustments when the Chibi is in the air. This without counting the triggers for increased attacks down.

About these ads

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: