[AI coding]AIScriptpad2.0 Support Thread

Started by Bero, September 11, 2013, 02:43:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

So bero, you basically exported AImario.pac with brawl box and opened it using the AIScriptpad?  As you can tell, I don't want to make AI from scratch, there are just some additions that I want to make.  Is this how I would take and edit the existing AI?

As I wrote in tutorial, AIScriptpad loads FitChar(Motion)Etc.pac, common3.pac, and Fighter.pac. After the program loads these pacs, it automatically exports scripts. After that, you can edit them.
After you make a project, you won't have to do these steps next time.

Quote from: Bero on September 16, 2013, 04:55:23 AM
Thank you. If you have any requests, feel free posting it!

indeed ;)

I havn't installed it yet due to massive amounts of web cleanup and reorganization I'm trying to perform...
(especially with my forum)

but once I install it,
I hope you don't mind me requesting convenience features. :)
(some of them may be complex)

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

Quote from: Bero on September 16, 2013, 06:54:04 AM
No, I have little time now and didn't implement them.
To implement direction change, I would write like this:
label _2
if Rnd < 0.5    //50% right
    var4=1
else    //50% left
    var4=-1
endif
label
...    //the same as previous post
Button B
AbsStick var4 1    //input stick

To implement only 1 input, I would write like this:
label _2
...
GetNearestCliff var0    //var0=Nearest Cliff X coordinate, var1=Nearest Cliff Y coordinate
if YCoord < var1
    Button B
endif

However I didn't test these codes.

So, do I edit what you edited to look this?  And when you say same as previous ost, I squeeze that in there?

@DarkPika
I'm a little feared by your word 'complex' :)
But I will do my best when you give me feedback though I cannot touch my PC for 2 weeks from now.

@NEWB
Yes, please place correspond part there. To be more specific, lines after "label _2" and before "Button B".
However the code isn't tested so you may have to do trial-error.

Quote from: Akeno-sempai on September 15, 2013, 05:41:07 PM
I heard there was a contest of which one would make the best CPU character... Is it with this program that the CPUs were "made"?
That was mine from like 2 years ago back when v1.0 was released. Nobody submitted anything though.

Good to see you bero, looking forward to some AI submissions in the vault soon

I managed to clean up my L-canceling code for Project M by a lot. It still only works for individual attacks but it's much made progress. Unfortunately, there are some issues when dealing with platforms. I would assume the Y Coordinate is relative to what's directly below a character. This is still a good thing since it won't end up only L-canceling at the very ground. However, when moving around, the Y coordinate (assuming I'm correct) changes drastically when moving over a platform (ground is lowest -> platform is lowest).

Here's an example for Marth's Nair:


if FrameGE 1 && !(FrameGE 2)
    Button A
endif
if FrameGE 3 && !(FrameGE 24) && InAir
    if FrameGE 15 && !(FrameGE 16) && InAir  // Ideal Fast Fall Frame
        Stick 0 (-1)
    endif
    if YCoord <= 1  // L-cancel when close to the ground
        Button R
        Finish
    endif
Return
endif
if FrameGE 24 || !(InAir)
    Finish
endif
Return

@ NaOH
My previous version had many problems like complex syntax, UI bugs, and this is the largest, lacked much information which was necessary to implement AI.
This version solves these problems. So I hope many people use this.

@Tailsmiles249
If you would like to know distance between platform and the CPU, "GetNearestCliff" is useful. It returns nearest cliff coordinates into specified variables. For example,
GetNearestCliff var3
results in that var3=nearest cliff x coordinate, and var4=nearest cliff y coordinate.
If the stage is flat, this will work fine with your code.

Have you already learned AI coding!?

In a sense I did; I can at least read it without much problems.

So are you telling me "Cliff" doesn't refer to a ledge? It simply refers to an sort of floor?

It doesn't always return ledge coordinate. Stages like Summit don't have ledge and this command returns the left or right end of the floor on which CPU is.
If you want to get coordinates of ledge, use GetNearestHangable.
I didn't know the term 'ledge' when I found this command so I named like this.

Quote from: Bero on September 16, 2013, 07:57:43 PM@DarkPika I'm a little feared by your word 'complex' :) But I will do my best when you give me feedback though I cannot touch my PC for 2 weeks from now.

lol not in my terms of complexity, is what I mean. XD
it's the normal terms of complexity, meaning things shouldn't be 50x more complex than average ;)
(at least... this is what I hope for)

and pardon my curiosity, but may I ask why?? ._.
or would you rather feel better not explaining it??

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

It's very personal reason that I have club activity event in my university.
After that, I return home for 1 week.
I usually work using desktop PC so I cannot touch it.

September 17, 2013, 02:27:40 AM #42 Last Edit: September 17, 2013, 03:09:58 AM by NEWB
So, I found where you made the change in 2040.as, only it said label _0 not 2.  I am now trying to change it.

Post Merge: September 17, 2013, 03:09:58 AM

Can you show me what the whole code should now look like, so I can compare?  Not sure I did it right...

September 18, 2013, 02:50:41 PM #43 Last Edit: September 18, 2013, 02:56:19 PM by Tailsmiles249
Alright, I've redone my L-cancel code a bit, but I think I found the real issue: Looping. While it does seem that the code is looping, the AI will only press 'R' either on the 3rd frame or on a fast fall frame when close to the ground.

Marth's Nair:


if FrameGE 1 && !(FrameGE 2)
   Button A
endif
if FrameGE 3 && !(FrameGE 24) && InAir
   GetNearestCliffR var0
   if FrameGE 15 && !(FrameGE 16) && InAir && !OutOfStage  // Ideal Fast fall frame
       Stick 0 (-1)
   endif
   if var1 <= 1  // L-cancel when close to the ground
       Button R
       Finish
   endif
Return
endif
if FrameGE 24 || !(InAir)
   Finish
endif
Return

@NEWB
I'm sorry but I am using smart phone to post here and cannot use my PC for 4 days.
When I return home, I will post the script.

@Tailsmiles249
It's an inherent issue.
The AI system cancels execution when the character performs attack.
To avoid it, you have to edit AIPD to load only 1 routine when on stage.
However, it means you have to write all the moves in one script.