The Phillip AI Project
Phillip AI is an innovative project designed to bring the thrill of playing Super Smash Bros. Melee (SSBM) to artificial intelligence. The project utilizes cutting-edge Deep Reinforcement Learning techniques to train AI agents to perform like seasoned players. However, it's worth mentioning that the Phillip AI project is no longer actively maintained and may encounter issues over time. There is an updated successor project that employs imitation learning from slippi replays, available on GitHub.
System Requirements
Phillip AI has been tested on several operating systems including Ubuntu (14.04 and above), OSX, and Windows (7/8/10). Below are the primary components needed to set up the project:
- Dolphin Emulator: This is essential for the project. On Linux, it may need to be compiled from the source, whereas, for Windows, a custom version of Dolphin must be installed by unpacking the zip file.
- SSBM ISO Image: You will need the NTSC 1.02 version.
- Python 3: Anaconda can be utilized on Windows to streamline the setup for Python.
- Phillip Installation: The project can be obtained from GitHub, and installation is done with the command
pip install -e .
from the project’s root directory. - Trained Agents: There are several trained AI agents included in the
agents
directory. Others are available for download via Google Drive.
Playing with Phillip AI
Playing involves the Dolphin emulator and trained AI agents. Knowledge of where the Dolphin executable is located on your system is necessary. Here's an illustrative command for initiating a game:
python3 phillip/run.py --gui --human --start 0 --reload 0 --epsilon 0 --load agents/FalconFalconBF --iso /path/to/SSBM.iso --exe /path/to/dolphin [--windows]
Multiple agents with varying skill levels exist, with some being particularly adept at mimicking human play styles. You can discover a comprehensive array of options by using the --help
option.
Notes for Windows Users
- Ensure the correct path format with forward or backslashes depending on the environment.
- Adjust paths for Python in your system's PATH if necessary, especially if Anaconda isn't being used.
- Communicate with Dolphin using the
--tcp 1
flag when--windows
is in effect, and open port 5555 in your firewall if prompted. - On Windows 10, it might be feasible to use the Linux subsystem for installation.
Training AI Agents
AI training in Phillip is managed through phillip/train.py
. Training is optimized on slurm clusters, but local training is also feasible with some parameter adjustments. Using a specialized Dolphin version synchronized with zmq is suggested to avoid failures.
Start training by editing the parameters in runner.py
:
python3 runner.py
python3 launcher.py saves/path/ --init --local [--agents number_of_agents] [--log_agents]
Monitor training stats using TensorBoard. To stop training, kill the processes recorded in the PID file. Training isn't currently supported on Windows.
Support and Community
For support and engaging with the community, Phillip AI enthusiasts can join the dedicated Discord.
Recordings and Thanks
Phillip AI showcases its gameplay through live streams and recordings on Twitch and YouTube. Acknowledgments are due to contributors like altf4 and spxtr for essential code and guidance.