{"id":13936785,"url":"https://github.com/vladfi1/phillip","last_synced_at":"2025-07-19T22:32:53.241Z","repository":{"id":76098434,"uuid":"57242918","full_name":"vladfi1/phillip","owner":"vladfi1","description":"The SSBM \"Phillip\" AI.","archived":false,"fork":false,"pushed_at":"2024-06-08T18:33:51.000Z","size":257222,"stargazers_count":548,"open_issues_count":10,"forks_count":79,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-08-08T23:24:29.495Z","etag":null,"topics":["artificial-intelligence","deep-reinforcement-learning","dolphin","python","ssbm","tensorflow"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vladfi1.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-04-27T19:48:28.000Z","updated_at":"2024-07-11T02:16:16.000Z","dependencies_parsed_at":"2023-03-03T02:46:07.598Z","dependency_job_id":null,"html_url":"https://github.com/vladfi1/phillip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladfi1%2Fphillip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladfi1%2Fphillip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladfi1%2Fphillip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vladfi1%2Fphillip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vladfi1","download_url":"https://codeload.github.com/vladfi1/phillip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226693897,"owners_count":17667757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","deep-reinforcement-learning","dolphin","python","ssbm","tensorflow"],"created_at":"2024-08-07T23:02:59.637Z","updated_at":"2025-07-19T22:32:53.236Z","avatar_url":"https://github.com/vladfi1.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# The Phillip AI\nAn SSBM player based on Deep Reinforcement Learning.\n\nNOTE: This project is no longer active and is subject to bit-rot. There is a successor project based on imitation learning from slippi replays at https://github.com/vladfi1/slippi-ai.\n\n## Requirements\n\nTested on: Ubuntu \u003e=14.04, OSX, Windows 7/8/10.\n\n1. The dolphin emulator. You will probably need to compile from source on Linux. On Windows you'll need to install a [custom dolphin version](https://github.com/vladfi1/dolphin/releases/download/v5.2-alpha/win-mw-push.zip) - just unpack the zip somewhere.\n2. The SSBM iso image. You will need NTSC 1.02.\n3. Python 3. On Windows, you can use [Anaconda](https://repo.continuum.io/archive/Anaconda3-4.4.0-Windows-x86_64.exe) which sets up the necessary paths. You can also use the linux subsytem on Windows 10.\n4. Install phillip. You can download and extract [a zip file](https://github.com/vladfi1/phillip/archive/master.zip) or clone this repository. Then, from the phillip root, run `pip install -e .`.\n5. Some trained agents are included in the `agents` directory. The full set of trained agents is available [here](https://drive.google.com/open?id=1uHghos9e3aXoT19Tn9v6rDYBBclCWt-U).\n\n## Play\n\nYou will need to know where dolphin is located. On Mac the dolphin path will be `/Applications/Dolphin.app/Contents/MacOS/Dolphin`. If `dolphin-emu` is already on your `PATH` then you can omit this.\n\n    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]\n\nTrained agents are stored in the `agents` directory. Aside from `FalconFalconBF`, the agents in `agents/delay0/` are also fairly strong. Run with `--help` to see all options. The best human-like agent is `delay18/FalcoBF`, available in the Google Drive zip.\n\n### Windows Notes\n\n- The `--exe` will be the path to the `Binary\\x64\\Dolphin.exe` you unzipped. In general, the forward `/`s should be back `\\`s for all paths, unless you are using MinGW, Cygwin, git bash, or some other unix shell emulator.\n- You may need to omit the `3` from commands like `python3` and `pip3`.\n- If not using Anaconda, you will likely need to modify your PATH so that python is visible to the command prompt.\n- Communication with dolphin is done over the local loopback interface, enabled with the `--tcp 1` flag (now implied by `--windows`). You may also need to open port 5555 in your firewall.\n- If on Windows 10 you can do everything in the Linux subsystem and follow the linux instructions, except for obtaining dolphin. You will need to pass in an explicit user directory with `--user tmp` (the temp directories that python creates start with `/tmp/...` and aren't valid for windows dolphin).\n\n## Train\n\nTraining is controlled by `phillip/train.py`. See also `runner.py` and `launcher.py` for training massively in parallel on slurm clusters. Phillip has been trained at the [MGHPCC](http://www.mghpcc.org/). It is recommended to train with a [custom dolphin](https://github.com/vladfi1/dolphin) which uses zmq to synchronize with the AI - the below commands will likely fail otherwise.\n\nLocal training is also possible. First, edit `runner.py` with your desired training params (advanced). Then do:\n\n    python3 runner.py # will output a path\n    python3 launcher.py saves/path/ --init --local [--agents number_of_agents] [--log_agents]\n\nTo view stats during training:\n\n    tensorboard --logdir logs/\n\nThe trainer and (optionally) agents redirect their stdout/err to `slurm_logs/`. To end training:\n\n    kill $(cat saves/path/pids)\n\nTo resume training run `launcher.py` again, but omit the `--init` (it will overwrite your old network).\n\nTraining on Windows is not supported.\n\nThanks to [microsoftv](https://github.com/microsoftv) there is now an [instructional video](https://www.youtube.com/watch?v=hxzpK719wV4) as well!\n\n## Support\n\nCome to the [Discord](https://discord.gg/KQ8vhd6)!\n\n## Recordings\n\nI've been streaming practice play over at http://twitch.tv/x_pilot. There are also some recordings on my [youtube channel](https://www.youtube.com/channel/UCzpDWSOtWpDaNPC91dqmPQg).\n\n## Credits\n\nBig thanks to [altf4](https://github.com/altf4/SmashBot) for getting me started, and to [spxtr](https://github.com/spxtr/p3) for a python memory watcher. Some code for dolphin interaction has been borrowed from both projects (mostly the latter now that I've switched to pure python).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvladfi1%2Fphillip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvladfi1%2Fphillip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvladfi1%2Fphillip/lists"}