• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Melee AI?

Sieghart

Smash Apprentice
Joined
May 14, 2015
Messages
173
I personally have a great interest and love for creating AI, mostly as a hobby. I was wondering why, exactly, no one's doing AI for Melee. This is putting aside the actual difficulties that are inherent to creating AI for something like this. I'm more asking whether or not there is some advancement that hasn't been made as of yet that causes this to be difficult or impossible? Or is there just no interest generally? I was looking into doing this myself eventually as I get better at the game but the lack of any precedence thus far is discouraging to say the least.
 

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
I've read somewhere in the workshop that it's not a script, but some hardcoded stuff that's way harder to modify. And also, Ganondorf level 9 spamming up-b is also iconic I guess.
 

Sieghart

Smash Apprentice
Joined
May 14, 2015
Messages
173
I've read somewhere in the workshop that it's not a script, but some hardcoded stuff that's way harder to modify. And also, Ganondorf level 9 spamming up-b is also iconic I guess.
I see. If that's the case for editing internally, has no one tried doing so through external means and having the AI input through a player slot?
 

SuperShus

Smash Journeyman
Joined
Oct 21, 2013
Messages
267
Location
MD/VA
Slippi.gg
East#694
I am also interested in this - anything happening with it?

@ Achilles1515 Achilles1515 , would you mind explaining how your player2 slot ai mod works and explaining how this gentleman could work on it?
 

Geranimo

Smash Cadet
Joined
Dec 25, 2013
Messages
60
Location
Montréal
I'm also highly interested in this. Forget about editing hex codes, if something is worth developing it's a dolphin hook that loads important game state variables and gives them to the AI program. Now if someone knows win32 api, this only needs to be done once and then just find the offsets if they change for some dolphin upgrade reason.

For the AI, nothing is worth developing if it's not machine learning. There are some great algorithms and given a good computer and enough learning time I don't doubt they could beat anybody. In fact they would beat humans pretty badly because they would be able to react to a frame the frame after.
 
Last edited:

SinsOfApathy

Smash Journeyman
Joined
Feb 24, 2015
Messages
474
NNID
Psion312
I'm also highly interested in this. Forget about editing hex codes, if something is worth developing it's a dolphin hook that loads important game state variables and gives them to the AI program. Now if someone knows win32 api, this only needs to be done once and then just find the offsets if they change for some dolphin upgrade reason.
I've got a different method for this, because I don't want to use an HWND hook or anything. I'd like something extensible that works on real hardware, and a simple cable fed into an Arduino won't give me memory data. So, I've rewritten the Geckohandler to allow me to write to the SI buffer and spoof controller input.

The main issue is that every single piece of homebrew throws up roadblocks. Nintendont is unusable, because it has fake SI registers. I don't know of any other homebrew besides possibly GeckoOS that I could change the codehandler on, but I also have a Melee 1.00 disc. Gotta grab 1.02 from a friend.

Plus, I've been too busy to setup a Debugfast to ensure that Dolphin is working properly, since I can't see my TCP connection or "Error: Unknown opcode" in the logs (As far as Java and Python have been concerned, I'm connected, but getting no responses). I've got to test it at some point to see where that stands.

For the AI, nothing is worth developing if it's not machine learning. There are some great algorithms and given a good computer and enough learning time I don't doubt they could beat anybody. In fact they would beat humans pretty badly because they would be able to react to a frame the frame after.
I disagree completely. Like, I shake my head every time someone wants to throw Machine Learning at something, just because it's the new thing to do. Melee is an extremely large state machine thanks to the single-core processor and 2D movement, which simplifies the process dramatically over work I've done in the past.

Hell, Dantarion was asked previously if he'd try something like KenBot with Melee, and he stated that it was more complicated then he was willing to take on at the time. He likes to programmatically grab hitbox data and such. I couldn't give a **** less. I mean, we'd be Final Destination only for a while, but hey, something is better than nothing.

I'd hoped that by the end of this month I'd have something reasonable to show, but classes got a bit in the way of that. I have one free week till classes start up again, then I have an 18 hour work load plus my research/consulting. I'll try to get something working soonish, or at the very least get my Codehandler out of the gist I sent to @DRGN and get on a public github repo for people to throw things at.

Edit: Here's my git repo https://github.com/PsiLupan/Melee-Bot
I'm not at my desktop, so I don't have my notes or anything up yet. I should be home tomorrow to take care of that.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I monitor the action state of P2 every frame of the game. If they are in a state of interest, I make them a human and thenI turn on a flag to designate what "set of actions to make happen" and then set another flag to spam or hold an input. When it gets back to this custom function, the game reads the action flag (e.g. shine in place) and then looks at the current action state of P2 and stores an appropriate controller input to spam/hold next.

Like with the spacies shine pressure, once the character is in an aerial attack action state, down on the joystick is spammed to make them fastfall.

And of course there are other checks and things as well like don't input B to shoot a laser until Falco is in the 6th frame of jump, etc.

I did this super long ago, and I know so much more now. I'm sure I'll do things differently when I rewrite them for 4.0, but I really haven't thought about it that much (hopefully this happens soon...currently working on other things).

You have to be rather proficient in Assembly and also have a solid understanding of how to pull out character variables in the RAM at any given time.
 
Last edited:

Sieghart

Smash Apprentice
Joined
May 14, 2015
Messages
173
I monitor the action state of P2 every frame of the game. If they are in a state of interest, I make them a human and thenI turn on a flag to designate what "set of actions to make happen" and then set another flag to spam or hold an input. When it gets back to this custom function, the game reads the action flag (e.g. shine in place) and then looks at the current action state of P2 and stores an appropriate controller input to spam/hold next.

Like with the spacies shine pressure, once the character is in an aerial attack action state, down on the joystick is spammed to make them fastfall.

And of course there are other checks and things as well like don't input B to shoot a laser until Falco is in the 6th frame of jump, etc.

I did this super long ago, and I know so much more now. I'm sure I'll do things differently when I rewrite them for 4.0, but I really haven't thought about it that much (hopefully this happens soon...currently working on other things).

You have to be rather proficient in Assembly and also have a solid understanding of how to pull out character variables in the RAM at any given time.
Thanks for explaining that. ASM is no issue but I'll have to look into Melee specific character variables since I know nothing about that.
 
Top Bottom