davidtjones / melee-env Goto Github PK
View Code? Open in Web Editor NEWA gym-esque environment for Super Smash Bros. Melee.
License: GNU Lesser General Public License v3.0
A gym-esque environment for Super Smash Bros. Melee.
License: GNU Lesser General Public License v3.0
This seems to happen primarily with fast forward turned on. I'm unsure what causes this, but it seems possible that the agent's final input is not properly flushed before getting back into the stage selection. This can cause problems when the menu selection agent tries to select the next stage. I believe this is fixed by 072f3da in the dev channel.
Currently, all agents are required to obtain controller inputs from the action space, which are then executed via ControllerState
instances. While this behavior is desirable for learning agents, non-learning agents are unable to be implemented on melee-env. See this section of code.
Separate AI-agents into two groups, where learning agents (LA) utilize the action space and non-learning agents (NLA) are allowed to execute on their own controllers. This may be relatively simple.
This would be a good point to reconsider whether the observation returned by MeleeEnv will be a numpy array or just the whole gamestate from libmelee, which may just make a lot more sense and allow LA's observations (probably heavily filtered/modified versions of libmelee's gamestate) to not affect other agents (currently all agents are forced to accept the same observation space).
One big issue here is that the current implementation can keep track of when players are defeated and provide the correct information to fill in to the observation. gamestate
just drops the player entirely, which is problematic when the agent expects an observation of a given size. I think libmelee should really handle this better, but it may be a slippi thing. Idea: Agents can keep track of their last observation (last_observation
), and perhaps there can be some indication to agents when other agents have been defeated so that rows from last_observation
can be inserted into current_observation
or something.
The environment functions fairly well and should really be separate from the planned AI work. I'll be stripping out the unrelated work and then publishing this on pip.
See title. Should be fairly simple to pass a stage parameter to "setup" to choose a specific stage for every episode, if desired.
Problem: When playing a game with two players, the game hangs at startup and doesn't continue.
Expected behavior: game should proceed to a two player game and proceed as normal
Related info:
Traceback
File "agents_example.py", line 28, in <module>
observation, reward, done, info = env.setup(enums.Stage.BATTLEFIELD)
File "/home/david/bin/python/melee-env/melee_env/env.py", line 87, in setup
self.gamestate = self.console.step()
File "/home/david/.conda/envs/melee/lib/python3.8/site-packages/melee/console.py", line 360, in step
message = self._slippstream.dispatch(self._polling_mode)
File "/home/david/.conda/envs/melee/lib/python3.8/site-packages/melee/slippstream.py", line 65, in dispatch
event = self._host.service(wait_time)
KeyboardInterrupt
Windows support seems pretty straightforward and there is already some structure in place. The windows unique steps will be
Then the existing code should be able to handle the remaining configuration and gecko codes.
Currently every agent will be forced to choose Fox. It should be simple to designate which character the agent should choose by passing a parameter to the agent at initialization, e.g.,
agent = Random(enums.Characters.KIRBY, 4)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.