linyiLYi / street-fighter-ai

This is an AI agent for Street Fighter II Champion Edition.
Apache License 2.0
6.3k stars 1.36k forks source link

Input two-player actions #46

Closed quantumiracle closed 1 year ago

quantumiracle commented 1 year ago

Hi,

Thanks for open-sourcing this great project!

I'm wondering if it's possible to support controlling both side of players in the game, the env.step() will take two actions per step, one for each player. Any suggestion on how to support that?

tonyxu99 commented 1 year ago

Yes. I have created a project based on Linyi's project. (https://github.com/tonyxu99/String_fighter_AI). I have saved a 2 player state. You can play against the AI. Later, I will figure out how to make two AIs fight and train each other.

quantumiracle commented 1 year ago

Thanks! Good job!

I tried it and it works. Just the frame rate seems to be a bit high and the human user may be hard to react.

tonyxu99 commented 1 year ago

Thank you for trying my code. The speed is normal for me. Did you clone my whole project and use my version of "street_figher_customer_wrapper.py"? If you want to make the game slower, you can set the "tps" lower than 60 at the line#227 of interative.py.

quantumiracle commented 1 year ago

Thanks!