{"id":18767438,"url":"https://github.com/miffyli/torille","last_synced_at":"2025-04-13T06:32:27.861Z","repository":{"id":57476590,"uuid":"127795966","full_name":"Miffyli/ToriLLE","owner":"Miffyli","description":"Toribash Learning Environment","archived":false,"fork":false,"pushed_at":"2023-08-31T22:27:53.000Z","size":51115,"stargazers_count":49,"open_issues_count":2,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-10T09:09:37.595Z","etag":null,"topics":["deep-learning","gym","machine-learning","reinforcement-learning-playground","toribash"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/Miffyli.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-02T18:28:34.000Z","updated_at":"2024-08-21T04:34:13.000Z","dependencies_parsed_at":"2022-09-14T12:31:23.600Z","dependency_job_id":null,"html_url":"https://github.com/Miffyli/ToriLLE","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miffyli%2FToriLLE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miffyli%2FToriLLE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miffyli%2FToriLLE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miffyli%2FToriLLE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Miffyli","download_url":"https://codeload.github.com/Miffyli/ToriLLE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248674678,"owners_count":21143760,"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":["deep-learning","gym","machine-learning","reinforcement-learning-playground","toribash"],"created_at":"2024-11-07T19:07:26.428Z","updated_at":"2025-04-13T06:32:22.825Z","avatar_url":"https://github.com/Miffyli.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Mating-ritual of two random agents\" src=\"https://github.com/Miffyli/ToriLLE/raw/master/images/toribash.gif\"\u003e\n  \u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=_oxx28PbfdI\n    \" target=\"_blank\"\u003e\u003cimg src=\"http://img.youtube.com/vi/_oxx28PbfdI/0.jpg\" \n    alt=\"PPO ripping a Uke a new one, and feeling the scene\" width=\"250\" height=\"240\" border=\"0\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.youtube.com/watch?v=oWxVb4YcU1w\n    \" target=\"_blank\"\u003e\u003cimg src=\"http://img.youtube.com/vi/oWxVb4YcU1w/0.jpg\" \n    alt=\"Another PPO attacking Uke in more random situations\" width=\"250\" height=\"240\" border=\"0\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# ToriLLE\nToribash Learning Environment. Extra \"L\" to make words more memorable for Finns (\"Torille\" = \"To the marketplace\").\n\nToriLLE provides learning agents an interface to video-game [Toribash](http://www.toribash.com/), a humanoid fighting game.\nToribash provides environment for MuJoCo-like humanoid control, specifically aimed for competitive gameplay. This makes\nToriLLE suitable for e.g. self-play experiments. \n\nToriLLE comes with a Python interface and pre-made OpenAI Gym environment with various tasks. Following white-paper includes baseline experiments and benchmarks conducted using ToriLLE: [https://arxiv.org/abs/1807.10110](https://arxiv.org/abs/1807.10110)\n\n## Requirements\nTested to work on Windows 10, Ubuntu 16.04 and MacOS 10.13. Tested on Python versions 3.5 and 3.6, and will likely not work on 2.7. \n\n* Numpy (Python)\n* FileLock (Python)\n* [Wine](https://wiki.winehq.org/Download) (For Linux/MacOS. **Requires modern version. Tested on 3.0.3**)\n\n## Quickstart\nRemember to install [Wine](https://wiki.winehq.org/Download) if you are on Linux or MacOS. Make sure `wine` command is defined.\n\nFollowing will download ToriLLE with stripped down version of Toribash:\n```\npip install git+https://github.com/miffyli/torille\n```\n\nRandom agent:\n```python\nfrom torille import ToribashControl\nfrom torille.utils import create_random_actions\n\n# Show gameplay\ntoribash = ToribashControl(draw_game=True)\ntoribash.init()\n\n# Random agent\nwhile 1:\n    state, t = toribash.get_state()\n    if t: break\n    toribash.make_actions(create_random_actions())\ntoribash.close()\n```\n\nOpenAI Gym environment:\n```python\nimport gym\nimport torille.envs\n\nenv = gym.make(\"Toribash-DestroyUke-v0\")\n# Show gameplay\nenv.set_draw_game(True)\n\ninitial_state = env.reset()\nt = False\n# Random agent\nwhile not t:\n    s, r, t, _ = env.step(env.action_space.sample())\nenv.close()\n```\n\n## Manual installation \n\n:warning: Following instructions are old and may not work with current versions of Toribash. :warning:\n\nYou can install ToriLLE without PyPI/pip with the following:\n\n* Install [Toribash](http://toribash.com/) (note: Only Steam version may be up to date)\n* Copy contents of `toribash-codes` to Toribash installation directory. Overwrite files\n  * **Note:** This will prevent using that specific installation as a regular game. Remove/rename `profile.tbs` file \n               to revert most of the changes and use game normally again.\n  * **Note2:** Starting with Toribash 5.4 / Steam version of Toribash, settings file is stored in under user's directory at\n               `Saved Games/Toribash/custom.cfg`. Toribash loads this file by default if it finds it, which may cause \n               ToriLLE to run in wrong settings.\n* Provide path the installed `toribash.exe` when creating `ToribashControl` objects (if you use provided Python library)\n\n## Playing in multiplayer\n\n:warning: Multiplayer does not work on Linux Wine, and may not work with the new version :warning:\n\nWant to try your agents against human players in multiplayer? Check how [manual remote control](docs/manual_torille.md) works.\n\n\n## Documentation\n\nExamples in `examples` provide quickstart to how to use ToriLLE, and also show how to apply settings or \nrecord replays.\n\nFor references see:\n\n* [Python library](docs/torille.md)\n* [Gym environment](docs/envs.md)\n\nFor troubleshooting, see the [FAQ](docs/faq.md).\n\nIf you wish to modify ToriLLE or use other language to control Toribash instance, see [hacking](docs/hacking.md) and [documentation on protocol](docs/protocol).\n\n## Repository structure\n- `./torille/`: Python codes for the learning environment (inc. Gym environment)\n  - `./torille/toribash`: This includes stripped version of the Toribash game when installed from PyPi\n- `./toribash-codes/`: Files required for Toribash to make this learning environment work \n- `./examples/`: Python examples on how to use this library\n- `./docs/`: Detailed documentation of the inner workings\n- `./experiments/`: Codes used to run experiments in the white paper\n- `./images/`: Contains GIFs used here\n\n## Related work and useful links\n\n* Options/chat rules: http://forum.toribash.com/showthread.php?t=317900\n* Lua functions: https://github.com/trittimo/ToriScriptAPI/blob/master/docs/toribash_docs.txt\n* Bodypart list: http://forum.toribash.com/showthread.php?t=9391\n* Previous experiments at machine learning with Toribash: \n  * http://forum.toribash.com/showthread.php?t=170100\n  * http://forum.toribash.com/showthread.php?t=167355\n  * http://forum.toribash.com/showthread.php?t=25263\n  * https://www.researchgate.net/profile/Jonathan_Byrne/publication/228848637_Optimising_offensive_moves_in_toribash_using_a_genetic_algorithm/links/0046351420d5001396000000.pdf\n\n## Citing\n\nWe wouldn't mind a citation if you find ToriLLE useful in your work. It also helps us to see what people have been up to!\n\n```\n@inproceedings{kanervisto2019torille,\n  title={ToriLLE: Learning Environment for Hand-to-Hand Combat},\n  author={Kanervisto, Anssi and Hautam{\\\"a}ki, Ville},\n  booktitle={2019 IEEE Conference on Games (CoG)},\n  year={2019},\n}\n```\n\n## Special thanks \u0026 Acknowledgements\n- hampa and Dranix for invaluable help with configuring Toribash and lua scripts (also for developing the game in the first place!)\n- Siim Põder (user \"windo\" on GitHub) for original [toribash-evolver](https://github.com/windo/toribash-evolver) code\n- box (Toribash user) for comments during inception of this project\n\n## License \nCode original to ToriLLE is licensed under GNU GPL 3.0. Toribash is property of Nabistudios. Toribash binary in this package is shared with the permission of main developer \"hampa\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiffyli%2Ftorille","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiffyli%2Ftorille","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiffyli%2Ftorille/lists"}