GitXplorerGitXplorer
W

20XX

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
3425e59dcd21ed5c9f759a2db4cbd6cd08f4221f

a lot

WWillDudley committed 2 years ago
Unverified
a680941418b43d5e6e8c1a554af8d404b64dcbe7

installation instructions

WWillDudley committed 2 years ago
Unverified
1ecd16e8bff56bd7761719c4823ab92ce3fa5223

installation instructions

WWillDudley committed 2 years ago
Unverified
41e983d2861e480c31143263e4831503084b617d

update setup.cfg

WWillDudley committed 2 years ago
Unverified
14371e2a68d1475bc6a0703f53de354622ccc551

init

WWillDudley committed 2 years ago
Unverified
04f0653374129d3fb16d40527239b8be507004c5

cleanup

WWillDudley committed 2 years ago

README

The README file for this repository.

20XX

from melee_20XX import Melee_v0

20XX is a PettingZoo-based library for Melee. (⌐■_■)

Code Example

import os.path
import melee

from melee_20XX import Melee_v0
from melee_20XX.agents.basic import CPUFox, RandomFox

players = [RandomFox(), CPUFox()]

env = Melee_v0.env(players, os.path.expanduser('~/.melee/SSBM.ciso'), fast_forward=True)

max_episodes = 10

if __name__ == "__main__":
    env.start_emulator()

    for episode in range(max_episodes):
        observation, infos = env.reset(melee.enums.Stage.FOUNTAIN_OF_DREAMS)
        gamestate = infos["gamestate"]
        terminated = False
        while not terminated:
            actions = []
            for player in players:
                if player.agent_type == "CPU":  # CPU actions are handled internally
                    action = None
                else:
                    action = player.act(gamestate)
                actions.append(action)
            observation, reward, terminated, truncated, infos = env.step(actions=actions)
            gamestate = infos["gamestate"]

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

  1. pip install 20XX
  2. pip install git+https://github.com/WillDudley/libmelee.git (fixes some menu handling issues)

Credits