{"id":22864701,"url":"https://github.com/malolm/advanced-star-collector","last_synced_at":"2026-05-10T05:53:35.897Z","repository":{"id":266440239,"uuid":"750534147","full_name":"MaloLM/advanced-star-collector","owner":"MaloLM","description":"A multicore client-server for training a DQN agent on an advanced version of the star collector game","archived":false,"fork":false,"pushed_at":"2024-02-11T23:25:47.000Z","size":2752,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T17:47:32.965Z","etag":null,"topics":["machine-learning","pygame","python","python-flask","python-multithreading","reinforcement-learning","tensorflow"],"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/MaloLM.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-30T20:24:42.000Z","updated_at":"2024-02-14T10:57:16.000Z","dependencies_parsed_at":"2024-12-04T09:37:32.776Z","dependency_job_id":"8cb6e35a-911e-4cb9-8970-c92f69a443a9","html_url":"https://github.com/MaloLM/advanced-star-collector","commit_stats":null,"previous_names":["malolm/advanced-star-collector"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaloLM%2Fadvanced-star-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaloLM%2Fadvanced-star-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaloLM%2Fadvanced-star-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaloLM%2Fadvanced-star-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaloLM","download_url":"https://codeload.github.com/MaloLM/advanced-star-collector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246450403,"owners_count":20779406,"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":["machine-learning","pygame","python","python-flask","python-multithreading","reinforcement-learning","tensorflow"],"created_at":"2024-12-13T11:30:31.242Z","updated_at":"2026-05-10T05:53:34.273Z","avatar_url":"https://github.com/MaloLM.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Star Collector Reinforcement Learning Project\n\n![demo](./demo.gif)\n\n## What's This Project All About?\n\nI've been working on this project to level up my skills in reinforcement learning and machine learning in general. The main goal was to teach a DQN (Deep Q-Network) agent to play \"Star Collector.\" It was a fun and challenging journey, and I learned a ton along the way.\n\n### About Star Collector\n\n#### The Rules of the Game\n\n\"Star Collector\" is pretty straightforward: you've got this agent whose mission is to grab as many stars as possible and finally take the green exit door.\n\n#### Why It's Tougher Than It Looks in this implementation\n\n- The agent can only see what's directly around it, not the whole board. So, it's like playing blindfolded and having to make the best move.\n- Time? The agent doesn't know either. It just knows what's happening right now and how many stars it has.\n- No two games are the same because the stars get placed randomly every time. This keeps the agent on its toes.\n\n## Why I Did This\n\nTo be honest, this project is more for kicks and learning than anything else. It was a great way to get hands-on experience with reinforcement learning, but I'm not planning to turn it into something big.\n\n### Evaluation of Results\n\nGiven the complexity of the problem, especially considering the limited state information available to the DQN agent for learning, the results obtained are highly satisfactory, albeit imperfect. Please refer to the examples provided above for a more detailed understanding of the agent's performance.\n\n### Getting Started\n\nIf you're curious and want to mess around with it yourself, here's how to get the ball rolling:\n\n#### What You Need\n\nCheck out the `requirements.txt` file—it's got all the packages you need to run the clients and the server.\n\n#### Setting Things Up\n\nFirst off, install all the dependencies:\n\n`pip install -r requirements.txt`\n\n#### Running the Show\n\nMake sure you start the server before the clients. You need to restart the server for each new training round (kinda annoying, I know).\n\n**Server Side:**\n\nGet the Flask server up with:\n\n`flask --app main run --debug --no-reload`\n\n**Client Time:**\n\nHead over to the ./client directory and run:\n\n`python main.py`\n\n**TensorBoard for the Wins:**\n\nTo see how your training's doing, launch TensorBoard from the ./flask-server directory:\n\n`tensorboard --logdir=./tensorflow/`\n\nAnd that's pretty much it! Dive in, play around, and see how you can make the agent smarter at collecting stars.\n\n### Model Testing and Output\n\nCurrently, the process of model testing involves saving game sessions as GIF files in the `/tmp/` directory of the user's system. It is imperative to retrieve these files prior to any system reset by Linux/macOS, as such resets will result in the deletion of the data stored in this temporary directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalolm%2Fadvanced-star-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalolm%2Fadvanced-star-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalolm%2Fadvanced-star-collector/lists"}