altf4 / SmashBot

The AI that beats you at Melee
GNU General Public License v3.0
548 stars 72 forks source link

Issue Starting #107

Closed DzoYee closed 4 years ago

DzoYee commented 6 years ago

Ok so looks like I'm getting super close after a couple months. I'm very unclear about when to run libmelee and when to run smashbot.

Currently I have the dolphin.run(True) line commented out in example.py and smashbot.py.

I start dolphin. Then run python3 example.py then run python3 smashbot.py --port 1 --opponent 2 -n

Nothing happens and I get no output from either. Any tips?

altf4 commented 6 years ago

You're not supposed to run libmelee AND SmashBot. :)

Libmelee is a library that I made that separates out all the general-purpose stuff that you'll want for interfacing with Melee. Basically, it's just SmashBot with all the SmashBot-specific logic torn out.

when you run python3 example.py from libmelee, nothing happens? Dolphin ought to pop up. Don't run dolphin on your own first.

DzoYee commented 6 years ago

Hmm I'm having issues with the dolphin-emu missing error. So I removed the Dolphin.run(True) line.

I then run dolphin and then run python3 example.py. What should I expect to see at that point?

DzoYee commented 6 years ago

I do get this WARNING: Last frame took 1526449549110.786ms to process. and then it hangs

DzoYee commented 6 years ago

Also just read that last detail in your message about not running dolphin myself. I read your response to the FileNotFoundError: [Errno 2] No such file or directory: 'dolphin-emu': 'dolphin-emu' issue but I'm not clear on how to install it so that the script can find it.

DzoYee commented 6 years ago

Ok just using this as a log at this point but somehow example.py just worked then smashbot.py worked. I can't get it to start again though...

altf4 commented 6 years ago

This error: FileNotFoundError: [Errno 2] No such file or directory: 'dolphin-emu': 'dolphin-emu' means that the program is trying to launch dolphin, but can't find it. This sounds like the source of your problems.

How do you have dolphin installed? Specifically, this version built from source? https://github.com/altf4/dolphin/tree/memorywatcher-rebased

DzoYee commented 6 years ago

I have a build that has rebased the official master on top. I'll try to build your fork specifically. Also does it matter if I have multiple versions of dolphin built/installed?

altf4 commented 6 years ago

Well, SmashBot is going to expect the global version of dolphin to be the one it uses. I really ought to add in an option to specify the full path to dolphin. But I haven't yet.

The rebased version of dolphin should work. But who knows. Sounds like you maybe just didn't install it, since it isn't being seen in the user's path.

altf4 commented 4 years ago

Libmelee can also run a specified version of the dolphin binary, in the run() function in case using the global version is still too hard.

https://github.com/altf4/libmelee/blob/master/melee/dolphin.py#L119

(Closing for now