A gym-esque environment for Super Smash Bros. Melee.
Project description
melee-env
This repo contains an implemention of Melee as a Gym-esque environment.
Code example:
from melee_env.env import MeleeEnv
from melee_env.agents.util import ObservationSpace, ActionSpace
from melee_env.agents.basic import *
# Setup the Agents, Melee supports 2-4 players
players = [Human(), Shine(), Random(), CPU(3)]
# make the environment
env = MeleeEnv(
"path/to/iso",
players,
ActionSpace(),
ObservationSpace(),
fast_forward=False,
blocking_input=True)
episodes = 10; reward = 0; done = False
env.start()
observation, reward, done, info = env.setup()
for episode in range(episodes):
while not done:
print(observation)
for i in range(len(players)):
if players[i].agent_type == "AI": # only process AI players
players[i].act(observation[i], env.action_space)
observation, reward, done, info = env.step()
This library has been designed with flexibility in mind. The action and observation spaces are completely modular, and custom spaces are supported.
Note
This library requires Slippi, which in turn requires an SSBM 1.02 NTSC/PAL ISO. This library does not and will not distribute this. You must acquire this on your own!
Installation
Install from pip: pip install melee-env
. Test by running the above example.
Platform support
- Linux
- Windows (planned)
Some notes:
- If you notice that controllers aren't working, check the config in dolphin and verify that the controller profile is setup correctly. The automation steps should take care of this. You can verify the controller config for the bot is correct by checking Controllers -> [port X] -> Configure and verifying that the resulting window looks like this. You should be able to load the slippibot profile to fix this. Working on a fix for this.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
melee-env-0.10.1.tar.gz
(13.9 kB
view hashes)
Built Distribution
melee_env-0.10.1-py3-none-any.whl
(14.2 kB
view hashes)
Close
Hashes for melee_env-0.10.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57d9b80cb04364fe9f91f101f9eca76533e12f2927f5ab0c41290c223c09f71b |
|
MD5 | 769faf8ca17ac90c7ac2aa532c8f7480 |
|
BLAKE2b-256 | 0c992c5fcacfe94c8df46f8ed0268bc717eb2b17672bef12c78fe0e36b831c0d |