{"id":13601538,"url":"https://github.com/tanjeffreyz/auto-maple","last_synced_at":"2025-04-11T04:31:03.536Z","repository":{"id":39640549,"uuid":"357805407","full_name":"tanjeffreyz/auto-maple","owner":"tanjeffreyz","description":"Artificial intelligence software for MapleStory that uses various machine learning and computer vision techniques to navigate challenging in-game environments","archived":false,"fork":false,"pushed_at":"2024-03-02T20:08:44.000Z","size":1694,"stargazers_count":429,"open_issues_count":49,"forks_count":225,"subscribers_count":29,"default_branch":"main","last_synced_at":"2024-08-02T18:40:56.960Z","etag":null,"topics":["ai","bot","computer-vision","deep-learning","maplestory","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanjeffreyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-04-14T06:57:42.000Z","updated_at":"2024-08-02T18:40:56.961Z","dependencies_parsed_at":"2024-01-16T23:26:46.169Z","dependency_job_id":"1bc13b34-df60-469d-9f56-881766705736","html_url":"https://github.com/tanjeffreyz/auto-maple","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanjeffreyz%2Fauto-maple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanjeffreyz%2Fauto-maple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanjeffreyz%2Fauto-maple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanjeffreyz%2Fauto-maple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanjeffreyz","download_url":"https://codeload.github.com/tanjeffreyz/auto-maple/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223458404,"owners_count":17148462,"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":["ai","bot","computer-vision","deep-learning","maplestory","python"],"created_at":"2024-08-01T18:01:04.225Z","updated_at":"2025-04-11T04:31:03.521Z","avatar_url":"https://github.com/tanjeffreyz.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  Auto Maple\n\u003c/h1\u003e\n\nAuto Maple is an intelligent Python AI that plays MapleStory, a 2D side-scrolling MMORPG, using simulated key presses, TensorFlow machine learning, OpenCV template matching, and other computer vision techniques.\n\nCommunity-created resources, such as **command books** for each class and **routines** for each map, can be found in the **[resources repository](https://github.com/tanjeffreyz/auto-maple-resources)**.\n\n\u003cbr\u003e\n\n\n\u003ch2 align=\"center\"\u003e\n  Minimap\n\u003c/h2\u003e\n\n\u003ctable align=\"center\" border=\"0\"\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\nAuto Maple uses \u003cb\u003eOpenCV template matching\u003c/b\u003e to determine the bounds of the minimap as well as the various elements within it, allowing it to accurately track the player's in-game position. If \u003ccode\u003erecord_layout\u003c/code\u003e is set to \u003ccode\u003eTrue\u003c/code\u003e, Auto Maple will record the player's previous positions in a \u003cb\u003equadtree-based\u003c/b\u003e Layout object, which is periodically saved to a file in the \"layouts\" directory. Every time a new routine is loaded, its corresponding layout file, if it exists, will also be loaded. This Layout object uses the \u003cb\u003eA* search algorithm\u003c/b\u003e on its stored points to calculate the shortest path from the player to any target location, which can dramatically improve the accuracy and speed at which routines are executed.\n    \u003c/td\u003e\n    \u003ctd align=\"center\" width=\"400px\"\u003e\n      \u003cimg align=\"center\" src=\"https://user-images.githubusercontent.com/69165598/123177212-b16f0700-d439-11eb-8a21-8b414273f1e1.gif\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr\u003e\n\n\n\n\n\n\n\n\n\u003ch2 align=\"center\"\u003e\n  Command Books\n\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/69165598/123372905-502e5d00-d539-11eb-81c2-46b8bbf929cc.gif\" width=\"100%\"/\u003e\n  \u003cbr\u003e\n  \u003csub\u003e\n    The above video shows Auto Maple consistently performing a mechanically advanced ability combination.\n  \u003c/sub\u003e\n\u003c/p\u003e\n  \n\u003ctable align=\"center\" border=\"0\"\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"100%\"\u003e\nDesigned with modularity in mind, Auto Maple can operate any character in the game as long as it is provided with a list of in-game actions, or a \"command book\". A command book is a Python file that contains multiple classes, one for each in-game ability, that tells the program what keys it should press and when to press them. Once a command book is imported, its classes are automatically compiled into a dictionary that Auto Maple can then use to interpret commands within routines. Commands have access to all of Auto Maple's global variables, which can allow them to actively change their behavior based on the player's position and the state of the game.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n  \n\u003cbr\u003e\n\n\n\n\n\n\n\n\u003ch2 align=\"center\"\u003e\n  Routines\n\u003c/h2\u003e\n\n\u003ctable align=\"center\" border=\"0\"\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"350px\"\u003e\n      \u003cp align=\"center\"\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/69165598/150469699-d8a94ab4-7d70-49c3-8736-a9018996f39a.png\"/\u003e\n        \u003cbr\u003e\n        \u003csub\u003e\n          Click \u003ca href=\"https://github.com/tanjeffreyz02/auto-maple/blob/f13d87c98e9344e0a4fa5c6f85ffb7e66860afc0/routines/dcup2.csv\"\u003ehere\u003c/a\u003e to view the entire routine.\n        \u003c/sub\u003e\n      \u003c/p\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\nA routine is a user-created CSV file that tells Auto Maple where to move and what commands to use at each location. A custom compiler within Auto Maple parses through the selected routine and converts it into a list of \u003ccode\u003eComponent\u003c/code\u003e objects that can then be executed by the program. An error message is printed for every line that contains invalid parameters, and those lines are ignored during the conversion. \n\u003cbr\u003e\u003cbr\u003e\nBelow is a summary of the most commonly used routine components:\n\u003cul\u003e\n  \u003cli\u003e\n    \u003cb\u003e\u003ccode\u003ePoint\u003c/code\u003e\u003c/b\u003e stores the commands directly below it and will execute them in that order once the character is within \u003ccode\u003emove_tolerance\u003c/code\u003e of the specified location. There are also a couple optional keyword arguments:\n    \u003cul\u003e\n      \u003cli\u003e\n        \u003ccode\u003eadjust\u003c/code\u003e fine-tunes the character's position to be within \u003ccode\u003eadjust_tolerance\u003c/code\u003e of the target location before executing any commands.\n      \u003c/li\u003e\n      \u003cli\u003e\n        \u003ccode\u003efrequency\u003c/code\u003e tells the Point how often to execute. If set to N, this Point will execute once every N iterations.\n      \u003c/li\u003e\n      \u003cli\u003e\n        \u003ccode\u003eskip\u003c/code\u003e tells the Point whether to run on the first iteration or not. If set to True and frequency is N, this Point will execute on the N-1th iteration.\n      \u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\n    \u003cb\u003e\u003ccode\u003eLabel\u003c/code\u003e\u003c/b\u003e acts as a reference point that can help organize the routine into sections as well as create loops.\n  \u003c/li\u003e\n  \u003cli\u003e\n    \u003cb\u003e\u003ccode\u003eJump\u003c/code\u003e\u003c/b\u003e jumps to the given label from anywhere in the routine.\n  \u003c/li\u003e\n  \u003cli\u003e\n    \u003cb\u003e\u003ccode\u003eSetting\u003c/code\u003e\u003c/b\u003e updates the specified setting to the given value. It can be placed anywhere in the routine, so different parts of the same routine can have different settings. All editable settings can be found at the bottom of \u003ca href=\"https://github.com/tanjeffreyz02/auto-maple/blob/v2/settings.py\"\u003esettings.py\u003c/a\u003e.\n  \u003c/li\u003e\n\u003c/ul\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr\u003e\n\n\n\n\n\n\n\n\n\u003ch2 align=\"center\"\u003e\n  Runes\n\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/69165598/123479558-f61fad00-d5b5-11eb-914c-8f002a96dd62.gif\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\n\u003ctable align=\"center\" border=\"0\"\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"100%\"\u003e\nAuto Maple has the ability to automatically solve \"runes\", or in-game arrow key puzzles. It first uses OpenCV's color filtration and \u003cb\u003eCanny edge detection\u003c/b\u003e algorithms to isolate the arrow keys and reduce as much background noise as possible. Then, it runs multiple inferences on the preprocessed frames using a custom-trained \u003cb\u003eTensorFlow\u003c/b\u003e model until two inferences agree. Because of this preprocessing, Auto Maple is extremely accurate at solving runes in all kinds of (often colorful and chaotic) environments.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\u003cbr\u003e\n\n\n\n\n\n\n\n\n\n\u003ch2 align=\"center\"\u003e\n  Video Demonstration\n\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://youtu.be/iNj1CWW2--8?si=MA4n6EAHokI9FX8B\"\u003e\u003cb\u003eClick below to watch the full video\u003c/b\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://youtu.be/iNj1CWW2--8?si=MA4n6EAHokI9FX8B\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/69165598/123308656-c5b61100-d4d8-11eb-99ac-c465665474b5.gif\" width=\"600px\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\n\n\u003ch2 align=\"center\"\u003e\n  Setup\n\u003c/h2\u003e\n\n\u003col\u003e\n  \u003cli\u003e\n    Download and install \u003ca href=\"https://www.python.org/downloads/\"\u003ePython3\u003c/a\u003e.\n  \u003c/li\u003e\n  \u003cli\u003e\n    Download and install the latest version of \u003ca href=\"https://developer.nvidia.com/cuda-downloads\"\u003eCUDA Toolkit\u003c/a\u003e.\n  \u003c/li\u003e\n  \u003cli\u003e\n    Download and install \u003ca href=\"https://git-scm.com/download/win\"\u003eGit\u003c/a\u003e.\n  \u003c/li\u003e\n  \u003cli\u003e\n    Download and unzip the latest \u003ca href=\"https://github.com/tanjeffreyz02/auto-maple/releases\"\u003eAuto Maple release\u003c/a\u003e.\n  \u003c/li\u003e\n  \u003cli\u003e\n    Download the \u003ca href=\"https://drive.google.com/drive/folders/1SPdTNF4KZczoWyWTgfyTBRvLvy7WSGpu?usp=sharing\"\u003eTensorFlow model\u003c/a\u003e and unzip the \"models\" folder into Auto Maple's \"assets\" directory.\n  \u003c/li\u003e\n  \u003cli\u003e\n    Inside Auto Maple's main directory, open a command prompt and run:\n    \u003cpre\u003e\u003ccode\u003epython -m pip install -r requirements.txt\u003c/code\u003e\u003c/pre\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\n    Lastly, create a desktop shortcut by running:\n    \u003cpre\u003e\u003ccode\u003epython setup.py\u003c/code\u003e\u003c/pre\u003e\n    This shortcut uses absolute paths, so feel free to move it wherever you want. However, if you move Auto Maple's main directory, you will need to run \u003ccode\u003epython setup.py\u003c/code\u003e again to generate a new shortcut. To keep the command prompt open after Auto Maple closes, run the above command with the \u003ccode\u003e--stay\u003c/code\u003e flag.\n  \u003c/li\u003e\n\u003c/ol\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanjeffreyz%2Fauto-maple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanjeffreyz%2Fauto-maple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanjeffreyz%2Fauto-maple/lists"}