Overview • Screenshots • Requirements • Installation • License
The ml-agents-points-collection
project is a simple game system developed in the Unity engine, enhanced with the dedicated ML-Agents plugin. This project enables the creation of AI agents using reinforcement learning techniques. It features a pre-configured mechanism for agents and a gaming environment where they learn and perform tasks. The agents are placed on platforms where objects containing negative and positive points spawn randomly. The AI's goal is to collect 5 positive points. Collecting a negative point decreases the score by -1, while a positive point increases it by +1. The agent wins by achieving a score of 5 points and loses if its score falls below 0 or if it falls off the platform.
- Agents are aware of their relative position, their current score, and the position of each point on their platform.
- Information provided to the agents is normalized according to the observation creation conventions outlined in the ML-Agents documentation.
- The system includes a mechanism for manual agent control.
- The system is capable of training any number of agents simultaneously, where the results and observations of each agent contribute to a common model.
- A pre-trained model is included for testing, and the system also supports training from scratch.
The game can be played in two modes:
- AI Mode: The pre-trained or newly trained AI agents will navigate the platforms and try to achieve the goal.
- Manual Mode: Manually control an agent using the built-in control system.
Learning process for nine agents simultaneously.
- Unity Version: Unity 2020.3.48f1
- After installing the appropriate Unity version, a Python virtual environment must be created using the provided
requirements.txt
file.
- Install Unity version 2020.3.48f1 from the official Unity website.
- Clone the
ml-agents-points-collection
repository to your local machine. - Set up a Python virtual environment:
python -m venv [env_name]
source [env_name]/bin/activate # On Unix or MacOS
[env_name]\Scripts\activate # On Windows
pip install -r requirements.txt
- Open the project in Unity.
- Configure the system to your liking according to the guide in the documentation. [LINK]
This project is licensed under the MIT License - see the LICENSE file for details.