So our Davis AI fight did take place live, even if probably no one saw it live. But that may be better that way because my streaming capabilities were so bad that I had to use Suriks FPS changer at max to recognize any action going on. You should be able to view it [here] once the processing is done. (edit: scroll down to the bottom of this post to get high quality recordings for each match) But better yet you copy our two AIs from below and let them fight locally for yourself (keep in mind to give them unused AIs as original AIs still use ranged moves):
Azriels Davis AI:
My Davis AI:
A little explanation on those two:
While I had basically worked all week on mine Azriel only took the last day for it, that's why mine pretty much gets straight wins all the time. However mine still has about 4 flaws left and is only optimized for fighting another Davis (I have yet to make it counter other characters and maybe even do some crowd control and tactic running away so it can maybe get through some stages on its own).
Have fun with those! Write your own!
LF2 Recordings of the 5 Matches:
Azriels Davis AI:
C-Code:
if (self_frame == 281) { J(); return 1; } if (self_frame == 292) { if (self_y > -25) { A(); } return 1; } if (self_state == 5) { A(); return 1; } // caught move-breaker (doesn't work for davis) if (self_state == 10) { A(); return 1; } // try to block hits if (self_state == 11 || self_state == 16) { D(); return 1; } // close range if (abs(self_z - target_z) <= 16) { var limit = 50; if (self_weapon_type != 0) { limit = 80; } if (self_x - target_x <= 0 && self_x - target_x > -limit) { if (target_state == 8) { // broken defense DdA(); return 1; } else if (target_state == 16) { // DoP if (self_x - target_x > -7) { left(); return 1; } right(); return 1; } else if (target_state == 10) { // caught A(); return 1; } else if (target_state == 11) { // injured if (target_fall <= 40) { A(); } else { DdA(); } return 1; } else if (target_state == 12) { // falling if (self_mp >= 225 && self_state <= 2) { DuA(); return 1; } } else if (target_state <= 3 || target_mp >= 225 || target_DuA == 3) { if (target_frame < 270 || target_frame > 282) { if (target_frame >= 303) { clr(); print("avoided dragon punch from left"); // attempt to counter dragon punch if (self_facing == 0) { print("self facing right"); if (target_facing == 0) { right(); // move towards target print("target facing right; moving right"); if (self_mp >= 225) { DuA(); print("using dragon punch"); return 1; } else if (self_mp >= 75) { DdA(); print("using strafe"); return 1; } return 1; } else { left(); // face same way as target if (self_mp >= 225) { DuA(); print("target facing left; move left; using dragon punch"); return 1; } else if (self_mp >= 75) { DdA(); print("target facing left; move left; using strafe"); return 1; } A(); print("target facing left; move left; punch"); return 1; } } else { print("self facing left"); if (target_facing == 0) { right(); // move towards target print("target facing right; moving right"); return 1; } else { if (self_mp >= 225) { DuA(); print("target facing left; using dragon punch"); return 1; } else if (self_mp >= 75) { DdA(); print("target facing left; using strafe"); return 1; } A(); print("target facing left; punch"); return 1; } } } else { if (self_facing == 0) { if (target_facing == 0) { A(); return 1; } else { D(); return 1; } } else { if (target_facing == 0) { right(); // turn around return 1; } else { // dodge if (target_z > self_z) { up(); } else { down(); } left(); return 1; } } } } else { right(); D(); return 1; } } else if (self_frame == 110 && self_shake > 0) { DdA(); return 1; } else if (target_state == 4) { right(); A(); return 1; } } else if (self_x - target_x >= 0 && self_x - target_x < limit) { if (self_frame == 110 && self_shake > 0) { DdA(); return 1; } if (target_state == 8) { // broken defense DdA(); return 1; } else if (target_state == 16) { // DoP if (self_x - target_x < 7) { right(); return 1; } left(); return 1; } else if (target_state == 10) { // caught A(); return 1; } else if (target_state == 11) { // injured if (target_fall <= 40) { A(); } else { DdA(); } return 1; } else if (target_state == 12) { // falling if (self_mp >= 225 && self_state <= 2) { DuA(); return 1; } } else if (target_state <= 3 || target_mp >= 225 || target_DuA == 3) { if (target_frame < 270 || target_frame > 282) { if (target_frame >= 303) { clr(); print("avoided dragon punch from right"); // attempt to counter dragon punch if (self_facing == 1) { print("self facing left"); if (target_facing == 1) { left(); // move towards target print("target facing left; moving left"); if (self_mp >= 225) { DuA(); print("using dragon punch"); return 1; } else if (self_mp >= 75) { DdA(); print("using strafe"); return 1; } return 1; } else { right(); // face same way as target if (self_mp >= 225) { DuA(); print("target facing right; move right; using dragon punch"); return 1; } else if (self_mp >= 75) { DdA(); print("target facing right; move right; using strafe"); return 1; } A(); print("target facing right; move right; punch"); return 1; } } else { print("self facing left"); if (target_facing == 1) { left(); // move towards target print("target facing left; moving left"); return 1; } else { if (self_mp >= 225) { DuA(); print("target facing right; move right; using dragon punch"); return 1; } else if (self_mp >= 75) { DdA(); print("target facing right; move right; using strafe"); return 1; } A(); print("target facing right; move right; punch"); return 1; } } } else { if (self_facing == 1) { if (target_facing == 1) { A(); return 1; } else { D(); return 1; } } else { if (target_facing == 1) { left(); // turn around return 1; } else { // dodge if (target_z > self_z) { up(); } else { down(); } right(); return 1; } } } } else { left(); D(); return 1; } } else if (target_state == 4) { // normal left(); A(); return 1; } } } return 0; |
My Davis AI:
C-Code:
//define variables var sfac = 2*self_facing-1 //own direction (-1: left, 1: right) var tfac = 2*target_facing-1 //target direction (-1: left, 1: right) var bfac = self_facing+target_facing-1//both facing (-1: left, 0: against, 1: right) var stxd = self_x-target_x //x distance (left > 0 > right) var styd = self_y-target_y //y distance (above > 0 > below) var stzd = abs(self_z-target_z) //z distance var dist = stxd*sfac //directional distance var test = 0 //0: no testing, 1: defensive, 2: open, 3: offensive, 4: passive //no mp combo if (dist >= 0 && target_state == 12 && styd > 60 && styd < 90){ if (self_state <= 1){if (stxd > 0){left()}else {right()};return 1}//run else if (self_state == 2){A();return 1} //attack } //combo breaker if (test != 4 && stzd < 10 && dist < 75 && dist >= -5 && target_y == 0 && (self_frame == 111 || self_state == 8 || self_state == 11 || self_state == 16)){ if (self_mp >= 225 && self_frame != 111){DuA()}else if (self_mp >= 75 && self_frame == 111){DdA()}else if (test <= 1){D()};return 1 }//flip else if ((self_frame == 182 || self_frame == 188) && test != 4){ if (target_frame == 301 || target_frame == 290 || target_frame == 291 || target_frame == 292 || target_frame == 75){J()} }//dash, roll else if (self_frame == 215 && self_bdefend >= 20 && test != 4){ if (dist > 0){J()}else {D()} } //facing if (bfac != 0 && self_state == 7 && stzd < 10 && target_y == 0 && test != 4){//defense if (sfac < 0){left()}else {right()}//turn } else if (stzd < 10 && dist < 0 && self_state != 1 && self_state != 7 && test != 4){//normal if (stxd > 0){left()}else {right()}//turn } //defending if (stzd < 10 && self_state != 7 && target_state == 3 && abs(dist) < 100 && target_y == 0 && test <= 1){ D() }//combos else if (stzd < 10 && dist < 70 && dist >= -5 && test != 4){ if (target_hp > 0 && target_hp <= 114 && self_mp >= 225 && target_state != 12 && target_state != 7){DuA();return 1}//finisher else if (self_frame == 39 && target_state == 12){J();return 1} //super combo else if ((self_frame == 278 || self_frame == 279) && target_mp >= 225 && target_shake > 0){DuA();return 1} //safe combo else if (target_state == 16 && self_mp >= 210 && self_state == 0 && dist > 40){if (stxd > 0){left()}else {right()};return 1}//grab else if ((target_state == 16 || target_state == 8) && self_mp >= 150){DdA();return 1} //starter else if ((self_frame == 281 || self_frame == 282) && target_state == 12){if (self_mp >= 450){DuA();return 1} //doubleDstart else if (self_mp >= 100){J();return 1}else if (stxd > 0){left()}else {right()};return 1} //low mp start else if (target_hp > 0 && target_state == 12 && styd > 90 && self_frame == 215 && self_mp >= 225){DuA();return 1} //double dragon else if ((target_frame == 181 || target_frame == 187) && target_hp > 0 && self_mp >= 225){DuA();return 1} //fall dragon } //opportunities if (self_state == 5 || self_state == 9 || (self_frame == 292 && styd < 7)){//dash,grab,leap attack if (target_hp <= 138 && self_state == 9 && self_mp >= 300){DuA()} //finisher else if (target_hp <= 114 && self_state == 9 && self_mp >= 225){DuA()} //finisher else {A()};return 1} //attack else if (self_frame == 292 || self_frame == 87){return 1} //wait //void unwanted inputs if (self_DrA >= 2 || self_DlA >= 2 || self_DuA >= 2 || self_DdA >= 2 || self_DuJ >= 2){ if (self_z - target_z < 0){down()}else {up()} } //test control if (test == 1 || test == 2 || test == 4){//defensive, open, passive if (stzd > 5){if (self_z - target_z < 0){down()}else {up()}} //zfollow if (abs(stxd) > 100){if (stxd > 0){left()}else {right()}} //xfollow else if (self_state == 2){if (stxd < 0){left()}else {right()}}//stop return 1 } else if (test == 3){ //offensive if (self_state == 0){A()} //attack if (self_state == 2){if (stxd < 0){left()}else {right()}}//stop return 1 } else {return 0}//free |
A little explanation on those two:
While I had basically worked all week on mine Azriel only took the last day for it, that's why mine pretty much gets straight wins all the time. However mine still has about 4 flaws left and is only optimized for fighting another Davis (I have yet to make it counter other characters and maybe even do some crowd control and tactic running away so it can maybe get through some stages on its own).
Have fun with those! Write your own!
LF2 Recordings of the 5 Matches:
MATCH1 (Click to View)
MATCH2 (Click to View)
MATCH3 (Click to View)
MATCH4 (Click to View)
MATCH5 (Click to View)
favorite dcing techniques: wpoint | double key inputs | holding back | alternate basic moves